Zum Inhalt springen
GET /v1/country

All locations in a country

Live testen

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

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

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

API-Key holen

Code-Snippets

curl "https://api.oanor.com/locode-api/v1/country" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/locode-api/v1/country", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/locode-api/v1/country");
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/locode-api/v1/country",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

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

{
    "data": {
        "count": 50,
        "limit": 50,
        "total": 10025,
        "offset": 0,
        "country": "DE",
        "results": [
            {
                "code": "DE222",
                "name": "Brandscheid/Westerwald",
                "country": "DE",
                "latitude": 50.567,
                "functions": [
                    "Road terminal"
                ],
                "longitude": 7.917
            },
            {
                "code": "DE223",
                "name": "Brandshagen",
                "country": "DE",
                "latitude": 54.25,
                "functions": [
                    "Road terminal"
                ],
                "longitude": 13.183
            },
            {
                "code": "DE225",
                "name": "Braschwitz",
                "country": "DE",
                "latitude": 51.517,
                "functions": [
                    "Road terminal"
                ],
                "longitude": 12.067
            },
            {
                "code": "DE226",
                "name": "Bräsen",
                "country": "DE",
                "latitude": 51.967,
                "functions": [
                    "Road terminal"
                ],
                "longitude": 12.383
            },
            {
                "code": "DE229",
                "name": "Braunfels",
                "country": "DE",
                "latitude": 50.517,
                "functions": [
                    "Road terminal"
                ],
                "longitude": 8.4
            },
            {
                "code": "DE22B",
                "name": "Böllen",
                "country": "DE",
                "latitude": 47.8,
                "functions": [
                    "Road terminal"
                ],
                "longitude": 7.85
            },
            {
                "code": "DE22E",
                "name": "Eicklingen",
                "country": "DE",
                "latitude": 52.55,
                "functions": [
                    "Road terminal"
                ],
                "longitude": 10.183
            },
            {
                "code": "DE232",
                "name": "Braunichswalde",
                "country": "DE",
                "latitude": 50.8,
                "functions": [
                    "Road terminal"
                ],
                "longitude": 12.217
            },
            {
                "code": "DE233",
                "name": "Braunlage",
                "country": "DE",
                "latitude": 51.733,
                "functions": [
                    "Road terminal"
                ],
                "longitude": 10.617
            },
            {
                "code": "DE234",
                "name": "Bräunrode",
                "country": "DE",
                "latitude": 51.633,
                "functions": [
                    "Road terminal"
                ]
…