geonames API for agents (unofficial) — JSON over curl | clify
GeoNames (geonames.org) is an open world gazetteer with about 13M places. This CLI searches places and postal codes and reads place details, edit history, metro areas, the admin hierarchy (geotree), country data, largest cities, highest mountains, admin divisions, feature statistics, recent edits and site totals.
Host: geonames.org. Call these verified read commands with plain curl; no install, key, or account. Use the public JSON API with plain curl. No install, key, account, or browser is needed. Example: curl 'https://clify-dev.netlify.app/sites.json'. Start with /search?q=weather, then call /abc/COMMAND. Responses are one JSON object. The hosted MCP and GitHub repo are also available.
Commands
search-places
Search places worldwide by keyword (name, alternate name, ...). Returns matching features with ids, country, feature type, population and coordinates. Params: q*
curl 'https://clify-dev.netlify.app/geonames/search-places?q=Zurich'
get-place
Get the detail page facts for a place by geonameId: coordinates, population, elevation, timezone, feature code, Wikipedia link and the ancestor hierarchy. Params: geonameId*, slug*
curl 'https://clify-dev.netlify.app/geonames/get-place'
get-place-history
List the edit history (revisions, user, comment, time) of a place by geonameId. Params: geonameId*
curl 'https://clify-dev.netlify.app/geonames/get-place-history?geonameId=2657896'
get-metropolitan-area
Get the metropolitan area(s) a city belongs to or is the center of: the center city, the role and the number of areas. Params: geonameId*
curl 'https://clify-dev.netlify.app/geonames/get-metropolitan-area'
list-place-subdivision-regions
List the sub-division map regions (e.g. city districts) inside a place, with ids and names. Only exists for places that have subdivisions. Params: geonameId*
curl 'https://clify-dev.netlify.app/geonames/list-place-subdivision-regions'
get-geotree-path
Get the ancestor path from Earth down to a feature in the administrative geotree. Params: id*
curl 'https://clify-dev.netlify.app/geonames/get-geotree-path?id=6255148'
list-geotree-children
List the children of a feature in the geotree, e.g. the countries of a continent or the admin divisions of a country. Paginated. Params: parentId*, startRow, maxRows
curl 'https://clify-dev.netlify.app/geonames/list-geotree-children?parentId=6255148'
search-postal-codes
Search postal codes by code or place name, optionally limited to one country. Params: q*, country, maxRows
curl 'https://clify-dev.netlify.app/geonames/search-postal-codes?q=8001&country=CH'
get-postal-code
Get the full record of a postal code by postalCodeId: admin hierarchy with geoname ids, timezone, coordinates and accuracy. Params: postalCodeId*
curl 'https://clify-dev.netlify.app/geonames/get-postal-code'
get-postal-code-shape
Get the boundary polygon of a postal code area as GeoJSON geometry. Params: postalCodeId*
curl 'https://clify-dev.netlify.app/geonames/get-postal-code-shape'
list-countries
List all countries with ISO codes, capital, area, population, continent, currency, languages, neighbours, postal code format and geonameId. Params: none
curl 'https://clify-dev.netlify.app/geonames/list-countries'
list-largest-cities
List the largest cities of a country by population. Params: country*
curl 'https://clify-dev.netlify.app/geonames/list-largest-cities?country=CH'
list-highest-mountains
List the highest mountains of a country; value is the elevation in meters. Params: country*
curl 'https://clify-dev.netlify.app/geonames/list-highest-mountains?country=CH'
list-admin-divisions
List the first-level administrative divisions (ISO-3166-2 subdivisions) of a country with codes, type, capital and population (in the row text). Params: country*, countrySlug*
curl 'https://clify-dev.netlify.app/geonames/list-admin-divisions'
get-country-feature-statistics
Count a country's features by feature class and code (ADM3, LK, PPL, ...). The row text holds count, code, name and description. Params: country*
curl 'https://clify-dev.netlify.app/geonames/get-country-feature-statistics'
list-recent-changes
List the latest edits to the gazetteer: revision, time, place, country, user, feature code and change comment. Params: none
curl 'https://clify-dev.netlify.app/geonames/list-recent-changes'
get-gazetteer-stats
Get site-wide totals: feature count, features and postal codes per country, the last 7 days of edit activity and the most recent edits. Params: none
curl 'https://clify-dev.netlify.app/geonames/get-gazetteer-stats'
list-timezones
List the timezones known to GeoNames with their country code. Params: none
curl 'https://clify-dev.netlify.app/geonames/list-timezones'
list-oceans-and-seas
List the world's oceans and seas (132) with their geonameIds. Params: none
curl 'https://clify-dev.netlify.app/geonames/list-oceans-and-seas'