Countries
What are 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.
We suggest that you use the term Market
instead of country when showing this in an interface.
List all countries
To list all of the countries and browse them via the API, use the list endpoint:
GET /api/v2/countries
Get a country
You may also directly retrieve a country's details if you already have its system ID.
GET /api/v2/countries/123
Where 123
is the system ID of the country.
Schema
Full response schema
Key | Type | Filterable | Sortable | Configurable | Description |
---|---|---|---|---|---|
id | integer | ✅ (exact) | ✅ | ✅ | The system ID for the country. |
is_active | boolean | ✅ | ✅ | ✅ | Whether the market should be used/shown or not. |
name | string | ✅ | ✅ | ✅ | The name of the country in English. |
native_name | string | ✅ | ✅ | ✅ | The name of the country in its native language. |
code | string | ✅ | ✅ | ✅ | The two-letter code (ISO 3166-1 alpha-2) for the country. |
code_alpha3 | string | ✅ | ✅ | ✅ | The three-letter code (ISO 3166-1 alpha-3) for the country. |
code_numeric | string | ✅ | ✅ | ✅ | The numeric code (ISO 3166-1 numeric) for the country. |
capital | string | ✅ | ✅ | ✅ | The name of the country's capital. |
area | string | ✅ | ✅ | ✅ | The size of the country. |
latitude | string | ✅ | ✅ | ✅ | - |
longitude | string | ✅ | ✅ | ✅ | - |
flag | string | ❌ | ❌ | ✅ | The URL to the country's flag as an image. |
created_at | string | ✅ | ✅ | ✅ | A datetime string when this country was first created. |
updated_at | string | (updated since) | ✅ | ✅ | A datetime string when this country was last updated. |
Relationship Response Schema
The slim relationship schema is used when the country is used as part of an include in another resource.
Key | Type | Description |
---|---|---|
id | integer | The system ID for the country. |
name | string | The name of the country in English. |
region | object | An object with the region that this country belongs to sector relationship |
code | object | The two-letter code (ISO 3166-1 alpha-2) for the country. |
code_alpha3 | object | The three-letter code (ISO 3166-1 alpha-3) for the country. |
code_numeric | object | The numeric code (ISO 3166-1 numeric) for the country. |
Additional Filters
For convenience, we have a set of additional filters that are not available in the default filters or are part of the columns. These are:
active
- Set to1
to only return active countries.regions
- Set to a comma-separated list of region IDs to only return countries in those regions.with_studies
- Include this parameter to only return countries that have studies (note that these can be both released and unreleased studies).with_recent_studies
- Set to a number (X) to only return countries that have released syndicated BAV studies in the last X calendar years. For example: When set to 0 it will return countries that have studies in the current. When set to 1 it will return countries that have studies in the current or past calendar year.in_best_countries
- Set to a year number (e.g. 2023) to only return countries that are included in the Best Countries ranking for that year.
Relationships & includes
By default, relationships apart from the sector are not included. See the includes section for more information on how this works. The following relationships are available:
region
- The region that -.
Searching
This endpoint supports searching. See the searching section for more details.