/v1/countries
Countries with station counts
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
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_..."}
)
Example response
A real response from this endpoint, captured by the latest 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
},
{
…