v2

latestOpenAPI 3.1.0Proprietary2026-08-01122398.8 KB
Countries

Search within a single property

Returns a paginated list of countries whose {property} value matches q (or all countries when q is omitted). Property accepts any searchable field name as a dot-path (e.g. codes.alpha_3, names.common, region, landlocked, memberships.eu). See https://restcountries.com/docs#fields for the full list.

get/countries/v5/{property}

Path parameters

propertystring required

Dot-path field name to filter or look up on. See https://restcountries.com/docs#fields for the full set of accepted values.

Query parameters

qstring

Full-text search across every searchable property. Case-insensitive substring match.

limitinteger

Number of records to return. Defaults to 25; accepts an integer from 1 to 100 on the free plan, or up to 500 on paid plans. Non-integer or below-range values return HTTP 400; a value above your plan's ceiling but within the paid maximum (e.g. 200 on a free plan) returns HTTP 403 indicating it is valid only on paid plans. See https://restcountries.com/docs#pagination for details.

offsetinteger

Number of records to skip for pagination. Default 0.

response_fieldsstring

Comma-separated dot-path projection. Only the specified fields are returned. Example: names.common,codes.alpha_2,flag.emoji

response_fields_omitstring

Comma-separated dot-path blocklist. The specified fields are removed from the response. Useful for trimming heavy branches like names.translations.

prettyboolean

Set to true (a bare ?pretty, 1, or true) to pretty-print the JSON response; 0 or false keep it minified. Default is minified.

Response

Paginated list of countries.