# Rome2Rio Scraper (`memo23/rome2rio-scraper`) Actor

Scrape Rome2Rio routes between any two places. Each row has the travel mode, duration, price range, stations, badge, and the route link. Paste a search URL or a line like London to Paris. Covers train, bus, flight, ferry, rideshare, and drive. One option is its own row. JSON or CSV out.

- **URL**: https://apify.com/memo23/rome2rio-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 routes

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Scraper

Get every way to travel between two places from Rome2Rio: train, bus, flight, ferry, rideshare, and drive. Each row has the duration, the price range, the stations, and a link back to that route.

#### How it works

![How the Rome2Rio scraper works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-rome2rio.png)

Paste a route such as `London to Paris`, or paste a Rome2Rio search link. You get one row per travel option, ready to export as JSON or CSV.

#### ✨ Why use this scraper?

- Compare train, bus, flight, ferry, rideshare, and drive on the same route
- Duration in plain text and in minutes, so you can sort
- Price range as shown, plus the low and high numbers
- Station-by-station summary, including changes of mode
- A badge when Rome2Rio marks an option best or cheapest
- A direct link to the route, plus the search page it came from

#### 🎯 Use cases

| Who | What they do with it |
| --- | --- |
| Travel planners | Compare modes for a set of city pairs |
| Content sites | Fill "how to get from A to B" pages |
| Route analysts | Track typical durations and price bands |
| Apps | Offer ground-transport options next to flights |

#### 📥 Supported inputs

| Input | Example | What you get |
| --- | --- | --- |
| Route line | `London to Paris` | Every option on that search |
| Search URL | `https://www.rome2rio.com/s/London/Paris` | Same search |
| Map URL | `https://www.rome2rio.com/map/London/Paris` | Read as the same search |

Not supported: tickets, live departure boards, and seat maps. The row is the option Rome2Rio shows on the search, not a booked fare.

#### ⚠️ Proxy requirement

Residential proxies recommended. The default works out of the box.

#### 🔄 How it works

1. Add one route per line, or paste Rome2Rio search links.
2. Set a maximum number of routes.
3. Run the actor.
4. Each travel option is saved as its own row.
5. Export the dataset as JSON, CSV, or Excel.

#### ⚙️ Input parameters

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `routes` | string list | London to Paris, Madrid to Barcelona | One route per line, written as Origin to Destination. A full Rome2Rio URL is accepted on a line too. |
| `startUrls` | string list | a London to Paris search URL | Search or map URLs. Map links are read as the matching search. |
| `maxItems` | integer | 100 | Hard cap on route rows. |
| `maxConcurrency` | integer | 4 | How many searches run at the same time. |
| `proxy` | proxy | Residential, on | Residential proxies recommended. The default works out of the box. |

#### 📊 Output overview

One row is one way to make the trip. A search that shows ten options produces ten rows. `priceLow` and `priceHigh` are the ends of the range printed on the card. `summary` is the station sequence, with each leg separated by a middle dot.

#### 📦 Output sample

This row is from a London to Paris run.

```json
{
  "searchUrl": "https://www.rome2rio.com/s/London/Paris",
  "origin": "London",
  "destination": "Paris",
  "routeName": "Train (Eurostar)",
  "mode": "Train",
  "rank": 1,
  "badge": "best",
  "summary": "Take the train from London St Pancras Intl to Paris Nord",
  "durationText": "2h 28m",
  "durationMinutes": 148,
  "priceText": "$190–320",
  "priceLow": 190,
  "priceHigh": 320,
  "currency": "USD",
  "routeUrl": "https://www.rome2rio.com/map/London/Paris?route=Train"
}
```

#### 🗂 Key output fields

| Field | Meaning |
| --- | --- |
| `origin`, `destination` | The two places on the search |
| `routeName` | Label on the option, such as Train (Eurostar) |
| `mode` | Travel mode. Mixed trips join the modes with `+` |
| `rank` | Position on the search page, starting at 1 |
| `badge` | `best`, `cheapest`, or empty |
| `summary` | Stations and legs |
| `durationText`, `durationMinutes` | Travel time as shown, and the same time in minutes |
| `priceText`, `priceLow`, `priceHigh`, `currency` | The printed range and its numbers |
| `routeUrl` | Link to that option |
| `searchUrl` | Link to the search |

#### ❓ FAQ

**Can I pass city names instead of URLs?**
Yes. `London to Paris` is enough. Spaces in a place name are fine: `New York to Los Angeles`.

**Does a drive option include the ferry or tunnel?**
Yes. The summary lists each leg. A Eurotunnel trip is one row, with the drive, the tunnel, and the drive after it.

**Are the prices booked fares?**
No. They are the ranges Rome2Rio prints on the search. A row does not include a ticket you can buy inside this actor.

**What if a place name itself contains the word "to"?**
Put a full `rome2rio.com/s/...` URL in `startUrls` instead of a route line.

**How many rows does one search produce?**
However many options the page lists, until `maxItems` is reached. London to Paris returned 10 options on the sample run.

#### 💬 Support

Open an issue on the actor page and include the route line plus the run ID: https://console.apify.com/actors/0drx8d0eZGaJPIbma#/issues

#### 🛠 Additional services

Need a fixed list of city pairs on a schedule, or the same routes joined to hotel prices? Say what the export should look like.

#### 🔎 Explore more scrapers

More travel actors from the same publisher are on the Apify Store, including hotel and flight scrapers under the memo23 account.

***

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Rome2Rio, Omio, or any of their subsidiaries or affiliates. All trademarks mentioned are the property of their respective owners.

The scraper accesses only publicly available route pages. No login, no booked tickets, and no content behind a Rome2Rio account. Users are responsible for ensuring their use complies with Rome2Rio's Terms of Service, applicable data-protection law (GDPR, CCPA, and others), and any contractual obligations of their own organisation.

***

### SEO Keywords

Rome2Rio scraper, scrape Rome2Rio, Rome2Rio API, Apify Rome2Rio, Rome2Rio routes, train bus flight comparison, how to get from A to B, ground transport scraper, Eurostar duration, intercity route data, travel time scraper, ferry and drive options, multi-city route planner data, Rome2Rio price range, Omio alternative route data, travel content automation, city pair routes, bus duration scraper, flight plus train routes, rideshare route data

# Actor input Schema

## `routes` (type: `array`):

Each line is Origin to Destination, for example London to Paris. A full rome2rio.com/s or /map URL is accepted too.

## `startUrls` (type: `array`):

Rome2Rio search URLs such as https://www.rome2rio.com/s/London/Paris. Map URLs are accepted and read as the same search.

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

Hard cap on route rows saved. Each travel option on a search page is one row.

## `maxConcurrency` (type: `integer`):

How many search pages to open at the same time.

## `proxy` (type: `object`):

Residential proxies recommended. The default works out of the box.

## Actor input object example

```json
{
  "routes": [
    "London to Paris",
    "Madrid to Barcelona"
  ],
  "startUrls": [
    "https://www.rome2rio.com/s/London/Paris"
  ],
  "maxItems": 100,
  "maxConcurrency": 4,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "routes": [
        "London to Paris",
        "Madrid to Barcelona"
    ],
    "startUrls": [
        "https://www.rome2rio.com/s/London/Paris"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/rome2rio-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 = {
    "routes": [
        "London to Paris",
        "Madrid to Barcelona",
    ],
    "startUrls": ["https://www.rome2rio.com/s/London/Paris"],
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/rome2rio-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 '{
  "routes": [
    "London to Paris",
    "Madrid to Barcelona"
  ],
  "startUrls": [
    "https://www.rome2rio.com/s/London/Paris"
  ]
}' |
apify call memo23/rome2rio-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/rome2rio-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/0drx8d0eZGaJPIbma/builds/zMnVsOUvcRiKIEgw9/openapi.json
