Skip to main content
Version: v1

Countries

Many of the BAV resources rely on segmenting data by countries. This resource contains a list of all the countries in the world, with additional ISO codes and metadata for system use.

List Countries

To list all of the countries and browse them via the API, use the list endpoint:

GET /api/v1/countries

The brand list response contains details about the country.

Schema

KeyTypeDescription
idintegerThe system ID for the country.
namestringThe name of the country in English.
native_namestringThe name of the country in its native language.
codestringThe two-letter code (ISO 3166-1 alpha-2) for the country.
code_alpha3stringThe three-letter code (ISO 3166-1 alpha-3) for the country.
code_numericstringThe numeric code (ISO 3166-1 numeric) for the country.
flagstringA URL to the country flag in SVG format.
gdpfloatThe country's GDP in USD from the latest published period.
gdp_capitafloatThe country's GDP per capita in USD from the latest published period.
populationintegerThe country's total population from the latest published period.
regionobjectAn object with the region that this country belongs to (schema).

{
"data": [
{
"id": 48,
"name": "United Kingdom",
"native_name": "United Kingdom",
"code": "GB",
"code_alpha3": "GBR",
"code_numeric": "826",
"flag": "https:\/\/wpp-fount-dev.s3.eu-west-2.amazonaws.com\/flags\/gb.svg",
"gdp": null,
"gdp_capita": null,
"population": 65110000,
"region": {
"id": 4,
"name": "Europe"
}
},
//...
]
// ...
}

Get a Category

You may also directly retrieve a country's details if you already have its system ID.

GET /api/v1/countries/123

Where 123 is the system ID of the country.

You may also retrieve the country by its two-letter or three-letter ISO code by replacing the ID with it, like so:

GET /api/v1/countries/GB

Schema

KeyTypeDescription
idintegerThe system ID for the country.
namestringThe name of the country in English.
native_namestringThe name of the country in its native language.
codestringThe two-letter code (ISO 3166-1 alpha-2) for the country.
code_alpha3stringThe three-letter code (ISO 3166-1 alpha-3) for the country.
code_numericstringThe numeric code (ISO 3166-1 numeric) for the country.
flagstringA URL to the country flag in SVG format.
gdpfloatThe country's GDP in USD from the latest published period.
gdp_capitafloatThe country's GDP per capita in USD from the latest published period.
populationintegerThe country's total population from the latest published period.
regionobjectAn object with the region that this country belongs to (schema).

{
"data": {
"id": 48,
"name": "United Kingdom",
"native_name": "United Kingdom",
"code": "GB",
"code_alpha3": "GBR",
"code_numeric": "826",
"flag": "https:\/\/wpp-fount-dev.s3.eu-west-2.amazonaws.com\/flags\/gb.svg",
"gdp": null,
"gdp_capita": null,
"population": 65110000,
"region": {
"id": 4,
"name": "Europe"
}
}
}

Configurable Fields

If you only need some of the fields you can optimize the request for a leaner response ( see Configurable Fields for more information). The following fields can be toggled:

  • name
  • native_name
  • code
  • code_alpha3
  • code_numeric
  • flag
  • gdp
  • gdp_capita
  • population
  • region

Expansions

To create a leaner response data related to brands are not included in the response by default. See the Expansions section for more information on how this works. The following relationships can be expanded:

  • studies

Filters

The countries endpoint supports the following filters:

Sorting

The following fields are sortable:

  • id
  • name
  • native_name
  • code
  • code_alpha3
  • code_numeric
  • flag
  • gdp
  • gdp_capita
  • population
  • region_id
  • created_at
  • updated_at