BlogData

Start with a continent

List the countries and territories in a continent, then follow their codes into the country endpoint.

Sometimes a global country list is more than your interface needs. A regional directory or a country picker that starts with a continent should be able to ask for that smaller list directly.

GET /continent/NA/countries returns the North American entries. The beginning of the list, with extra fields omitted, looks like this:

{
  "continent": "NA",
  "countries": [
    { "country": "AI", "name": "Anguilla" },
    { "country": "AG", "name": "Antigua and Barbuda" },
    { "country": "AW", "name": "Aruba" }
  ]
}

These are entries from the same country catalog used by /country/{code}, including territories. Select an entry and its code takes you to the country record, including its currency. Add ?deep=true on a paid plan for details such as the capital.

The API uses seven continent codes: AF, AN, AS, EU, NA, OC, and SA. OC is Oceania. You can fetch the list of codes and names from /continent, or a continent's own record from /continent/{code}.

That lets your interface start at the level it needs. If you already know the continent, one list request gets you its countries without downloading and filtering the whole catalog.