Does it hurt to get a hysterosalpingography done?

Not usually. Pain associated with an hsg is usually due to tubal spasm. If the individual performing the procedure, injects slowly there usually is no pain. The only exception is if you have tubal disease and adhesion's then the procedure can be painful.
No. It should note be painfull. Mild discomfort is possible like mild cramping. You should be fine getting this procedure, and is very helpfull for the doctor to make a diagnosis.
Cramps. Many women have very little pain with a hysterosalpingogram(hsg). Those that do have discomfort, usually have cramps and pressure. The cramps can be minimized by taking 600mg to 800mg of Ibuprofen 30 minutes before the procedure.
Some cramps. The test starts off much like a pap smear. The doctor will clean off the cervix with an antiseptic solution. Then a small tube (catheter) is inserted through the cervix. There is a small balloon that is filled in the uterus through that tube. A small amount of dye that is clear but looks white on x-rays is the inserted through the tube. This can cause some temporary cramping. The exam then done.