Public APIs
GeoNames favicon

GeoNames

Geocoding

Place names and other geographical data.

GeoNames's website screenshot

About GeoNames

GeoNames provides REST web services for geographic and postal code data, available in both XML and JSON formats. The services cover postal code search by postal code or place name, placename lookup by postal code, reverse geocoding for nearby postal codes, nearby populated places, and nearby toponyms, as well as a service returning extended location details for a given latitude/longitude and a service listing countries with available postal code coverage. Requests are made through the api.geonames.org endpoint (with a secure endpoint at secure.geonames.org) and require a registered username parameter; results can be filtered and sorted using parameters such as country, radius, maxRows, style (verbosity level), and bounding box coordinates.

Postal code coverage has country-specific restrictions: only partial postal codes are available for Canada, Ireland, and Malta due to copyright reasons, only major codes are available for Brazil, and Argentina's data reflects a postal code system replaced in 1999. The nearby postal code search is limited to a 30km radius and 500 rows on the free service, with higher limits (160km, 2500 rows) on the premium service. A Service Level Agreement is available for commercial use of the web services, and client libraries are provided.

This service is intended for developers building applications that require geocoding, reverse geocoding, or postal code lookup functionality, such as address autocomplete or location-based search.

Key features

  • Full-text place name search with XML and JSON REST web services
  • Postal code search by postal code, place name, or country
  • Reverse geocoding to find nearby postal codes, populated places, or toponyms from lat/lng
  • Bounding box and radius-based filtering with adjustable result verbosity (SHORT/MEDIUM/LONG/FULL)
  • Postal code country info listing which countries have postal code geocoding available

Frequently asked questions

Is there a free tier?

Yes, GeoNames offers a free service with limits such as a 30km radius and 500 max rows for nearby postal code searches, alongside a premium service with higher limits (160km radius, 2500 max rows).

How do I authenticate requests?

Each request requires a 'username' parameter tied to a registered account confirmed via email; the demo account is only for documentation samples, not real apps.

What formats and endpoints are available?

Services are REST-based and available in both XML and JSON formats, with a secure endpoint at secure.geonames.org.

Are there any data limitations by country?

Yes, postal codes are restricted for some countries, e.g. Canada, Ireland, and Malta only provide first letters of postal codes, and Brazil only provides major postal codes.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product