I flew at 27 weeks no problem. Just opt for the pat down at security. Most airlines have a rule of no later than 34 weeks
They just always want a doctors note after 28 weeks. But also check with your doctor.
Call the air line they do have restrictions but I don't know when it starts. Also check your insurance. I know mine says that if you travel and deliver at a hospital different than the one you always go to and its after so many weeks its not considered an emergency and they wont cover it.
I don't think you can fly in your second and third trimester