Skip to content
GET /v1/country

All locations in a country

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/locode-api

It works. Grab an API key and use it in your project.

Get an API key

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_..."}
)

Example response

A real response from this endpoint, captured by the latest 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"
                ]
…