Trenitalia Train Tickets Scraper - Fares & Timetables
Pricing
from $2.00 / 1,000 train connections
Trenitalia Train Tickets Scraper - Fares & Timetables
Scrape Trenitalia train tickets: Frecciarossa, Intercity and regional connections, timetables, fares by class and seats left. $5 per 1,000 connections.
Pricing
from $2.00 / 1,000 train connections
Rating
0.0
(0)
Developer
Muhammad Afzal
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
11 days ago
Last modified
Categories
Security
Limited permissionsShare
Trenitalia Train Tickets Scraper returns Trenitalia connections between any two Italian stations, including Frecciarossa, Intercity and regional trains, with departure and arrival times, duration, changes, train numbers, the starting ticket price and, optionally, every fare offer by service class with seats left and refund rules. It is built for Italy travel planners, fare monitors, comparison sites and AI agents, and costs $5.00 per 1,000 connections on the Apify Free plan plus a $0.005 start fee per run.
The Actor reads Trenitalia's public journey search. It never logs in, fills a cart, books or pays, and it charges only for connections it saves.
What Trenitalia train ticket data does it return?
Each dataset row is one connection (one journey option, direct or with changes).
| Field | What it holds |
|---|---|
connectionId, searchDirection | Trenitalia solution ID and whether the row is outbound or return |
origin, destination | Station names as Trenitalia shows them |
departureTime, arrivalTime | ISO 8601 times with Italy offset |
duration, durationMinutes, changes, direct | Journey length and number of changes |
status | Sale status, for example SALEABLE |
price, currency, priceIndicative | Starting price for the connection and passengers, in EUR |
trains | Each train's stations, times, category (for example Frecciarossa), acronym and train number |
fareOffers | Service class, offer name, price, seats left, sale status, refundable and changeable flags |
adults, children, searchedFrom, searchedTo, searchedAt | The search that produced the row |
source, sourceUrl | Provenance |
Each run also writes an OUTPUT record with outcome (DATA, EMPTY, PARTIAL, BLOCKED, REJECTED or FAILED), resolved stations, pages fetched, delivered and charged counts, and warnings.
When should you use it, and when not?
Use it when you need:
- Italy train tickets from Trenitalia for one route and date, with the cheapest price per connection;
- Frecciarossa ticket prices by service class, with the seats left at each fare;
- an outbound and a return search in one run;
- a scheduled Trenitalia fare or timetable monitor for a busy route such as Rome to Florence.
Do not use it when:
- you want to book. The Actor is read-only;
- you need Italo trains. Italo is a separate operator; use Italo Train Scraper and compare the two datasets;
- you need trains outside Italy: Deutsche Bahn Train Tickets Scraper, National Rail Tickets Scraper or SNCF Scraper;
- you need buses. Use FlixBus Tickets Scraper.
How do I search Trenitalia trains, Frecciarossa fares and timetables?
Enter a departure and an arrival station, such as Roma Termini and Firenze S. M. Novella. The Actor resolves names through Trenitalia's station search and prefers an exact match.
departureDateisYYYY-MM-DDin Italy time. Leave it empty to search tomorrow, which keeps saved Tasks evergreen. Words such as "tomorrow" are not accepted, and past dates are rejected.departureTime(default08:00) is the earliest departure.returnDateandreturnTimeadd a reverse-direction search in the same run.maxResultsis then split between outbound and return rows.adults(1-10) andchildren(0-10) set the passengers for the price.trainTypekeepsall,frecce(high-speed Frecce),intercityorregionaltrains.directOnlydrops connections with changes.sortByorders byDEPARTURE_DATE,ARRIVAL_DATEorFASTEST.includeOffers(default on) adds every fare offer per connection.maxResults(1-100, default 20) andmaxPages(1-10, default 5, about 10 connections per page) bound the run.
{"from": "Roma Termini","to": "Firenze S. M. Novella","departureTime": "08:00","adults": 1,"trainType": "frecce","directOnly": true,"includeOffers": true,"maxResults": 10}
Use it from an AI assistant
Trenitalia Train Tickets Scraper works from Claude, ChatGPT, Cursor or any other MCP client through Apify's MCP server. Add https://mcp.apify.com/?tools=muhammadafzal/trenitalia-train-ticket-connection-scraper as a server, and the assistant can call the Actor as one tool. Example prompt: "List tomorrow's direct Frecciarossa trains from Milano Centrale to Venezia Santa Lucia after 09:00 with the cheapest Standard fare and seats left."
How do I run it from code?
JavaScript (apify-client):
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('muhammadafzal/trenitalia-train-ticket-connection-scraper').call({from: 'Roma Termini',to: 'Firenze S. M. Novella',trainType: 'frecce',maxResults: 10,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items.map((c) => `${c.departureTime} ${c.trains.map((t) => t.trainNumber).join('+')} ${c.price} ${c.currency}`));
Python (apify-client 3.x):
import osfrom apify_client import ApifyClientclient = ApifyClient(os.environ["APIFY_TOKEN"])run = client.actor("muhammadafzal/trenitalia-train-ticket-connection-scraper").call(run_input={"from": "Roma Termini", "to": "Firenze S. M. Novella", "trainType": "frecce", "maxResults": 10})for conn in client.dataset(run.default_dataset_id).iterate_items():print(conn["departureTime"], conn["durationMinutes"], conn["price"], len(conn["fareOffers"]))
What does the output look like?
An illustrative row in the dataset's exact shape (values are an example, not a live quote; fareOffers is shortened to two offers).
{"connectionId": "x73eaa9a6-d8cc-4d27-be44-ccf01111f78b","searchDirection": "outbound","origin": "Roma Termini","destination": "Firenze S. M. Novella","departureTime": "2026-11-20T08:05:00.000+01:00","arrivalTime": "2026-11-20T09:46:00.000+01:00","duration": "1h 41min","durationMinutes": 101,"changes": 0,"direct": true,"status": "SALEABLE","price": 29.9,"currency": "EUR","priceIndicative": false,"trains": [{"origin": "Roma Termini","destination": "Firenze S. M. Novella","departureTime": "2026-11-20T08:05:00.000+01:00","arrivalTime": "2026-11-20T09:46:00.000+01:00","trainCategory": "Frecciarossa","trainAcronym": "FR","trainNumber": "9516"}],"fareOffers": [{ "service": "STANDARD", "offer": "ECONOMY", "price": 29.9, "currency": "EUR", "availableSeats": 12, "status": "SALEABLE", "refundable": false, "changeable": true },{ "service": "STANDARD", "offer": "BASE", "price": 55, "currency": "EUR", "availableSeats": 151, "status": "SALEABLE", "refundable": true, "changeable": true }],"adults": 1,"children": 0,"searchedFrom": "Roma Termini","searchedTo": "Firenze S. M. Novella","source": "Trenitalia"}
Pricing: how much does a Trenitalia search cost?
You pay per connection saved, plus a small start fee. Platform usage is included in these prices.
| Event | FREE | BRONZE | SILVER | GOLD |
|---|---|---|---|---|
| Train connection (primary event, per saved row) | $0.005 | $0.004 | $0.003 | $0.002 |
| Actor start (per started GB of allocated memory) | $0.005 | $0.005 | $0.005 | $0.005 |
PLATINUM and DIAMOND plans pay the GOLD price. The default memory is 256 MB, so a normal run pays one start event.
Worked totals on the Free plan:
- Default run, 20 connections: $0.005 + 20 × $0.005 = $0.105.
- Large run, 100 connections: $0.005 + 100 × $0.005 = $0.505 (GOLD: $0.205).
Rejected inputs, empty searches and blocked runs save no rows and charge no connection events. If you set a maximum cost per run, the Actor stops cleanly when it is reached.
How reliable is it, and what are its limits?
- Apify's Store statistics show 28 of 28 runs succeeded in the 30 days before 2026-10-27.
- At most 100 connections and 10 result pages per run; the default is 20 connections and 5 pages.
priceis the starting price Trenitalia reports for the whole connection and passenger mix. UsefareOffersfor class-level prices.- Results depend on Trenitalia's sales horizon: dates far ahead may return no connections yet.
- Prices and seats change quickly. Each row is a snapshot at
searchedAt; confirm on Trenitalia before you buy. - If Trenitalia refuses or rate-limits the search, the run ends
BLOCKED(orPARTIALif some rows were saved) and never fabricates rows.
FAQ
Does it cover Frecciarossa trains?
Yes. Frecciarossa and the other Frecce high-speed trains are included by default; set trainType: "frecce" to keep only them. Each train's category and number are in trains.
Does it include Italo trains?
No. Italo is a separate operator with its own booking system. Use the Italo Train Scraper for Italo fares on the same route.
Can I search a return journey?
Yes. Add returnDate (and optionally returnTime). Return rows carry searchDirection: "return".
What is in fareOffers?
One entry per fare Trenitalia offers on that connection: service class, offer name (for example BASE), price, seats left, sale status and whether it is refundable or changeable. Set includeOffers: false to skip them.
Does it buy Trenitalia tickets?
No. It reads public journey and fare data only. Booking and payment stay on Trenitalia.
Which date does it search by default?
Tomorrow in Italy time, from 08:00. Set departureDate and departureTime for a specific trip.
Can I get regional trains only?
Yes. Set trainType: "regional" to keep regional trains only, or intercity for Intercity trains.
Related Actors
- Italo Train Scraper: Italo high-speed fares by class.
- Deutsche Bahn Train Tickets Scraper: German train tickets and timetables.
- National Rail Tickets Scraper: UK train times and fares.
- FlixBus Tickets Scraper: bus schedules and prices in Italy and Europe.
- Greyhound Bus Tickets, Megabus & Amtrak Scraper: US intercity travel.
- SNCF Scraper: French train schedules and prices.
Legal and responsible use
Use the data for research, comparison and planning at a reasonable volume, and respect Trenitalia's terms and local law. Do not present scraped fares as guaranteed or as a booking. Trenitalia is a trademark of its owner; this independent Actor is not affiliated with or endorsed by Trenitalia.
Last verified: 2026-10-27