Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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.

Thanks for any help and apologies if this was a little unclear!

share|improve this question
add comment

closed as off topic by Al E., phwd Aug 16 '12 at 2:05

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.

1 Answer

You are looking at essentially a geoocation API. one is yahoo place finder here is the output from one of the examples:

<?xml version="1.0" encoding="UTF-8"?>
<ResultSet version="1.0">
<Error>0</Error>
<ErrorMessage>No error</ErrorMessage>
<Locale>us_US</Locale>
<Quality>87</Quality>
<Found>1</Found>
<Result>
    <quality>87</quality>
    <latitude>37.416275</latitude>
    <longitude>-122.025092</longitude>
    <offsetlat>37.416397</offsetlat>
    <offsetlon>-122.025055</offsetlon>
    <radius>500</radius>
    <name>
</name>
    <line1>701 1st Ave</line1>
    <line2>Sunnyvale, CA  94089-1019</line2>
    <line3>
</line3>
    <line4>United States</line4>
    <house>701</house>
    <street>1st Ave</street>
    <xstreet>
</xstreet>
    <unittype>
</unittype>
    <unit>
</unit>
    <postal>94089-1019</postal>
    <neighborhood>
</neighborhood>
    <city>Sunnyvale</city>
    <county>Santa Clara County</county>
    <state>California</state>
    <country>United States</country>
    <countrycode>US</countrycode>
    <statecode>CA</statecode>
    <countycode>
</countycode>
    <uzip>94089</uzip>
    <hash>DDAD1896CC0CDC41</hash>
    <woeid>12797150</woeid>
    <woetype>11</woetype>
</Result>
</ResultSet>
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.