# 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/tools/rome2rio
- Handle: `@rome2rio`
- Category: [Travel](https://fous.com/tools/category/travel)
- Source website: https://rome2rio.com
- Last verified: Sep 29, 2026

## Methods

### Search routes

Operation `search_routes`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

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

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_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.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

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=180) 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.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_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);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/rome2rio`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `search_routes`: Search routes. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-rome2rio https://api.fous.com/mcp/tools/rome2rio --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## 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

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Rome2rio tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. 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. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified 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/tools/flixbus.md): Find and book bus and train trips on FlixBus.
- [Ryanair API](https://fous.com/tools/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/tools/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/tools/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/tools/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/tools/viator.md): Tours, day trips, and experiences.
- [Kayak API](https://fous.com/tools/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/tools/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 tools](https://fous.com/tools/category/travel)
