GeoNames Home | Postal Codes | Download / Webservice | About | |
Webservice Type: XML or JSON
Url: api.geonames.org/children?
api.geonames.org/childrenJSON?
Parameters:
geonameId: the geonameId of the parent
maxRows: number of rows returned, default is 200
hierarchy: this optional parameter allows to use other hiearchies then the default administrative hierarchy. Possible values. 'tourism' for tourism regions, 'geography' for geographical regions and 'dependency' for dependencies .
Result: returns a list of GeoName records
Example, regions of Italy:
http://api.geonames.org/children?geonameId=3175395&username=demo
Example for a tourism hierarchy, islands for the Canaries:
http://api.geonames.org/children?geonameId=2593110&username=demo&hierarchy=tourism
Example for a dependency hierarchy, dependencies of the UK
http://api.geonames.org/children?geonameId=2635167&username=demo&hierarchy=dependency
Example for a geographic hierarchy, regions of HK
http://api.geonames.org/children?geonameId=1819730&username=demo&hierarchy=geography
Webservice Type : XML or JSON
Url : api.geonames.org/hierarchy?
api.geonames.org/hierarchyJSON?
Parameters :
geonameId : the geonameId for the hierarchy
Result : returns a list of GeoName records, ordered by hierarchy level. The top hierarchy (continent) is the first element in the list
Example, hierarchy of Zurich, Switzerland, Europe:
http://api.geonames.org/hierarchy?geonameId=2657896&username=demo
Webservice Type : XML or JSON
Url : api.geonames.org/neighbours?
api.geonames.org/neighboursJSON?
Parameters :
geonameId : the geonameId for the neighbours (country or ADM)
country: the country code (alternative parameter instead of the geonameId)
Result : returns the neighbours of a toponym, currently only implemented for countries
Example, neighbours of Switzerland:
http://api.geonames.org/neighbours?geonameId=2658434&username=demo
Webservice Type : XML or JSON
Url : api.geonames.org/contains?
api.geonames.org/containsJSON?
Parameters :
geonameId : the geonameId for enclosing feature
featureClass: filter by featureClass (optional)
featureCode: filter by featureCode (optional)
Result : enclosed features (only when polyon boundary is available)
Example, features on island Texel:
http://api.geonames.org/contains?geonameId=2746385&username=demo
Webservice Type : XML or JSON
Url : api.geonames.org/siblings?
api.geonames.org/siblingsJSON?
Parameters :
geonameId : the geonameId for the siblings
Result : returns a list of GeoNames records (feature class A) that have the same administrative level and the same father
Example, Siblings of France:
http://api.geonames.org/siblings?geonameId=3017382&username=demo
This work is licensed under a
Creative Commons Attribution 4.0 License.