There's no way this is a real inquiry but for some reason I'm about to give a real reply.
It changes from place to place but you have to check through your city zoning office. If it's allowed they'll likely have an Urban Ag permit you have to apply for. This will require a site plan and like $100.
My understanding about goats in my city is you need a minimum of an acre. Therefore no one has goats where I live.
If you reply to this saying- no, no I'm serious about this! Then prove it by finding work on a goat farm. It's not a good idea to do this without any agricultural experience.