All countries (filter by continent)

Lists every country, optionally filtered by continent and sorted by name, population or area.

Request

GEThttps://countries-info.p.apihiver.com/v1/countries?continent=AS
String. AF, AS, EU, NA, OC, SA or AN.
String. name, population or area (default name).
Language
Client
1curl --request GET \
2  --url 'https://countries-info.p.apihiver.com/v1/countries?continent=AS&sort=%7Bsort%7D' \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY'

All countries (filter by continent): Countries Info API reference

Lists every country, optionally filtered by continent and sorted by name, population or area. This endpoint is part of the Countries Info API: Every country's capital, population, area, currency, calling code, languages, continent and neighbours — by code, name or currency.

Example response (200, application/json)

Success.

1{
2  "count": 51,
3  "countries": [
4    {
5      "tld": ".af",
6      "code": "AF",
7      "name": "Afghanistan",
8      "code3": "AFG",
9      "capital": "Kabul",
10      "area_km2": 647500,
11      "continent": "Asia",
12      "languages": [
13        "fa-AF",
14        "ps",
15        "uz-AF"
16      ],
17      "neighbours": [
18        "TM",
19        "CN",
20        "IR"
21      ],
22      "population": 37172386,
23      "calling_code": "+93",
24      "numeric_code": "004",
25      "currency_code": "AFN",
26      "currency_name": "Afghani",
27      "continent_code": "AS",
28      "postal_code_format": null
29    },
30    {
31      "tld": ".am",
32      "code": "AM",
33      "name": "Armenia",
34      "code3": "ARM",
35      "capital": "Yerevan",
36      "area_km2": 29800,
37      "continent": "Asia",
38      "languages": [
39        "hy"
40      ],
41      "neighbours": [
42        "GE",
43        "IR",
44        "AZ"
45      ],
46      "population": 3090500,
47      "calling_code": "+374",
48      "numeric_code": "051",
49      "currency_code": "AMD",
50      "currency_name": "Dram",
51      "continent_code": "AS",
52      "postal_code_format": "######"
53    },
54    {
55      "tld": ".az",
56      "code": "AZ",
57      "name": "Azerbaijan",
58      "code3": "AZE",
59      "capital": "Baku",
60      "area_km2": 86600,
61  …

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "A parameter has the wrong format — the message names it."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.