API Almanac
API reference › Cities

One city by its GeoNames id

GET/v1/cities/{id}

GET/v1/cities/{id}

One city by its GeoNames id

PARAMETERS
idpath · integerREQUIRED
GeoNames id
e.g. 5419384
In the full reference
REQUEST
curl "https://api.apialmanac.com/v1/cities/5419384" \
  -H "X-API-Key: YOUR_KEY"
RESPONSE
200OK
{
  "id": 5419384,
  "name": "Denver",
  "ascii_name": "Denver",
  "country": "US",
  "admin1": "Colorado",
  "admin1_code": "CO",
  "lat": 39.7392,
  "lon": -104.9847,
  "population": 715522,
  "elevation_m": 1609,
  "timezone": "America/Denver",
  "offset": "-06:00",
  "abbreviation": "MDT",
  "local_time": "2026-10-09T10:30:00-06:00",
  "attribution": "City data © GeoNames (geonames.org), CC BY 4.0"
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.