# Rome2rio API

> Rome2rio returns travel routes, indicative prices, travel times, and operators as a workflow and API.

Rome2rio finds route options between an origin and destination, with travel times, indicative prices, and identifiable operators. Search routes requires an origin and destination; you can also choose a currency and maximum number of results.

- Page: https://fous.com/workflows/rome2rio
- Handle: `@rome2rio`
- Category: [Travel](https://fous.com/workflows/category/travel)
- Source website: https://rome2rio.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Rome2rio.

## Methods

### Search routes

Operation `search_routes`, version 1. 1 credit per call.

Find ways to travel between two places, with travel time, indicative prices and operators shown by Rome2rio. Prices and availability can change; operators are included when identifiable on the public page.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `origin` | string | yes | `"Florence"` | Starting place, for example Florence. |
| `currency` | string | no | `"USD"` | Three-letter currency for displayed prices, for example EUR. Default USD. |
| `destination` | string | yes | `"Venice"` | Destination place, for example Venice. |
| `max_results` | integer | no | `10` | Maximum number of route options, for example 10. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "origin",
    "destination"
  ],
  "properties": {
    "origin": {
      "type": "string",
      "title": "From",
      "minLength": 1,
      "description": "Starting place, for example Florence.",
      "examples": [
        "Florence",
        "London"
      ]
    },
    "currency": {
      "type": "string",
      "default": "USD",
      "pattern": "^[A-Za-z]{3}$",
      "description": "Three-letter currency for displayed prices, for example EUR. Default USD.",
      "examples": [
        "USD",
        "EUR"
      ]
    },
    "destination": {
      "type": "string",
      "title": "To",
      "minLength": 1,
      "description": "Destination place, for example Venice.",
      "examples": [
        "Venice",
        "Paris"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum number of route options, for example 10.",
      "x-fous-developer": true,
      "examples": [
        10,
        5
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "origin": "Florence",
      "currency": "USD",
      "destination": "Venice",
      "max_results": 10
    },
    {
      "origin": "London",
      "currency": "EUR",
      "destination": "Paris",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `routes` | array |  |  |
| `routes[].link` | string | `"https://www.rome2rio.com/map/Florence-Italy/Venice?route=Train"` |  |
| `routes[].currency` | string | `"USD"` |  |
| `routes[].operators` | array |  |  |
| `routes[].price_low` | number or null | `30` |  |
| `routes[].transfers` | integer or null | `0` |  |
| `routes[].main_modes` | array |  |  |
| `routes[].price_high` | number or null | `70` |  |
| `routes[].travel_time` | string or null | `"2h 14m"` |  |
| `routes[].route_summary` | string | `"Train"` |  |
| `routes[].travel_time_minutes` | integer or null | `134` |  |
| `to_place` | string | `"Venice"` |  |
| `from_place` | string | `"Florence"` |  |

**Example input**

```json
{
  "origin": "Florence",
  "currency": "USD",
  "destination": "Venice",
  "max_results": 10
}
```

**Example output**

```json
{
  "routes": [
    {
      "link": "https://www.rome2rio.com/map/Florence-Italy/Venice?route=Train",
      "currency": "USD",
      "operators": [
        "Trenitalia Frecce"
      ],
      "price_low": 30,
      "transfers": 0,
      "main_modes": [
        "Train"
      ],
      "price_high": 70,
      "travel_time": "2h 14m",
      "route_summary": "Train",
      "travel_time_minutes": 134
    },
    {
      "link": "https://www.rome2rio.com/map/Florence-Italy/Venice?route=Rideshare",
      "currency": "USD",
      "operators": [],
      "price_low": 17,
      "transfers": 0,
      "main_modes": [
        "Rideshare"
      ],
      "price_high": 17,
      "travel_time": "3h 19m",
      "route_summary": "Rideshare",
      "travel_time_minutes": 199
    },
    {
      "link": "https://www.rome2rio.com/map/Florence-Italy/Venice?route=Bus",
      "currency": "USD",
      "operators": [
        "FlixBus"
      ],
      "price_low": 24,
      "transfers": 0,
      "main_modes": [
        "Bus"
      ],
      "price_high": 40,
      "travel_time": "4h 5m",
      "route_summary": "Bus",
      "travel_time_minutes": 245
    }
  ],
  "to_place": "Venice",
  "from_place": "Florence"
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@rome2rio",
  "visibility": "public",
  "operation": "search_routes",
  "version": 1,
  "input": {
    "origin": "Florence",
    "currency": "USD",
    "destination": "Venice",
    "max_results": 10
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@rome2rio\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_routes\",\n  \"version\": 1,\n  \"input\": {\n    \"origin\": \"Florence\",\n    \"currency\": \"USD\",\n    \"destination\": \"Venice\",\n    \"max_results\": 10\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@rome2rio",
  "visibility": "public",
  "operation": "search_routes",
  "version": 1,
  "input": {
    "origin": "Florence",
    "currency": "USD",
    "destination": "Venice",
    "max_results": 10
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@rome2rio","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare travel times between two places
- Estimate route prices in a chosen currency
- Review route options and transfers
- Identify operators listed for route options

## FAQ

### Is Fous affiliated with Rome2rio?

No. Fous is not affiliated with Rome2rio. This workflow reads the public rome2rio.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Rome2rio account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from rome2rio.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What travel options connect two places?

Search routes returns route options between an origin and destination.

### How long do routes take?

Search routes returns travel times for route options.

### What are the indicative prices for routes?

Search routes returns indicative low and high prices, displayed in the chosen currency or USD by default.

## Related

- [FlixBus API](https://fous.com/workflows/flixbus.md): Find and book bus and train trips on FlixBus.
- [Ryanair API](https://fous.com/workflows/ryanair.md): Ryanair provides flights and fares, including lowest one-way prices by destination or day for selected dates; prices and availability can change.
- [Transport for London API](https://fous.com/workflows/transport-for-london.md): Transport for London reports current or currently published future-day service status and ordered journey options with directions and adult pay-as-you-go fares when available.
- [Google Maps API](https://fous.com/workflows/google-maps.md): Google Maps returns nearby places, public place details, up to 100 public reviews, and up to three routes; transit options vary by departure time.
- [Trip.com API](https://fous.com/workflows/trip-com.md): Trip.com offers hotel and flight bookings, with hotel listings limited to initial public results and prices and fares subject to change.
- [Viator API](https://fous.com/workflows/viator.md): Tours, day trips, and experiences.
- [Kayak API](https://fous.com/workflows/kayak.md): Kayak compares flight and hotel prices across booking sites and current rental car offers; hotel rates assume two adults per room and cover public location pages, while prices and availability can change at booking.
- [Expedia API](https://fous.com/workflows/expedia.md): Expedia helps travelers find hotels, vacation stays, and travel deals, with hotel prices and flight options for selected destinations and dates; flight listings may be limited.
- [All Travel workflows](https://fous.com/workflows/category/travel)
