v1

latestSwagger 2.0Creative Commons Attribution 3.02026-07-14263452.9 KB
Geo

Find country region cities

Get the cities in a specific country region. The country and region info is omitted in the response.

get/geo/countries/{countryId}/regions/{regionCode}/cities

Path parameters

countryIdstring required

An ISO-3166 country code or WikiData id

regionCodestring required

An ISO-3166 or FIPS region code

Query parameters

minPopulationinteger

Only places having at least this population

maxPopulationinteger

Only places having no more than this population

namePrefixstring

Only entities whose names start with this prefix. If languageCode is set, the prefix will be matched on the name as it appears in that language.

namePrefixDefaultLangResultsboolean

When name-prefix matching, whether or not to match on names in the default language if a non-default languageCode is set.

timeZoneIdsstring

Only places in these time-zones (comma-delimited)

typesstring

Only places for these types (comma-delimited): CITY | ADM2

asciiModeboolean

Display results using ASCII characters

hateoasModeboolean

Include HATEOAS-style links in results

languageCodestring

Display results in this language

limitinteger

The maximum number of results to retrieve

offsetinteger

The zero-ary offset index into the results

sortstring

How to sort place results. 'Format: ±SORT_FIELD,±SORT_FIELD' where SORT_FIELD = elevation | name | population

includeDeletedstring

Whether to include any divisions marked deleted: ALL | SINCE_YESTERDAY | SINCE_LAST_WEEK | NONE

Response

A list of populated places

Example response

{
  "data": [
    {
      "country": "Andorra",
      "countryCode": "AD",
      "id": 2987553,
      "latitude": 42.57777778,
      "longitude": 1.61944444,
      "name": "L'Aldosa de Canillo",
      "region": "Canillo",
      "regionCode": 2,
      "type": "CITY",
      "wikiDataId": "Q24371"
    },
    {
      "country": "Andorra",
      "countryCode": "AD",
      "id": 3086756,
      "latitude": 42.57667,
      "longitude": 1.51773,
      "name": "La Cortinada",
      "region": "Ordino",
      "regionCode": 5,
      "type": "CITY",
      "wikiDataId": "Q24486"
    },
    {
      "country": "Andorra",
      "countryCode": "AD",
      "id": 3056764,
      "latitude": 42.4859,
      "longitude": 1.49045,
      "name": "La Margineda",
      "region": "Andorra la Vella",
      "regionCode": 7,
      "type": "CITY",
      "wikiDataId": "Q2536296"
    },
    {
      "country": "Andorra",
      "countryCode": "AD",
      "id": 978,
      "latitude": 42.544354,
      "longitude": 1.515427,
      "name": "La Massana",
      "region": "La Massana",
      "regionCode": 4,
      "type": "CITY",
      "wikiDataId": "Q3820973"
    },
    {
      "country": "Andorra",
      "countryCode": "AD",
      "id": 759,
      "latitude": 42.5,
      "longitude": 1.53333333,
      "name": "Les Escaldes",
      "region": "Escaldes-Engordany",
      "regionCode": "08",
      "type": "CITY",
      "wikiDataId": "Q1050185"
    }
  ],
  "links": [
    {
      "href": "/data/world/v1/geo/cities?offset=0&limit=5",
      "rel": "first"
    },
    {
      "href": "/data/world/v1/geo/cities?offset=0&limit=5",
      "rel": "prev"
    },
    {
      "href": "/data/world/v1/geo/cities?offset=10&limit=5",
      "rel": "next"
    },
    {
      "href": "/data/world/v1/geo/cities?offset=273685&limit=5",
      "rel": "last"
    }
  ],
  "metadata": {
    "currentOffset": 5,
    "totalCount": 273690
  }
}