Trains APIs
Rail-specific feeds, mostly from national operators. NS covers Dutch train timetables and live disruptions, Renfe publishes Spanish stations and timetables through CKAN, and iRail returns Belgian departures and vehicle composition free with no key. For city rail, BART provides Bay Area arrival estimates and the MTA streams NYC subway and rail feeds in GTFS-Realtime format.
| API | Pricing | Auth | Format | Free tier | Status |
|---|---|---|---|---|---|
Bay Area Rapid TransitReal-time BART train arrival estimates, station info, routes and schedules for the Bay Area. Transport & Travel › Transit | Free | API key | XML | Unlimited | Live |
iRailReal-time Belgian train departures, connections, vehicle composition, and disruptions. Transport & Travel › Transit | Free | None | JSON | 10k+/day | Live |
MTA Real-Time Data FeedsLive NYC subway, rail and service-alert feeds in GTFS-Realtime protobuf format from the MTA. Transport & Travel › Transit | Free | None | Binary | Unlimited | Untested |
Transport for SpainQueries Renfe's open datasets — stations, timetables, incidents — through a generic CKAN REST API. Transport & Travel › Transit | None | JSON | Unlimited | Live | |
Transport for The NetherlandsDutch national railway API for train timetables, live disruptions and station information. Transport & Travel › Transit | API key | JSON | — | Untested |
Bay Area Rapid TransitFreeLive
Real-time BART train arrival estimates, station info, routes and schedules for the Bay Area.
API key · XML
Unlimited
no machine-readable spec
iRailFreeLive
Real-time Belgian train departures, connections, vehicle composition, and disruptions.
None · JSON
10k+/day
no machine-readable spec
MTA Real-Time Data FeedsFreeUntested
Live NYC subway, rail and service-alert feeds in GTFS-Realtime protobuf format from the MTA.
None · Binary
Unlimited
no machine-readable spec
Transport for SpainLive
Queries Renfe's open datasets — stations, timetables, incidents — through a generic CKAN REST API.
None · JSON
Unlimited
no machine-readable spec
Transport for The NetherlandsUntested
Dutch national railway API for train timetables, live disruptions and station information.
API key · JSON
—
no machine-readable spec
Nothing matches that combination. Clear the filters and start from the category.
Choosing a Trains API
Is there a free Trains API?
Yes. MTA Real-Time Data Feeds, Bay Area Rapid Transit and iRail are free to use.
Which Trains APIs work without an API key?
MTA Real-Time Data Feeds, iRail and Transport for Spain need no key or sign-up, so you can try them with a plain request.
Can I call a Trains API from front-end JavaScript?
iRail allows cross-origin requests and needs no key, so it works straight from the browser. For the others, call them from your server so your key stays private.
Can I use Trains APIs in a commercial project?
Transport for Spain permits commercial use.
Broader: Transit APIs · Transport & Travel APIs