v1

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

Find country regions

Get all regions in a specific country. These could be states, provinces, districts, or otherwise major political divisions.

get/geo/countries/{countryId}/regions

Path parameters

countryIdstring required

An ISO-3166 country code or WikiData id

Query parameters

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.

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 regions. Format: ±SORT_FIELD where SORT_FIELD = fipsCode | isoCode | name

Response

A list of country regions

Example response

{
  "data": [
    {
      "countryCode": "US",
      "fipsCode": 48,
      "isoCode": "TX",
      "name": "Texas",
      "wikiDataId": "Q1439"
    },
    {
      "countryCode": "US",
      "fipsCode": 39,
      "isoCode": "OH",
      "name": "Ohio",
      "wikiDataId": "Q1397"
    },
    {
      "countryCode": "US",
      "fipsCode": 31,
      "isoCode": "NE",
      "name": "Nebraska",
      "wikiDataId": "Q1553"
    },
    {
      "countryCode": "US",
      "fipsCode": 50,
      "isoCode": "VT",
      "name": "Vermont",
      "wikiDataId": "Q16551"
    },
    {
      "countryCode": "US",
      "fipsCode": 15,
      "isoCode": "HI",
      "name": "Hawaii",
      "wikiDataId": "Q782"
    }
  ],
  "links": [
    {
      "href": "/data/world/v1/geo/countries/US/regions?offset=0&limit=5",
      "rel": "first"
    },
    {
      "href": "/data/world/v1/geo/countries/US/regions?offset=0&limit=5",
      "rel": "prev"
    },
    {
      "href": "/data/world/v1/geo/countries/US/regions?offset=10&limit=5",
      "rel": "next"
    },
    {
      "href": "/data/world/v1/geo/countries/US/regions?offset=55&limit=5",
      "rel": "last"
    }
  ],
  "metadata": {
    "currentOffset": 5,
    "totalCount": 56
  }
}