Loading
Loading
Retrieve a complete list of countries with ISO codes, capitals, regions, and subregions. Optionally filter by region or subregion.
Returns all countries with their ISO codes, capital cities, regions, and subregions. Optional region and subregion parameters narrow results.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
The following optional parameters can be used to filter the countries list.
formatoptionalStringdefault: jsonResponse format: 'json' (default) or 'xml'.
regionoptionalStringdefault: All RegionsOptional filter to return countries within a specific region from the region endpoint.
subregionoptionalStringdefault: All SubregionsOptional filter to return countries within a specific subregion from the subregion endpoint.
A successful request returns a 200 OK response with a JSON object containing the countries array.
countriesAn array of country objects matching the applied filters.
countries[].nameThe full English name of the country (e.g., "Afghanistan").
countries[].iso_alpha_2The ISO 3166-1 alpha-2 two-letter country code (e.g., "AF").
countries[].iso_alpha_3The ISO 3166-1 alpha-3 three-letter country code (e.g., "AFG").
countries[].iso_numericThe ISO 3166-1 numeric country code (e.g., 4).
countries[].capitalThe capital city of the country (e.g., "Kabul").
countries[].regionThe broad geographical region the country belongs to (e.g., "Asia", "Europe").
countries[].subregionThe more specific subregion the country belongs to (e.g., "Southern Asia", "Western Europe").
The API uses standard HTTP status codes to indicate the success or failure of requests. For details about supported status codes and error responses, refer to the HTTP Error Codes.
Please provide a valid region name.
Please provide a valid subregion name.