Trenitalia Train Ticket and Connection Scraper avatar

Trenitalia Train Ticket and Connection Scraper

Pricing

from $3.00 / 1,000 train connections

Go to Apify Store
Trenitalia Train Ticket and Connection Scraper

Trenitalia Train Ticket and Connection Scraper

Scrape Trenitalia train connections, departure and arrival times, duration, train numbers, current starting prices, service classes, fare offers, availability, and direct or connecting itineraries.

Pricing

from $3.00 / 1,000 train connections

Rating

0.0

(0)

Developer

Muhammad Afzal

Muhammad Afzal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Share

Search Trenitalia routes and export one structured dataset record per train connection. Results include departure and arrival times, duration, direct/connecting status, train categories and numbers, current starting prices, service classes, fare names, fare conditions, and reported seat availability.

This Actor is read-only. It does not log in, reserve seats, modify carts, book journeys, buy tickets, or process payments.

What you can collect

  • Trenitalia connection IDs and sale status
  • departure and arrival station names and timestamps
  • total duration, change count, and direct-train flag
  • starting ticket price and currency
  • every train leg, category, acronym, and train number
  • optional fare offers by service class, including price, refund/change flags, sale status, and reported availability
  • outbound and optional return searches

Input

Provide from and to. Add departureDate for a specific day; when omitted, the Actor searches tomorrow so saved Tasks remain runnable. Times are interpreted in Italy's Europe/Rome time zone.

{
"from": "Roma Termini",
"to": "Firenze S. M. Novella",
"departureDate": "2026-09-10",
"departureTime": "08:00",
"adults": 1,
"children": 0,
"trainType": "all",
"directOnly": false,
"sortBy": "DEPARTURE_DATE",
"includeOffers": true,
"maxResults": 20,
"maxPages": 5
}

Add returnDate and optionally returnTime to run a second, reverse-direction connection search in the same run. For return searches, maxResults is split between outbound and return records. Supported train filters are all, frecce, intercity, and regional. Supported sorting values are DEPARTURE_DATE, ARRIVAL_DATE, and FASTEST.

Output example

{
"connectionId": "x73eaa9a6-d8cc-4d27-be44-ccf01111f78b",
"searchDirection": "outbound",
"origin": "Roma Termini",
"destination": "Firenze S. M. Novella",
"departureTime": "2026-09-10T08:05:00.000+02:00",
"arrivalTime": "2026-09-10T09:46:00.000+02:00",
"duration": "1h 41min",
"durationMinutes": 101,
"changes": 0,
"direct": true,
"status": "SALEABLE",
"price": 55,
"currency": "EUR",
"priceIndicative": false,
"trains": [{
"origin": "Roma Termini",
"destination": "Firenze S. M. Novella",
"departureTime": "2026-09-10T08:05:00.000+02:00",
"arrivalTime": "2026-09-10T09:46:00.000+02:00",
"trainCategory": "Frecciarossa",
"trainAcronym": "FR",
"trainNumber": "9516"
}],
"fareOffers": [{
"service": "STANDARD",
"offer": "BASE",
"price": 55,
"currency": "EUR",
"availableSeats": 151,
"status": "SALEABLE",
"refundable": true,
"changeable": true
}]
}

The OUTPUT key-value-store record reports DATA, EMPTY, PARTIAL, BLOCKED, REJECTED, or FAILED, along with source-page counts, record/event-charge parity, resolved stations, and warnings.

Pricing

The Actor uses pay per event:

  • Actor start: $0.005 per run
  • Train connection: $0.003 per dataset record

A 20-result run costs up to $0.065 in Actor event charges. Apify dataset/storage operations may appear separately under your platform plan. The Actor saves each result before charging and stops when the run's maximum event charge is reached.

Accuracy and limitations

  • Prices and availability are live search snapshots and can change before checkout.
  • price is the starting price Trenitalia reports for the complete connection and selected passenger counts.
  • Station queries resolve through Trenitalia autocomplete. Use the full station name when several stations have similar names.
  • Connections depend on the timetable sales horizon and service availability for the chosen date.
  • The source is Trenitalia's public journey-search flow. Endpoint changes, maintenance, rate limits, or access challenges can temporarily block a run; the Actor reports those conditions instead of fabricating records.
  • Use the data in accordance with Trenitalia's applicable terms, robots/access rules, and local law. Trenitalia is a trademark of its owner; this independent Actor is not affiliated with or endorsed by Trenitalia.

API use

Run the Actor through Apify API, schedules, integrations, or MCP and read the default dataset. maxResults is the hard output bound; maxPages is a second safety bound for source requests.