Zum Inhalt springen
GET /v1/countries

Countries with subdivision counts

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/regions-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/regions-api/v1/countries" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/regions-api/v1/countries", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/regions-api/v1/countries");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/regions-api/v1/countries",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "count": 229,
        "countries": [
            {
                "country_code": "GB",
                "country_name": "United Kingdom",
                "subdivisions": 221
            },
            {
                "country_code": "SI",
                "country_name": "Slovenia",
                "subdivisions": 212
            },
            {
                "country_code": "UG",
                "country_name": "Uganda",
                "subdivisions": 139
            },
            {
                "country_code": "IT",
                "country_name": "Italy",
                "subdivisions": 126
            },
            {
                "country_code": "FR",
                "country_name": "France",
                "subdivisions": 124
            },
            {
                "country_code": "PH",
                "country_name": "Philippines",
                "subdivisions": 99
            },
            {
                "country_code": "EE",
                "country_name": "Estonia",
                "subdivisions": 94
            },
            {
                "country_code": "CZ",
                "country_name": "Czech Republic",
                "subdivisions": 90
            },
            {
                "country_code": "MA",
                "country_name": "Morocco",
                "subdivisions": 87
            },
            {
                "country_code": "RU",
                "country_name": "Russia",
                "subdivisions": 83
            },
            {
                "country_code": "TR",
                "country_name": "Turkey",
                "subdivisions": 81
            },
            {
                "country_code": "MK",
                "country_name": "North Macedonia",
                "subdivisions": 80
            },
            {
                "country_code": "AZ",
                "country_name": "Azerbaijan",
                "subdivisions": 78
            },
            {
                "country_code": "PR",
                "country_name": "Puerto Rico",
                "subdivisions": 78
            },
            {
                "country_code": "TH",
                "country_name": "Thailand",
                "subdivisions": 78
            },
            {
                "country_code": "BD",
                "country_name": "Bangladesh",
                "subdivisions": 72
            },
            {
                "country_code": "IS",
                "country_name": "Iceland",
                "subdivisions": 72
            },
            {
                "country_code": "LT",
                "country_name": "Lithuania",
                "subdivisions": 70
            },
            {
                "country_code": "ES",
                "country_name": "Spain",
                "subdivisions": 69
            },
            {
                "country_code": "MT",
                "country_name": "Malta",
                "subdivisions": 68
            },
    
…