API Almanac
API reference › Cities

Find cities by name: coordinates, population, time zone and the local time there now

GET/v1/cities

GET/v1/cities

Find cities by name: coordinates, population, time zone and the local time there now

Cities of 15,000+ people worldwide. Name matches are prefix first, then substring; results are ordered by population, so q=paris puts Paris, France before Paris, Texas. Add country to narrow.

PARAMETERS
qquery · stringREQUIRED
City name (any script; ASCII spellings work too)
e.g. denver
countryquery · string
ISO 3166-1 alpha-2
e.g. US
limitquery · integer
Maximum results
e.g. 10
In the full reference
REQUEST
curl "https://api.apialmanac.com/v1/cities?q=denver" \
  -H "X-API-Key: YOUR_KEY"
RESPONSE
200OK
{
  "count": 1,
  "total": 1,
  "cities": [
    {
      "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.