rfi.it APIrfi.it ↗
Access live Italian train departures/arrivals, station search with region filters, circulation alerts, and station service details via the RFI.it API.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/776b2149-49fb-4540-acd6-822e63ec0345/get_station_mappings' \ -H 'X-API-Key: $PARSE_API_KEY'
Retrieve the complete station name to placeId mapping used by the live monitor. Returns all Italian railway station names mapped to their numeric place IDs.
No input parameters required.
{
"type": "object",
"fields": {
"total": "integer count of stations in mappings",
"mappings": "object mapping uppercase station names to string place IDs"
},
"sample": {
"data": {
"total": 3,
"mappings": {
"ROMA TERMINI": "2416",
"MILANO CENTRALE": "1728",
"FIRENZE SANTA MARIA NOVELLA": "1325"
}
},
"status": "success"
}
}About the rfi.it API
The RFI.it API covers Italy's national railway network across 5 endpoints, returning live departure and arrival boards, station metadata, and real-time circulation alerts. The get_live_monitor endpoint streams current train status — including delay, platform, and carrier — for any Italian station identified by name or numeric place ID. Companion endpoints handle station search with geographic filters, detailed service listings, and the full station-to-placeId mapping table.
Live Train Boards
The get_live_monitor endpoint returns the real-time departures or arrivals board for a given station. Pass either a place_id (numeric string from get_station_mappings) or a full uppercase station_name such as ROMA TERMINI. The response includes an array of train objects, each carrying carrier, category, train_number, destination (or origin for arrivals), scheduled_time, delay, and platform. The type field in the response confirms whether you received a departures or arrivals board.
Station Search and Details
search_stations queries the RFI GIS service and supports filtering by region (e.g. Lombardia), province, municipality, and a partial-match query string. Each result includes name, region, province, municipality, type, passenger_service, and manager. The limit parameter caps the result count. For richer per-station data, get_station_details accepts a station_slug (e.g. roma-termini) and returns arrays of services (such as Bar, caffetteria, ristorazione or Bici) and accessibility features.
Station Mappings and Alerts
get_station_mappings returns the complete lookup table that maps uppercase station names to their numeric place_id strings — useful for building autocomplete or validating station names before calling get_live_monitor. The get_infomobilita_alerts endpoint pulls the current Infomobilità ticker from the RFI homepage and returns an alerts array of plain-text strings describing active line disruptions, speed restrictions, and service updates across the network.
- Build a departure board widget for Italian stations using
get_live_monitorwith real-time delay and platform data. - Filter stations by region or province via
search_stationsto populate a geographic station picker. - Display current service disruptions in a travel app by polling
get_infomobilita_alertsfor active circulation messages. - Map station names to place IDs at startup using
get_station_mappingsto avoid manual lookup tables. - Show accessible station options to mobility-impaired travellers using the
accessibilityarray fromget_station_details. - Aggregate delay statistics across multiple stations by periodically calling
get_live_monitorand recording thedelayfield per train.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does RFI have an official public developer API?+
What does `get_live_monitor` return, and how do I identify the station?+
trains array where each object contains carrier, category, train_number, destination (or origin for arrivals), scheduled_time, delay, and platform, plus a top-level station name and type field. You identify the station with either a place_id string (from get_station_mappings) or a full uppercase station_name such as MILANO CENTRALE.Does the API cover historical train schedules or only the current live board?+
get_live_monitor reflects the current real-time board only; no historical departure or arrival records are returned. The API covers live status, station metadata, and current alerts. You can fork it on Parse and revise it to add an endpoint targeting historical timetable data if that surface becomes available.Can I filter `get_infomobilita_alerts` by specific line or region?+
alerts array. You can fork the API on Parse and revise it to add server-side filtering logic.