I'm looking for some kind of API that would allow me to feed it a location, say "City of London", and it would return a series of geographically relevant list of areas that it's in.

For example, this fantasy API would take "City of London" as a parameter and spit out "London", "United Kingdom", "Europe". "Brooklyn" would be "New York", "New York State", "United States".

It doesn't have to be that specific or as consistent as the example above. I have obviously looked into using the Google Maps API for this and it would be fine for the job were there not requirements to have a map displayed and not allow access behind a login system.

Questions on Web Applications Stack Exchange are expected to relate to web applications within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.
If this question can be reworded to fit the rules in the help center, please edit the question.