Transport for Spain
Renfe rail station data via Spain's open CKAN portal
Renfe's open-data portal serves railway reference data through a standard CKAN datastore API. The datastore_search endpoint returns station records with codes, names, coordinates, and addresses as JSON, no key required. Data and field names are in Spanish.
GET https://data.renfe.com/api/3/action/datastore_search?resource_id=a2368cff-1562-4dde-8466-9635ea3a572a&limit=1
{
"success": true,
"result": {
"records": [
{
"_id": 1,
"CÓDIGO": 54505,
"DESCRIPCION": "AEROPUERTO",
"LATITUD": 36.6760678,
"LONGITUD": -4.4879567,
"POBLACION": "Málaga",
"PROVINCIA": "Málaga"
}
],
"total": 23
}
}curl "https://data.renfe.com/api/3/action/datastore_search?resource_id=a2368cff-1562-4dde-8466-9635ea3a572a&limit=1"const res = await fetch("https://data.renfe.com/api/3/action/datastore_search?resource_id=a2368cff-1562-4dde-8466-9635ea3a572a&limit=1");
const data = await res.json();
console.log(data);import requests
res = requests.get("https://data.renfe.com/api/3/action/datastore_search?resource_id=a2368cff-1562-4dde-8466-9635ea3a572a&limit=1")
print(res.json())BROWSER CALLS BLOCKED (NO CORS/HTTPS) — USE THE CURL SNIPPET
/datastore_search?resource_id=a2368cff-1562-4dde-8466-9635ea3a572a&limit=1PROBEDRenfe rail station data via Spain's open CKAN portal
/datastore_search?limit=5Datastore Search — documented GET route.
/datastore_search?page=1Datastore Search — documented GET route.
/datastore_createDatastore Create — documented GET route.
/datastore_upsertDatastore Upsert — documented GET route.
/datastore_searchDatastore Search — documented GET route.
We probe a documented GET and expect 2xx JSON — full uptime and health score. Export includes every documented route below.
Stable. No schema drift observed since monitoring began — the response shape has not changed under our checks.
Transport for Spain: common questions
Is Transport for Spain free to use?
Yes — Transport for Spain is a free transport API. Free tier: Free — no key required. Whether the free tier allows commercial use is unclear — check the provider docs.
Does Transport for Spain need an API key?
No — Transport for Spain needs no API key or signup. You can call it straight away; rate limits still apply (Unpublished).
Can I call Transport for Spain from the browser?
Not directly — Transport for Spain doesn't send browser-friendly CORS headers, so call it from a server or proxy instead. Copy the curl or Python snippet on this page to get started.
Is Transport for Spain up right now?
As of our last scheduled check, Transport for Spain is healthy with 100% uptime over 90 days and a 603 ms median response. We re-probe it every sweep — the status badge and uptime chart above always show the latest.