You could put them on a balcony, if you don't mind them coming and going. They will live almost anywhere really. I have friends with beehives on their garage roof.
I don't keep them myself, but I have friends who do. AFAIK, you need to be concerned about:
* food/water - The bees will fly up to 2 miles to forage. So as long as you have flowering vegetation within 2 miles, you're good!
* predators - You want the hives to be reasonably protected from things like mice and raccoons. This is one reason boxes are raised up off the ground. If you live where there are bears, good luck.
* sun/moisture - I think too much shade and moisture can invite bugs, mites, mold, etc. I believe this is another reason the boxes are raised up off the ground, so the bottom box isn't just sitting in a puddle.
* access - You will need to be able to get to the hives sometimes. They will weigh a lot during honey season. And moving them, and extracting honey is messy. I had friends who put a hive a half mile into their sometimes swampy woods, and while the bees didn't care, the owners later regretted it.