Train & Bus Fares: FlixBus, Trenitalia, RegioJet & More
Pricing
from $1.60 / 1,000 journeys
Train & Bus Fares: FlixBus, Trenitalia, RegioJet & More
Journey times, operators, durations, changes, available fares and booking links from FlixBus, Trenitalia, RegioJet and Swiss Transport API. Compare trains and buses by route and date in one call. One schema, time-zone-aware times and a free comparison per trip.
Get journey times, operators, durations, changes, available fares and booking links from FlixBus, Trenitalia, RegioJet and Swiss Transport API. Give it routes and travel dates; get the same fields for every train, bus or coach journey, plus a free comparison for each trip.
FlixBus and RegioJet cover intercity coach routes and rail inventory where available. Trenitalia returns Italian rail fares and some international timetable solutions. Swiss Transport API is an independent public Swiss timetable service: its rows have no fares or seat counts. A source can answer one route and have no coverage for another.
The Actor reads public, signed-out HTTP data only. It does not book a ticket. Tested in Apify's cloud: all four sources answered (Berlin > Prague, Rome > Naples, Zurich > Bern), with fares from FlixBus, RegioJet and Trenitalia.
Use recordType=journey for paid results and recordType=comparison for free summaries. A summary reports per-source counts, cheapest fares by currency, the fastest delivered journey, cheapest per mode and reasons for missing sources. Comparisons cover the limited results delivered, not every possible departure that day.
What you get
| Field | What it holds |
|---|---|
| source / operator | Source key and the operating carrier where identifiable; unknown carriers stay null. |
| mode / modes | train, bus or coach. Coach is an intercity bus. modes lists all modes in a mixed journey; mode favours train when rail is present. |
| from / to | The actual departure and arrival stations returned by the source, which can differ across city-level searches. |
| departAt / arriveAt | ISO 8601 timestamps including UTC offset, using the requested local departure date. |
| durationMinutes / changes | Elapsed minutes and transfers when the source exposes them. Hidden transfers are null, not guessed. |
| price / currency / adults | Party total for the requested adults, in the source currency. Null when there is no public fare. |
| fareClass | Fare name and class when supplied, for example Economy / 2ª Classe Easy. RegioJet search does not label the minimum fare class. |
| seatsLeft / seatsLeftBasis | Seat count where supplied: at-fare or whole-journey. Unlimited/sentinel or absent counts stay null. |
| bookingUrl | Public planner/search or source-supplied booking link. It may require re-entering or checking trip details. |
| tripRequest / rank / scrapedAt | Original normalized route/date, source departure-order rank and UTC collection time. |
| priceBasis / priceNote | Party-total basis, included fees, fixed currency and timetable-only explanations. |
| cheapest / cheapestByCurrency | Free comparison: cheapest overall only with one quoted currency; separate minima for every currency otherwise. |
| bySource / fastest / cheapestPerMode / failedSources | Free comparison: counts, priced counts, source status, fastest journey, mode minima and missing-source reasons. |
What people use it for
- Travel search tools: Show train and coach options from several public planners behind one input and one row schema.
- Trip-planning agents: Ask for a route and date, then use the free comparison to identify cheaper or faster delivered options.
- Fare monitoring: Run the same route and date on a schedule and compare snapshots in your own storage. Prices and availability can change.
- Transport research: Compare travel times, transfers and fares for a set of routes, keeping timetable-only and priced rows distinguishable.
How to use it
- Enter trips as objects with from, to and date, or strings such as Prague > Vienna. Omit date to use tomorrow in Europe/Berlin.
- Choose any of the four sources, the number of adults and the maximum journeys per source and trip. Default: all sources, one adult, five journeys.
- Select a preferred currency. It applies where supported; each returned row states its actual currency.
- Run the Actor. Filter recordType=journey for results or recordType=comparison for free comparisons. Check bySource for coverage and failures.
- Open a booking link and recheck the actual stations, date, passengers, fare conditions and availability before purchasing.
Input
| Field | Example | Notes |
|---|---|---|
| trips | [{"from":"Prague","to":"Vienna","date":"2026-11-19"}] | 1–20 unique trips; also accepts strings such as Prague > Vienna. |
| sources | ["flixbus","regiojet","trenitalia","swiss"] | Default all. Each source is attempted independently. |
| date | "2026-11-19" | Optional default for strings or undated objects. Omit for tomorrow in Europe/Berlin. Per-trip date takes precedence. |
| adults | 1 | 1–5 full-fare adults; no children, discount cards or concessions. |
| maxJourneysPerSource | 5 | 1–100 per source and trip, in departure order. Not a full-day minimum-fare guarantee. |
| currency | "EUR" | FlixBus: selected currency. RegioJet: EUR/CZK, otherwise EUR. Trenitalia: EUR. Swiss: null. |
Output
Each result is one row in the run's dataset (download it as JSON, CSV, Excel, XML or HTML, or read it through the API). An example row (values shortened):
{"recordType": "journey","resultId": "66bde293fdeed043805a74b662f91884d422304e40aab191742d6d6b0716912c","source": "trenitalia","operator": null,"mode": "train","modes": ["train"],"from": "Roma Termini","to": "Napoli Centrale","departAt": "2026-11-19T05:00:00+01:00","arriveAt": "2026-11-19T08:07:00+01:00","durationMinutes": 187.0,"changes": 1,"price": 14.05,"currency": "EUR","fareClass": "Ordinaria / 2ª Classe","seatsLeft": null,"seatsLeftBasis": null,"bookingUrl": "https://www.lefrecce.it/Channels.Website.WEB/?referrer=www.trenitalia.com&lang=en&departureStation=Roma+%28+Tutte+Le+Stazioni+%29&arrivalStation=Napoli+%28+Tutte+Le+Stazioni+%29&departureDate=2026-11-19&adults=1","tripRequest": {"from": "Rome","to": "Naples","date": "2026-11-19"},"adults": 1,"rank": 1,"scrapedAt": "2026-11-12T15:46:32Z","priceBasis": "party-total","priceNote": "Public selected party fare in EUR; ancillary purchases excluded.","journeysCompared": null,"pricedJourneys": null,"bySource": null,"cheapest": null,"cheapestByCurrency": null,"fastest": null,"cheapestPerMode": null,"failedSources": null,"partial": null,"comparisonNote": null}
The example is an unchanged real result from 12 November 2026. All journey and comparison rows share one nullable schema. Here is a real free comparison from the default local test, shortened to the main fields:
{"recordType": "comparison","tripRequest": {"from": "Prague","to": "Vienna","date": "2026-11-19"},"journeysCompared": 10,"pricedJourneys": 10,"partial": true,"failedSources": [{"source": "swiss","status": "not-found","reason": "no matching Swiss timetable station for 'Prague'; fuzzy suggestions are rejected"}],"bySource": [{"source": "flixbus","count": 5,"pricedCount": 5,"status": "ok","reason": null},{"source": "regiojet","count": 5,"pricedCount": 5,"status": "ok","reason": null},{"source": "trenitalia","count": 0,"pricedCount": 0,"status": "empty","reason": null},{"source": "swiss","count": 0,"pricedCount": 0,"status": "not-found","reason": "no matching Swiss timetable station for 'Prague'; fuzzy suggestions are rejected"}],"cheapest": {"source": "regiojet","mode": "coach","departAt": "2026-11-19T07:00:00+01:00","durationMinutes": 280.0,"price": 15.9,"currency": "EUR"},"fastest": {"source": "flixbus","mode": "coach","departAt": "2026-11-19T02:20:00+01:00","durationMinutes": 240.0,"price": 17.48,"currency": "EUR"},"cheapestPerMode": [{"mode": "train","currency": "EUR","price": 16.9,"source": "regiojet"},{"mode": "coach","currency": "EUR","price": 15.9,"source": "regiojet"}]}
SUMMARY in the key-value store contains source outcomes, runtime, traffic and charged event counts. COMPARISONS contains only the free comparison records. Some sources legitimately have no coverage for a route; those reasons remain visible even when other sources succeed.
Pricing
- $0.002 per delivered journey ($2 per 1,000); $0.0018 on Silver and $0.0016 on Gold and higher plans, plus Apify's $0.00005 start.
- A delivered timetable-only journey is also a paid journey. Comparison records, missing sources, failed calls, retries and rejected results are free.
- Searches with no journeys, failed sources and comparisons are free.
What typical jobs cost at the list price:
| Job | Cost |
|---|---|
| Measured default: 10 journeys + 1 comparison | $0.020 |
| Measured all-source test: 21 journeys + 3 comparisons | $0.042 |
| 20 routes × 4 sources × at most 5 journeys | At most 400 journeys: $0.80 |
| 1,000 delivered journeys + free comparisons | $2.00 |
Set Maximum cost per run in Apify. The Actor checks whether one whole journey event fits before delivering it, and still writes free comparisons after stopping. A local $0.006 cap delivered exactly three journeys; a $0.001 cap made no source requests. Comparison.partial flags spending stops and missing coverage.
Tips
- Use city names for FlixBus and RegioJet. City searches can include several stations or airports; compare the actual from and to fields.
- For Trenitalia, use Italian cities or station names. English city aliases Rome, Naples, Milan, Florence, Venice, Turin and Genoa are recognized.
- Use Swiss station names such as Zurich or Bern. Unrelated fuzzy suggestions are rejected rather than substituted.
- If currencies differ, use cheapestByCurrency. The Actor never compares the numeric amounts of EUR, GBP and CZK as if they were equivalent.
- Increase maxJourneysPerSource to see more departures. The first five departures may include overnight connections and need not contain the cheapest fare all day.
- For recurring alerts, retain tripRequest, source, timestamps and resultId in your own database. This build returns snapshots and does not send notifications.
Use it through the API
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("zaiq/train-bus-fares").call(run_input={"trips": ["Prague > Vienna"], "sources": ["flixbus", "regiojet", "trenitalia", "swiss"], "maxJourneysPerSource": 5, "currency": "EUR", "adults": 1})for row in client.dataset(run.default_dataset_id).iterate_items():print(row)
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('zaiq/train-bus-fares').call({"trips": ["Prague > Vienna"], "sources": ["flixbus", "regiojet", "trenitalia", "swiss"], "maxJourneysPerSource": 5, "currency": "EUR", "adults": 1});const { items } = await client.dataset(run.defaultDatasetId).listItems();
HTTP (one call, results back)
curl -X POST 'https://api.apify.com/v2/acts/zaiq~train-bus-fares/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>' \-H 'Content-Type: application/json' \-d '{"trips": ["Prague > Vienna"], "sources": ["flixbus", "regiojet", "trenitalia", "swiss"], "maxJourneysPerSource": 5, "currency": "EUR", "adults": 1}'
Integrations and schedules
- Schedules: run it every hour, day or week from the Apify Console (Schedules) and keep a history of results.
- Make, Zapier, n8n, Google Sheets, Slack, Airtable: connect it through Apify's integrations, or send each finished run to a webhook.
- Datasets: results stay in the run's dataset; export them or read them by API whenever you need them.
Use it with AI agents (MCP)
Add Apify's MCP server with this Actor already pinned (https://mcp.apify.com?tools=zaiq/train-bus-fares) to Claude, ChatGPT, Cursor, VS Code or any MCP client. The agent can find this Actor and run it for you: ask it for "Compare trains and coaches from Prague to Vienna next Thursday. Show the cheapest delivered fare per mode, the fastest journey and any missing sources.". AI agents can also pay for runs directly through Apify's agentic payments.
Limits
- Local direct tests passed, but Apify cloud transport, runtime and operating cost remain unverified. This is an unpublished build.
- Working sources are FlixBus, RegioJet, Trenitalia and Swiss Transport API. Trainline, Omio, Rome2rio, BlaBlaCar Bus, Deutsche Bahn, SNCF Connect, Renfe and Eurostar are not included in this version.
- Only public, signed-out responses are read. A login stops the source. Refused addresses are retired through the shared transport pool; persistent refusal is reported, and other sources continue. No check is solved.
- Swiss Transport API is an independent national timetable service, not SBB fare access. Its prices, currencies and seat counts are null. Some international Trenitalia solutions also lack fares.
- FlixBus prices include the platform fee when the API supplies that total. RegioJet uses priceFrom for the requested full-fare party; account-credit prices are excluded. Trenitalia uses the selected public party fare. Ancillary purchases and later checkout changes may differ.
- Unknown carriers, transfer counts, fare classes and seat counts remain null. In particular, FlixBus third-party train inventory can omit operating-carrier and transfer details.
- Booking links open public planners or source booking pages. The build verifies returned data, not the full interactive checkout or ticket issuance.
- Coverage, advance-booking windows and fare availability depend on the source. An empty result does not prove that no journey exists on another service.
FAQ
Does every row have a price?
No. Swiss timetables and some international Trenitalia results have null price and currency. Delivered journeys are charged, including timetable-only rows.
Are prices per person?
They are party totals for passengers.adults. RegioJet receives one REGULAR tariff per adult; FlixBus and Trenitalia receive the adult count directly.
Can it use Trainline or Omio?
Not in this build. Their tested public data calls refused this Mac, so they are not advertised as working sources. No login session or paid API is used.
Why can cheapest be null?
There may be no priced rows, or prices may use multiple currencies. cheapestByCurrency holds each currency separately.
Why is a source missing?
It may not recognize a place, have no route/date coverage, return a check or error, or be stopped by the spending cap. bySource and failedSources explain the outcome.
Does a city name mean the same station on every source?
No. The row shows the actual stations. FlixBus and RegioJet city searches can include several stops; inspect from and to before comparing.
Does it find the cheapest train or bus all day?
The comparison covers only delivered rows, capped in departure order per source. Increase the limit to examine more departures.
Does it book or pay?
No. It reads public journey information and returns links. Recheck all details on the source website before paying.
Related Actors from Zaiq
- google-flights-scraper: compare air alternatives for a route and date
Support
Questions, a site that changed, or a field you need? Open an issue on this Actor's Issues tab: we answer there, usually within a day.
Also found as: train and bus fares, FlixBus fare API, Trenitalia train prices, RegioJet prices, Swiss train timetable, train bus price comparison, coach journey scraper, public transport journeys API.