v1

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

Find countries

Find countries, filtering by optional criteria. If no criteria are set, you will get back all known countries.

get/geo/countries

Query parameters

currencyCodestring

Only countries supporting this currency

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 countries. Format: ±SORT_FIELD where SORT_FIELD = code | name

Response

A list of countries

Example response

{
  "data": [
    {
      "code": "SM",
      "currencyCodes": [
        "EUR"
      ],
      "name": "San Marino",
      "wikiDataId": "Q238"
    },
    {
      "code": "NE",
      "currencyCodes": [
        "XOF"
      ],
      "name": "Niger",
      "wikiDataId": "Q1032"
    },
    {
      "code": "MT",
      "currencyCodes": [
        "EUR"
      ],
      "name": "Malta",
      "wikiDataId": "Q233"
    },
    {
      "code": "KZ",
      "currencyCodes": [
        "KZT"
      ],
      "name": "Kazakhstan",
      "wikiDataId": "Q232"
    },
    {
      "code": "KE",
      "currencyCodes": [
        "KES"
      ],
      "name": "Kenya",
      "wikiDataId": "Q114"
    }
  ],
  "links": [
    {
      "href": "/data/world/v1/geo/countries?offset=0&limit=5",
      "rel": "first"
    },
    {
      "href": "/data/world/v1/geo/countries?offset=0&limit=5",
      "rel": "prev"
    },
    {
      "href": "/data/world/v1/geo/countries?offset=10&limit=5",
      "rel": "next"
    },
    {
      "href": "/data/world/v1/geo/countries?offset=195&limit=5",
      "rel": "last"
    }
  ],
  "metadata": {
    "currentOffset": 5,
    "totalCount": 198
  }
}