Transport for Spain

Renfe rail station data via Spain's open CKAN portal

🚆 TransportUNMONITORED
AUTH NONECORS AGENT ?HTTPS COMMERCIAL ?

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.

HOW IT'S SCORED ⓘ
Status badge · for your READMEshipapis health badge: — · unmonitored
ON PROBE SCHEDULE

We probe a documented GET and expect 2xx JSON — full uptime and health score. Open provider docs ↗

Uptime historystarts after first probe

On our probe schedule. Uptime charts appear after the first check lands.

Example responsefrom provider docs — not verified by us
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
  }
}
Call itcurl · fetch · python
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

Endpoints · 6On scheduleFULL DOCS ↗
On schedule — GET /datastore_search?resource_id=a2368cff-1562-4dde-8466-9635ea3a572a&limit=1 awaits first probe
GET/datastore_search?resource_id=a2368cff-1562-4dde-8466-9635ea3a572a&limit=1PROBED

Renfe rail station data via Spain's open CKAN portal

GET/datastore_search?limit=5

Datastore Search — documented GET route.

GET/datastore_search?page=1

Datastore Search — documented GET route.

GET/datastore_create

Datastore Create — documented GET route.

GET/datastore_upsert

Datastore Upsert — documented GET route.

GET/datastore_search

Datastore Search — documented GET route.

Machine-readable spec

We probe a documented GET and expect 2xx JSON — full uptime and health score. Export includes every documented route below.

Response-shape history

Not tracked yet. Shape-change history starts once this API joins our probe schedule.

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?

Transport for Spain is catalogued but not yet on our probe schedule, so we don't publish a live status for it. Check the provider's own status page or docs for its current state.