Vai al contenuto
GET /v1/countries

Countries with station counts

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/trainstations-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "count": 43,
        "countries": [
            {
                "country": "CH",
                "stations": 22268
            },
            {
                "country": "DE",
                "stations": 13741
            },
            {
                "country": "FR",
                "stations": 6399
            },
            {
                "country": "SE",
                "stations": 5767
            },
            {
                "country": "ES",
                "stations": 5196
            },
            {
                "country": "IT",
                "stations": 5038
            },
            {
                "country": "GB",
                "stations": 2794
            },
            {
                "country": "AT",
                "stations": 1545
            },
            {
                "country": "NO",
                "stations": 856
            },
            {
                "country": "HR",
                "stations": 730
            },
            {
                "country": "BE",
                "stations": 574
            },
            {
                "country": "PL",
                "stations": 530
            },
            {
                "country": "CZ",
                "stations": 503
            },
            {
                "country": "NL",
                "stations": 447
            },
            {
                "country": "DK",
                "stations": 381
            },
            {
                "country": "IE",
                "stations": 295
            },
            {
                "country": "FI",
                "stations": 211
            },
            {
                "country": "UA",
                "stations": 210
            },
            {
                "country": "HU",
                "stations": 200
            },
            {
                "country": "BG",
                "stations": 188
            },
            {
                "country": "PT",
                "stations": 172
            },
            {
                "country": "RO",
                "stations": 152
            },
            {
                "country": "BA",
                "stations": 137
            },
            {
                "country": "SK",
                "stations": 122
            },
            {
                "country": "RS",
                "stations": 109
            },
            {
                "country": "GR",
                "stations": 91
            },
            {
                "country": "SI",
                "stations": 84
            },
            {
                "country": "LT",
                "stations": 83
            },
            {
                "country": "LU",
                "stations": 66
            },
            {
                "country": "RU",
                "stations": 27
            },
            {
                "country": "BY",
                "stations": 20
            },
            {
        
…