← Agent Data Hub · Search endpoints · /llms.txt

Countries by Continent: How Many Countries, List and Largest by Area (Africa, Asia, Europe, Americas, Oceania, World)

How many countries are in a continent or in the world (UN member states, with the sentence how they are counted), the list of countries, or the largest countries by area (sort=area). Continent by GeoNames, UN membership and area from the CIA World Factbook (last edition).

Call it (no API key)

GET https://api.agentdatahub.de/api/v1/call/countries-by-continent?continent=asia&compact=1

Full metadata: verbose=1 · Markdown: format=llm · Only some fields: add &fields=a,b.c · MCP: tool call_api with {"apiId":"countries-by-continent"}

How to fetch it

curl:

curl -s 'https://api.agentdatahub.de/api/v1/call/countries-by-continent?continent=asia&compact=1'

Python (standard library only):

import json, urllib.request

url = "https://api.agentdatahub.de/api/v1/call/countries-by-continent?continent=asia&compact=1"
with urllib.request.urlopen(url, timeout=30) as r:
    data = json.load(r)
print(json.dumps(data, indent=2)[:2000])

Google Sheets:

=IMPORTDATA("https://api.agentdatahub.de/api/v1/history/countries-by-continent?continent=asia&_order=desc&_limit=500&format=csv")

The recorded history of this call as CSV, newest first. Excel: Data → From Web with the same address.

Parameters

continentafrica, asia, europe, north-america, south-america, oceania, antarctica or world
sortname (default) or area (largest first)
limitRows (default all)
allOptional, true = also territories and states outside the UN

Example response (live, compact)

{
  "apiId": "countries-by-continent",
  "trust": "checked",
  "data_freshness": "cached",
  "data": {
    "continent": "Asia",
    "answer": "Asia has 45 UN member states.",
    "how_counted": "45 UN member states lie in Asia, by the continent GeoNames assigns to each country (one continent per country; Russia and Cyprus count as Europe, Turkey, Georgia, Armenia, Azerbaijan and Kazakhstan as Asia, Egypt as Africa). Not counted: states that are not UN members and dependent territories (all=true lists them too).",
    "un_member_states": 45,
    "sort": "name",
    "all": false,
    "countries": [
      {
        "name": "Afghanistan",
        "iso2": "AF"
      },
      {
        "name": "Armenia",
        "iso2": "AM"
      },
      {
        "name": "Azerbaijan",
        "iso2": "AZ"
      },
      {
        "name": "Bahrain",
        "iso2": "BH"
      },
      {
        "name": "Bangladesh",
        "iso2": "BD"
      },
      {
        "name": "Bhutan",
        "iso2": "BT"
      },
      {
        "name": "Brunei",
        "iso2": "BN"
      },
      {
        "name": "Burma",
        "iso2": "MM"
      },
      {
        "name": "Cambodia",
        "iso2": "KH"
      },
      {
        "name": "China",
        "iso2": "CN"
      },
      {
        "name": "Georgia",
        "iso2": "GE"
      },
      {
        "name": "India",
        "iso2": "IN"
      },
      {
        "name": "Indonesia",
        "iso2": "ID"
      },
      {
        "name": "Iran",
        "iso2": "IR"
      },
      {
        "name": "Iraq",
        "iso2": "IQ"
      },
      {
        "name": "Israel",
        "iso2": "IL"
      },
      {
        "name": "Japan",
        "iso2": "JP"
      },
      {
        "name": "Jordan",
        "iso2": "JO"
      },
      {
        "name": "Kazakhstan",
        "iso2": "KZ"
      },
      {
        "name": "Kuwait",
        "iso2": "KW"
      },
      {
        "name": "Kyrgyzstan",
        "iso2": "KG"
      },
      {
        "name": "Laos",
        "iso2": "LA"
      },
      {
        "name": "Lebanon",
        "iso2": "LB"
      },
      {
        "name": "Malaysia",
        "iso2": "MY"
      },
      {
        "name": "Maldives",
        "iso2": "MV"
      },
      {
        "name": "Mongolia",
        "iso2": "MN"
      },
      {
        "name": "Nepal",
        "iso2": "NP"
      },
      {
        "name": "North Korea",
        "iso2": "KP"
      },
      {
        "name": "Oman",
        "iso2": "OM"
      },
      {
        "name": "Pakistan",
        "iso2": "PK"
      },
      {
        "name": "Philippines",
        "iso2": "PH"
      },
      {
        "name": "Qatar",
        "iso2": "QA"
      },
      {
        "name": "Saudi Arabia",
        "iso2": "SA"
      },
      {
        "name": "Singapore",
        "iso2": "SG"
      },
      {
        "name": "South Korea",
        "iso2": "KR"
      },
      {
        "name": "Sri Lanka",
        "iso2": "LK"
      },
      {
        "name": "Syria",
        "iso2": "SY"
      },
      {
        "name": "Tajikistan",
        "iso2": "TJ"
      },
      {
        "name": "Thailand",
        "iso2": "TH"
      },
      {
        "name": "Turkey",
        "iso2": "TR"
      },
      {
        "name": "Turkmenistan",
        "iso2": "TM"
      },
      {
        "name": "United Arab Emirates",
        "iso2": "AE"
      },
      {
        "name": "Uzbekistan",
        "iso2": "UZ"
      },
      {
        "name": "Vietnam",
        "iso2": "VN"
      },
      {
        "name": "Yemen",
        "iso2": "YE"
      }
    ],
    "page": "https://api.agentdatahub.de/continents/asia",
    "source": "GeoNames (continent), CIA World Factbook (UN membership, area)",
    "licence": "public domain (CIA World Factbook); calling codes, time zones and continents: GeoNames (geonames.org), CC BY 4.0",
    "as_of": "2026-01-22",
    "source_url": "https://github.com/factbook/factbook.json",
    "checked": "2026-12-03"
  },
  "source": "CIA World Factbook (last
… (truncated)

Recorded history available: /api/v1/history/countries-by-continent?continent=asia

Source & license

SourceCIA World Factbook (last edition) and GeoNames
Licensepublic domain (CIA World Factbook); calling codes, time zones and continents: GeoNames (geonames.org), CC BY 4.0
Source URLhttps://github.com/factbook/factbook.json
Termshttps://github.com/factbook/factbook.json/blob/master/README.md
CategoryKnowledge, Research & News › Reference Facts · more: country-facts · country-practical-facts · crossref-doi-lookup