Trenitalia Train Tickets Scraper - Fares & Timetables avatar

Trenitalia Train Tickets Scraper - Fares & Timetables

Pricing

from $2.00 / 1,000 train connections

Go to Apify Store
Trenitalia Train Tickets Scraper - Fares & Timetables

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

Muhammad Afzal

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

11 days ago

Last modified

Security

Limited permissions

Share

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).

FieldWhat it holds
connectionId, searchDirectionTrenitalia solution ID and whether the row is outbound or return
origin, destinationStation names as Trenitalia shows them
departureTime, arrivalTimeISO 8601 times with Italy offset
duration, durationMinutes, changes, directJourney length and number of changes
statusSale status, for example SALEABLE
price, currency, priceIndicativeStarting price for the connection and passengers, in EUR
trainsEach train's stations, times, category (for example Frecciarossa), acronym and train number
fareOffersService class, offer name, price, seats left, sale status, refundable and changeable flags
adults, children, searchedFrom, searchedTo, searchedAtThe search that produced the row
source, sourceUrlProvenance

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:

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.

  • departureDate is YYYY-MM-DD in 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 (default 08:00) is the earliest departure.
  • returnDate and returnTime add a reverse-direction search in the same run. maxResults is then split between outbound and return rows.
  • adults (1-10) and children (0-10) set the passengers for the price.
  • trainType keeps all, frecce (high-speed Frecce), intercity or regional trains. directOnly drops connections with changes.
  • sortBy orders by DEPARTURE_DATE, ARRIVAL_DATE or FASTEST.
  • includeOffers (default on) adds every fare offer per connection.
  • maxResults (1-100, default 20) and maxPages (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 os
from apify_client import ApifyClient
client = 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.

EventFREEBRONZESILVERGOLD
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.
  • price is the starting price Trenitalia reports for the whole connection and passenger mix. Use fareOffers for 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 (or PARTIAL if 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.

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