GeoNames
by geonames.org
Location Information
Added on February 4th, 2011
Checked and working on November 15th, 2026
Visit geonames.org →
What it does
GeoNames offers web services for its geographical database of more than 11 million place names in many languages. Search places by name, find nearby places, postal codes, streets and Wikipedia articles for a coordinate, look up time zones, elevation and country information, and get the administrative hierarchy of a place. Responses are JSON or XML. Free with a free GeoNames account (username) and a daily credit limit; paid premium service for heavy use.
At a glance
- API key
- Needed, free · More APIs with a free key
- Pricing
- Free with a free GeoNames account (username) and a daily credit limit; paid premium service for heavy use.
- From the browser
- Yes (CORS)
- Formats
- JSON, XML
- Interface
- REST, HTTP-GET
- Provider
- geonames.org
- Last checked
- Working on November 15th, 2026
More information: https://www.geonames.org/export/ws-overview.html
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl 'http://api.geonames.org/searchJSON?q=London&maxRows=1&username=YOUR_API_KEY'
JavaScript
const response = await fetch("http://api.geonames.org/searchJSON?q=London&maxRows=1&username=YOUR_API_KEY");
const data = await response.json();
console.log(data);
Python
import requests
response = requests.get(
"http://api.geonames.org/searchJSON?q=London&maxRows=1&username=YOUR_API_KEY",
timeout=30,
)
print(response.json())
Replace YOUR_API_KEY with your own key. The JavaScript works in a web page as well as in Node.js 18 or newer.