# Rome2Rio Travel Route Scraper – Schedules & Fares (`rl1987/rome2rio-api-scraper`) Actor

Find every way to get between any two places worldwide — train, bus, plane, taxi, car or walk. One row per route option: modes, ordered segments, operators (FlixBus, Amtrak, Trenitalia), duration, distance and indicative price band. Add real timetables, bookable fares and destination hotels.

- **URL**: https://apify.com/rl1987/rome2rio-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 13 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.46 / 1,000 route option rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Rome2Rio Travel Route Scraper — Trains, Buses, Flights, Taxis & Fares

**Rome2Rio Travel Route Scraper** — Find every way to get from A to B worldwide — train, bus, plane, taxi, car and walk — via Rome2Rio's private mobile API. Each route option carries its segments, operators, duration, distance and indicative price, plus optional timetabled departures and bookable fares. It reads Rome2Rio's own API directly, so it's **fast, reliable and complete** — no flaky HTML parsing, no headless browser. Export to **JSON, CSV, Excel, or an API**.

> Get from anywhere to anywhere — compare every train, bus, flight, taxi and drive option between any two places on earth, with real timetables and bookable fares.

***

### What does this Rome2Rio scraper do?

You give it origin → destination pairs. For each pair it asks Rome2Rio how you can make that
trip and returns **one row per route option** — "Train", "Bus via Kaunas", "Line 28 bus, taxi",
"Fly", "Drive" — with the modes involved, the ordered segments, the operators running them,
duration, distance and the indicative price band. Optionally it adds real departure times,
bookable fares with partner booking links, and hotels at the destination.

- **No code required** — set your input, click **Start**, download your data.
- **Fast & accurate** — reads Rome2Rio's own private API and returns structured JSON, not scraped HTML.
- **Batch trips** — queue many origin→destination pairs in one run, up to your `maxItems` cap.
- **Transparent pay-per-event pricing** — you are charged for what a run delivers; the **Pricing** tab lists the events and their current prices.
- **Export anywhere** — JSON, CSV, Excel, XML, or pull it live via the Apify API.

***

### What can you do with Rome2Rio data?

- **Route coverage research** — which modes and operators actually connect two places.
- **Price & availability monitoring** — track the indicative price band and fares over time.
- **Travel product data** — feed multi-modal options into a planner, comparison page or itinerary tool.
- **Data science** — build clean multi-modal transport datasets across many city pairs.

***

### How do I scrape Rome2Rio routes? (3 steps)

1. **Set your trips** — one `Origin -> Destination` per line, or the single `origin`/`destination` fields.
2. **Pick options** — timetables, bookable fares, hotels, currency, language and a `maxItems` cap.
3. **Run & export** — click **Start**, then download the dataset as JSON/CSV/Excel or fetch it via the API.

***

### Which transport modes and operators does it cover?

The `modes` array on every row uses Rome2Rio's own vehicle kinds. Values returned in practice:

| `modes` value | What it means | Example operators seen in output |
| --- | --- | --- |
| `train` | Rail, incl. high-speed and commuter | Eurostar, Trenitalia, PKP Intercity, LTG Link, Amtrak |
| `bus` | Coach and city bus | FlixBus, Lux Express, Ecolines, Greyhound USA, Kautra |
| `plane` | Scheduled flights | Air Baltic, LOT |
| `taxi` | Taxi / private transfer | All Star Taxi |
| `car` | Self-drive leg | – (no operator) |
| `transfer` | Airport or station transfer leg | varies |
| `walk` | Walking leg between stops | – (no operator) |

Operators come straight from Rome2Rio's carrier data for the hops on the route, so the list you get
depends on the trip — a Vilnius → Warsaw search returns Lux Express and PKP Intercity, a Lancaster →
Washington D.C. search returns Amtrak and Red Rose Transit Authority. Routes with no timetable
(`car`, `walk`) simply carry no operator and no departures.

***

### What do the route fields actually mean?

Rome2Rio's vocabulary is not obvious, so:

- **Route option** — one way of making the trip, e.g. "Train" vs "Bus via Kaunas" vs "Fly". One dataset row.
- **Segment** — one leg of a route option. A "Train, fly" route has two segments; `segmentCount` counts them and `segments` holds the detail (from, to, duration, distance, operators, vehicles).
- **Indicative price band** — Rome2Rio does not quote one fare for a route; it gives a low/high estimate. That is `priceLow` / `priceHigh` in `priceCurrency`. When the API returns a single flat price, `priceLow` and `priceHigh` are equal. It is an estimate, not a bookable price.
- **Bookable fare** — a real, purchasable fare from a booking partner, returned only when **Include bookable fares** is on. Lives in `bookableFares`; `bookingLinks` holds the partner deep-link templates (Omio and friends).
- **Timetabled departure** — an actual dated departure/arrival pair with changes and operators, returned only when **Include timetabled departures** is on. Lives in `departures`, capped at 20 per route.
- **Connectable** (`isConnectable`) — Rome2Rio's flag for whether the route's legs connect as a through journey.
- **Total stay rate vs price per night** — for hotel rows, `totalRate` is the rate for the **whole stay** as Rome2Rio returns it; `pricePerNight` is that divided by `nights`.

***

### Do I need a residential proxy?

Measured against the live API (100 requests direct + 105 through Apify Proxy):

| | Success | p50 latency | Throughput @6 concurrent |
|---|---|---|---|
| **Datacenter (default)** | 20/20 (100%) | 0.28 s | ~890 searches/min |
| **Residential** | 94% (75/80 over 4 back-to-back waves) | 1.62 s | ~112 searches/min |

Rome2Rio's mobile API applies **no IP-reputation blocking** — not a single `403`/`429` came back
from datacenter IPs, and a full 8-trip platform run finished in 54 s with zero retries. So the
**default datacenter proxy is the right choice**; it is ~6x faster and doesn't touch your
residential GB quota.

Choose **RESIDENTIAL** only when you want a specific country's pricing/availability. Budget
\~133 KB of residential transfer per trip (with timetables on) — roughly **78,000 trips per 10 GB**.
The residential failures above were transient proxy-side errors (`ProxyError`/`SSLError`), not
target blocks, and the actor's transport retries them automatically. Avoid pinning one sticky
session: a reused residential exit IP died after ~7 requests, while per-request rotation (what
this actor does by default) held at 94–100% indefinitely.

***

### What input does it take?

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `trips` | array of string | `['London -> Paris']` | One trip per line as "Origin -> Destination", e.g. "London -> Paris". Place names, addresses, airports or "lat,lng" coordinates all work. `->`, `→`, `-->`, `to`, `\|` and `;` are all accepted separators. Takes priority over the single Origin/Destination fields below. |
| `origin` | string | `London` | Single-trip origin — a place name, address, airport or "lat,lng". Ignored when Trips is set. |
| `destination` | string | `Paris` | Single-trip destination — a place name, address, airport or "lat,lng". Ignored when Trips is set. |
| `includeSchedules` | boolean | `false` | Add real departure times for each schedulable route (train/bus/ferry). One extra API call per route. |
| `includeBookable` | boolean | `false` | Add bookable departures with fares and partner booking deep links (Omio and friends). One extra API call per route. |
| `departureDate` | string | – | Date for the timetables, as YYYY-MM-DD (optionally YYYY-MM-DDTHH:MM). Defaults to now. Only used when departures or fares are enabled. |
| `currency` | string | `USD` | ISO currency code for indicative prices and fares, e.g. USD, EUR, GBP. |
| `language` | string | `en` | ISO language code for place and route names, e.g. en, de, fr. |
| `maxItems` | integer | `100` | Maximum route rows to return across all trips. 0 = no limit. |
| `includeHotels` | boolean | `false` | After the routes for a trip, emit hotel rows for its destination — name, stars, review score and nightly rate from Rome2Rio's hotel provider (Booking.com). Billed as a separate hotel-row event. |
| `checkIn` | string | – | Check-in date as YYYY-MM-DD. Defaults to 30 days from the run. Only used when hotels are enabled. |
| `checkOut` | string | – | Check-out date as YYYY-MM-DD. Defaults to two nights after check-in. Only used when hotels are enabled. |
| `hotelAdults` | integer | `2` | Number of adults for the hotel availability search. |
| `maxHotelsPerTrip` | integer | `20` | How many hotel rows to emit for each destination. |
| `proxyConfiguration` | object | Apify Proxy | Route requests through a proxy (Apify Proxy by default). |

#### Example input

```jsonc
{
  "trips": [
    "London -> Paris"
  ],
  "origin": "London",
  "destination": "Paris",
  "includeSchedules": false,
  "includeBookable": false,
  "currency": "USD",
  "language": "en",
  "maxItems": 100,
  "includeHotels": false,
  "hotelAdults": 2,
  "maxHotelsPerTrip": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

***

### What does a row look like?

Each result is a JSON object like this:

```jsonc
{
  "recordType": "route",
  "origin": "London",
  "destination": "Paris",
  "routeName": "Train",
  "modes": [
    "train"
  ],
  "durationMinutes": 148,
  "distanceKm": 450.4,
  "priceLow": 130.0,
  "priceHigh": 230.0,
  "priceCurrency": "EUR",
  "originStation": "London St Pancras Intl",
  "destinationStation": "Paris Nord",
  "segmentCount": 1,
  "segments": [
    {
      "index": 1,
      "modes": [
        "train"
      ],
      "from": "London St Pancras Intl",
      "to": "Paris Nord",
      "durationMinutes": 148,
      "distanceKm": 450.4,
      "operators": [
        "Eurostar"
      ],
      "vehicles": [
        "train"
      ]
    }
  ],
  "operators": [
    "Eurostar"
  ],
  "isConnectable": false,
  "canonicalName": "Train",
  "departures": [
    {
      "departure": "2026-08-21T09:31",
      "arrival": "2026-08-21T12:55",
      "durationMinutes": 144,
      "transitKind": "train",
      "from": "LONDON ST PANCRAS INTL",
      "to": "PARIS NORD",
      "operators": [
        "Eurostar"
      ],
      "changes": 0,
      "itineraryId": "B0D0DFFC"
    },
    "…+19 more"
  ],
  "bookableFares": [],
  "bookingLinks": [
    {
      "type": "tickets",
      "providers": [
        "Omio"
      ],
      "urlTemplate": "https://www.rome2rio.com/redirects/omio/?oDateTime={oDateTime}&iDateTime={iDateTime}&adults={adults}&seniors={seniors}&youths={youths}&ages={ages}&checkoutEx…",
      "templatedParameters": [
        "adults",
        "ages",
        "…+5 more"
      ],
      "originCanonical": "London St Pancras Intl",
      "destinationCanonical": "Paris Nord"
    }
  ],
  "searchedAt": "2026-08-21T07:59:26Z"
}
```

***

### Which fields are in the dataset?

Route rows (`recordType: "route"`) fill the first block; hotel rows (`recordType: "hotel"`,
only when hotels are enabled) fill the second.

| Field | Type | Description |
| --- | --- | --- |
| `recordType` | text | `route` or `hotel` |
| `origin` | text | Origin |
| `destination` | text | Destination |
| `routeName` | text | Route |
| `modes` | array | Modes |
| `durationMinutes` | number | Duration (min) |
| `distanceKm` | number | Distance (km) |
| `priceLow` | number | Price low |
| `priceHigh` | number | Price high |
| `priceCurrency` | text | Currency |
| `originStation` | text | Departs from |
| `destinationStation` | text | Arrives at |
| `segmentCount` | number | Segments |
| `segments` | array | Segment detail |
| `operators` | array | Operators |
| `isConnectable` | text | Connectable |
| `canonicalName` | text | Canonical name |
| `departures` | array | Timetabled departures |
| `bookableFares` | array | Bookable fares |
| `bookingLinks` | array | Booking links |
| `searchedAt` | text | Searched at |
| `hotelName` | text | Hotel |
| `hotelId` | text | Hotel ID |
| `hotelRating` | number | Stars |
| `hotelReviewScore` | number | Review score |
| `hotelReviewCount` | number | Reviews |
| `totalRate` | number | Total stay rate |
| `pricePerNight` | number | Price / night |
| `nights` | number | Nights |
| `hotelProvider` | text | Provider |
| `hotelCity` | text | City |
| `latitude` | number | Latitude |
| `longitude` | number | Longitude |
| `checkIn` | text | Check-in |
| `checkOut` | text | Check-out |
| `hotelDistrict` | text | District |
| `freeCancellation` | text | Free cancellation |
| `hotelImage` | link | Image |

***

### How much does it cost?

The current price of every event is on the **Pricing** tab of this Actor's page in Apify Store. That tab is generated from the Actor's own pricing record, so it is always current, and your plan's rung is applied automatically. A figure repeated here would be a second copy that drifts out of date.

You can cap what any single run may spend with **Max total charge**.

### How do I run it from my own code?

Run it programmatically with the [Apify API](https://docs.apify.com/api/v2):

```bash
curl -X POST "https://api.apify.com/v2/acts/rome2rio-api-scraper/runs?token=YOUR_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "trips": [
    "London -> Paris"
  ],
  "includeSchedules": true,
  "currency": "USD",
  "language": "en",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}'
```

Or with the Apify CLI: `apify call rome2rio-api-scraper -i input.json -o`.

***

### FAQ

**Do I need a Rome2Rio account or API key?**

No. The actor carries the mobile app's own credentials and talks to Rome2Rio's API for you — all you need is an Apify account.

**How do I scrape many city pairs at once?**

Put one `Origin -> Destination` per line in the **Trips** field. Each trip is searched in turn and its rows are pushed as soon as they land, so a 50-trip run streams results rather than waiting for the end. `maxItems` caps the total route rows across all trips (0 = no limit).

**What happens if a place name can't be resolved?**

That trip is logged as a warning and skipped, and the run continues with the remaining trips — one bad line in a batch of fifty doesn't cost you the other forty-nine. If *every* trip fails to resolve and nothing at all was produced, the run fails loudly rather than handing you a silent empty dataset. The same applies to the handful of city pairs Rome2Rio's own backend answers with an error (it reproduces for anything touching Louisville, Kentucky, at the time of writing).

**Can I get actual departure times and prices I can book?**

Yes, with two separate switches. **Include timetabled departures** adds dated departure/arrival times with changes and operators (up to 20 per route). **Include bookable fares** adds purchasable fares and partner booking deep links. Both cost one extra API call per route, so leave them off if you only need the route shape and the indicative price band.

**Does it cover ferries and rideshares?**

It returns whatever Rome2Rio has for the pair, using Rome2Rio's own mode names. Modes confirmed in output are `train`, `bus`, `plane`, `taxi`, `car`, `transfer` and `walk`; modes with no timetable (`car`, `walk`) never carry departures. If Rome2Rio shows a ferry or rideshare leg for a route, it comes through as a segment like any other — but check `modes` rather than assuming coverage for a given pair.

**Can I schedule it?**

Yes — use Apify's scheduler to run it hourly/daily, or trigger it from your own code via the API. Pair it with a webhook to push each finished dataset into your pipeline.

**How is the cost bounded?**

You pay per row, and `maxItems` sets the hard ceiling on route rows for a run (`maxHotelsPerTrip` does the same for hotels). Set both and you know your maximum bill before you start.

**Is scraping this legal?**

You are responsible for how you use the data. Scrape only public travel route data and comply with Rome2Rio.com's Terms and applicable law (e.g. GDPR/CCPA for personal data).

***

### How does it work under the hood?

The actor impersonates Rome2Rio's official app and calls its private API the same way the app
does — route search, then the schedules, ticketable-schedules, configs and hotel-list endpoints for
the optional extras — then normalises each response into the flat record above. Per-route timetable
fetches run six at a time rather than serially. No browser, no HTML scraping — just clean,
structured data.

***

### Good to know

- Scrape only public travel route data and respect Rome2Rio.com's Terms of Service and robots policy.
- For personal data, comply with GDPR/CCPA and applicable law — you are the data controller.
- Fields can be `null` when Rome2Rio doesn't expose them for a given record.

***

### Found this useful?

Give the **Rome2Rio Travel Route Scraper** a star on Apify and check out my other `apify-*-api-scraper` actors.

# Actor input Schema

## `trips` (type: `array`):

One trip per line as "Origin -> Destination", e.g. "London -> Paris". Place names, addresses, airports or "lat,lng" coordinates all work. Takes priority over the single Origin/Destination fields below.

## `origin` (type: `string`):

Single-trip origin — a place name, address, airport or "lat,lng". Ignored when Trips is set.

## `destination` (type: `string`):

Single-trip destination — a place name, address, airport or "lat,lng". Ignored when Trips is set.

## `includeSchedules` (type: `boolean`):

Add real departure times for each schedulable route (train/bus/ferry). One extra API call per route.

## `includeBookable` (type: `boolean`):

Add bookable departures with fares and partner booking deep links (Omio and friends). One extra API call per route.

## `departureDate` (type: `string`):

Date for the timetables, as YYYY-MM-DD (optionally YYYY-MM-DDTHH:MM). Defaults to now. Only used when departures or fares are enabled.

## `currency` (type: `string`):

ISO currency code for indicative prices and fares, e.g. USD, EUR, GBP.

## `language` (type: `string`):

ISO language code for place and route names, e.g. en, de, fr.

## `maxItems` (type: `integer`):

Maximum route rows to return across all trips. 0 = no limit.

## `includeHotels` (type: `boolean`):

After the routes for a trip, emit hotel rows for its destination — name, stars, review score and nightly rate from Rome2Rio's hotel provider (Booking.com). Billed as a separate hotel-row event.

## `checkIn` (type: `string`):

Check-in date as YYYY-MM-DD. Defaults to 30 days from the run. Only used when hotels are enabled.

## `checkOut` (type: `string`):

Check-out date as YYYY-MM-DD. Defaults to two nights after check-in. Only used when hotels are enabled.

## `hotelAdults` (type: `integer`):

Number of adults for the hotel availability search.

## `maxHotelsPerTrip` (type: `integer`):

How many hotel rows to emit for each destination.

## `proxyConfiguration` (type: `object`):

Route requests through Apify Proxy. The default (datacenter) is measured to work fine — Rome2Rio's mobile API applies no IP-reputation blocking, and datacenter runs ~6x faster than residential (p50 0.28s vs 1.62s). Pick RESIDENTIAL only if you need a specific country's pricing/availability; it also draws on your residential GB quota (~133 KB per trip).

## Actor input object example

```json
{
  "trips": [
    "London -> Paris"
  ],
  "origin": "London",
  "destination": "Paris",
  "includeSchedules": false,
  "includeBookable": false,
  "departureDate": "",
  "currency": "USD",
  "language": "en",
  "maxItems": 100,
  "includeHotels": false,
  "checkIn": "",
  "checkOut": "",
  "hotelAdults": 2,
  "maxHotelsPerTrip": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "trips": [
        "London -> Paris"
    ],
    "origin": "London",
    "destination": "Paris",
    "departureDate": "",
    "checkIn": "",
    "checkOut": "",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/rome2rio-api-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "trips": ["London -> Paris"],
    "origin": "London",
    "destination": "Paris",
    "departureDate": "",
    "checkIn": "",
    "checkOut": "",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/rome2rio-api-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "trips": [
    "London -> Paris"
  ],
  "origin": "London",
  "destination": "Paris",
  "departureDate": "",
  "checkIn": "",
  "checkOut": "",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rl1987/rome2rio-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/rome2rio-api-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/DAuX497eQnfu2Ir8w/builds/Vb8huO35IFjo1CHGq/openapi.json
