Skip to main content
Version: v2

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​

KeyTypeFilterableSortableConfigurableDescription
idinteger✅ (exact)✅✅The system ID for the country.
is_activeboolean✅✅✅Whether the market should be used/shown or not.
namestring✅✅✅The name of the country in English.
native_namestring✅✅✅The name of the country in its native language.
codestring✅✅✅The two-letter code (ISO 3166-1 alpha-2) for the country.
code_alpha3string✅✅✅The three-letter code (ISO 3166-1 alpha-3) for the country.
code_numericstring✅✅✅The numeric code (ISO 3166-1 numeric) for the country.
capitalstring✅✅✅The name of the country's capital.
areastring✅✅✅The size of the country.
latitudestring✅✅✅-
longitudestring✅✅✅-
flagstring❌❌✅The URL to the country's flag as an image.
created_atstring✅✅✅A datetime string when this country was first created.
updated_atstring(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.

KeyTypeDescription
idintegerThe system ID for the country.
namestringThe name of the country in English.
regionobjectAn object with the region that this country belongs to sector relationship
codeobjectThe two-letter code (ISO 3166-1 alpha-2) for the country.
code_alpha3objectThe three-letter code (ISO 3166-1 alpha-3) for the country.
code_numericobjectThe 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 to 1 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:

Searching​

This endpoint supports searching. See the searching section for more details.