/v1/meta
Usage notes
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/swisstransit-api/v1/meta" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/swisstransit-api/v1/meta", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/swisstransit-api/v1/meta");
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/swisstransit-api/v1/meta",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"note": "Switzerland's complete public-transport timetable — trains (SBB/CFF/FFS), trams, buses, postbuses, boats, funiculars and cable cars. /v1/locations?query=Zürich = find stops, stations and addresses with their id and coordinates; /v1/connections?from=Zürich&to=Bern = plan a door-to-door journey (optional via, date as YYYY-MM-DD, time as HH:MM, arrival=true to search by arrival time) returning each option's departure & arrival times and platforms, total duration in minutes, number of transfers, the transport products used (e.g. IC 8) and the leg-by-leg breakdown including walking sections; /v1/stationboard?station=Bern (type=departure|arrival) = the live board for a station — line, destination, time, platform and any delay. Place names accept stop names or station ids from /v1/locations. Times include live delays where available. Data from transport.opendata.ch (Swiss open transport data). Covers Switzerland and immediate cross-border connections.",
"source": "Swiss public transport API — transport.opendata.ch (search.ch / Swiss open data)",
"endpoints": [
"/v1/locations",
"/v1/connections",
"/v1/stationboard",
"/v1/meta"
]
},
"meta": {
"timestamp": "2026-06-01T16:24:05.467Z",
"request_id": "b7998463-0c50-4754-9900-74b0a2955b35"
},
"status": "ok",
"message": "Meta retrieved",
"success": true
}