Continents

Retrieve information about the seven continents and their constituent countries.

Standards Used

  • ISO 3166-1

The Continent object#

FieldTypeRequiredDescription
codestringYesTwo-letter continent code.
Example: AS
countriesstring[]YesCountries in this continent (alpha-2 codes).
Example: ["JP","CN","KR","IN"]
namestringYesContinent name.
Example: Asia

Endpoints#

Response

FieldTypeRequiredDescription
codestringYesTwo-letter continent code.
Example: AS
countriesstring[]YesCountries in this continent (alpha-2 codes).
Example: ["JP","CN","KR","IN"]
namestringYesContinent name.
Example: Asia

Example Request

const response = await fetch(
  'https://worlddataapi.com/v1/continents',
  {
    headers: {
      'X-API-Key': 'YOUR_API_KEY'
    }
  }
);

const data = await response.json();

Error Responses

StatusDescription
429Rate limit exceeded

Path Parameters

ParameterTypeRequiredDescription
identifierpathstringYesContinent code (e.g., 'AS', 'EU') or name

Response

FieldTypeRequiredDescription
codestringYesTwo-letter continent code.
Example: AS
countriesstring[]YesCountries in this continent (alpha-2 codes).
Example: ["JP","CN","KR","IN"]
namestringYesContinent name.
Example: Asia

Example Request

const response = await fetch(
  'https://worlddataapi.com/v1/continents/example',
  {
    headers: {
      'X-API-Key': 'YOUR_API_KEY'
    }
  }
);

const data = await response.json();

Error Responses

StatusDescription
404Continent not found