GeoNames
APIFree geographical data API for place names, coordinates, postal codes, and more
Overview
GeoNames provides RESTful endpoints for accessing global geographical data including place names, coordinates, postal codes, time zones, and elevation. Endpoints include search (by name/coords), reverse geocoding (coords to place), postal code lookup, and country info. Responses are available in XML or JSON (via output=json parameter). Ideal for location-based apps, mapping services, postal code validation, time zone detection, and integrating geographical context into applications. It supports both forward and reverse geocoding, making it versatile for spatial data needs.
Example Integration (JavaScript)
fetch('http://www.geonames.org/export/web-services.html')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err)); Key Features
- RESTful
- JSON/XML support
- Global geographical data
- Forward & reverse geocoding
- Free non-commercial tier
Frequently Asked Questions
? Is GeoNames free to use?
GeoNames is free for non-commercial use. Commercial users must subscribe to a paid plan (GeoNames Premium) for access.
? Does it require an API Key?
Yes, you need to register for a free GeoNames account to obtain an API key for most endpoints.
? What is the response format?
By default, responses are in XML. JSON can be requested by adding the 'output=json' parameter to your API call.
Top Alternatives
People Also Ask about GeoNames
Tool Info
Pros
- ⊕ Easy integration
- ⊕ Comprehensive global data
- ⊕ Free non-commercial access
- ⊕ Extensive documentation
Cons
- ⊖ Rate-limited free tier
- ⊖ Commercial use requires payment
- ⊖ XML default response format