Request API access from Rome2rio to obtain an API key; the API is not entirely open and requires partner registration
Send a GET request to the Search API endpoint with origin and destination parameters as place names or geographic coordinates; the API supports version 1.4 of the schema
Parse the response segments array, which was restructured in v1.4; each segment represents a travel leg with mode, operator, duration, and pricing data where available
Note that Rome2rio does not provide live ticket prices or real-time airfares; the price data is indicative and should be supplemented with a live booking API for actual purchase
Use the alternatives field in the response to present non-default routing options such as bus instead of train for a given city pair
Display routing attributions and provider names as required by Rome2rio's partner terms; the API is intended for display and routing intelligence, not for direct ticketing
Known gotchas
Rome2rio provides routing and indicative pricing only — it is not a live booking API; building purchase flows on top of it requires a separate integration with a ticketing provider
The segment structure changed significantly between API versions 1.2 and 1.4; code written against 1.2 will misparse 1.4 responses, particularly around alternatives and transit details
Coverage is strong for major city pairs but sparse for rural or domestic-only transport in some markets; always handle empty segment arrays gracefully rather than assuming a result will exist
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp