1. Datasets
  2. Cities

Cities API

Find populated places, coordinates, populations and time zones. 69,991 records across 245 countries and territories, from GeoNames.

GET /v1/citiesCC BY 4.0245 countries28 Nov 2026

Request and response

The response below is the example from our OpenAPI document, so it shows the exact shape you get, though the record itself may come from another country.

GET/v1/cities
curl 'https://api.apifor.dev/v1/cities' \
  -G -d country=IR -d limit=1 \
  -H 'x-api-key: YOUR_API_KEY'
Example response · application/json
{
  "success": true,
  "data": [
    {
      "geonameid": 285,
      "name": "Boneh-ye ‘Alvān",
      "asciiname": "Boneh-ye 'Alvan",
      "lat": 32.11171,
      "lng": 48.45877,
      "feature_code": "PPL",
      "country_code": "IR",
      "admin1_code": "15",
      "admin1_name": "Khuzestan",
      "admin2_code": null,
      "population": 6860,
      "elevation": 0,
      "dem": 54,
      "timezone": "Asia/Tehran",
      "modified_at": "2026-05-19"
    }
  ]
}

Fields

Each record in data has these fields. Types are read from the example values; a nullable field can hold null for some records.

FieldTypeExample
geonameidinteger285
namestring"Boneh-ye ‘Alvān"
asciinamestring"Boneh-ye 'Alvan"
latnumber32.11171
lngnumber48.45877
feature_codestring"PPL"
country_codestring"IR"
admin1_codestring"15"
admin1_namestring"Khuzestan"
admin2_codenullablenull
populationinteger6860
elevationinteger0
deminteger54
timezonestring"Asia/Tehran"
modified_atstring (date)"2026-05-19"

Filters and paging

Query parameters accepted by GET /v1/cities. Full detail, including the single-record route, is in the endpoint reference.

ParameterTypeRules
pageintegermin 1 · default 1
limitinteger1 to 200 · default 50
countrystringISO 3166-1 alpha-2
qstring2 to 100 chars

Coverage by country

245 countries and territories have records in the 28 Nov 2026 snapshot. Each one has its own page with filters and counts.