{code}: Get country by country code

API: restcountries.com:world-countries-api
Endpoint: /alpha/{code}
Response format: application/json
Auth: unknown
Method: GET
Last Status: 200
Latency: 366ms

Description

Search for a country by its ISO 3166-1 alpha-2, alpha-3, or numeric code.

Parameters (2)

code (string, path, required)

Country code (cca2, ccn3, cca3, or cioc)

fields (string, query, optional)

Comma-separated list of fields to return (max 10)

Examples (2)

Get country by country code openapi-spec
curl 'https://restcountries.com/v3.1/alpha/US'
import requests

resp = requests.get("https://restcountries.com/v3.1/alpha/US")
data = resp.json()
import zingu_apis

api = zingu_apis.api("world-countries")
result = api.fetch("alpha/{code}")

for item in result:
    print(item)
const resp = await fetch("https://restcountries.com/v3.1/alpha/US");
const data = await resp.json();
Get country by country code openapi-spec
curl 'https://restcountries.com/v3.1/alpha/DE'
import requests

resp = requests.get("https://restcountries.com/v3.1/alpha/DE")
data = resp.json()
import zingu_apis

api = zingu_apis.api("world-countries")
result = api.fetch("alpha/{code}")

for item in result:
    print(item)
const resp = await fetch("https://restcountries.com/v3.1/alpha/DE");
const data = await resp.json();

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-04-16 17:34:53.729475 200 366ms
2026-04-16 03:35:56.547449 200 397ms
2026-04-16 02:54:41.345032 200 406ms
2026-04-15 02:22:28.941348 200 381ms
2026-04-15 01:42:16.742608 200 388ms
2026-04-14 03:50:46.097850 200 392ms
2026-04-14 00:56:30.660978 200 428ms
2026-04-12 15:35:50.580557 200 388ms
2026-04-12 13:54:47.229805 200 394ms
2026-04-10 06:44:37.140152 200 310ms
2026-04-10 04:22:26.941135 200 301ms
2026-04-09 02:57:00.549515 200 828ms
2026-04-09 02:43:31.361601 200 392ms