POST /api/rome2rio/routes/search
Price: 5 credits
Plan all the ways to travel between two places with Rome2Rio's multimodal trip planner. Give an origin and destination by name or by coordinates and get every ranked route (train, bus, drive, fly, ferry, rideshare and combinations) with total duration, indicative price ranges by class and currency, per-leg segments and transfers, the transport mode and operating carrier of each leg, service frequency and operating days, the boarding and alighting stops, ticket booking deeplinks and the map polyline of each line. Prices are indicative ranges, not live fares.
Search all travel routes between an origin and destination (by name via origin/destination or by coordinates via origin_pos/destination_pos as 'lat,lng'). Set currency (ISO) and language_code for localized names. Returns routes with name, duration (seconds), transport_kinds, is_connectable, transfer_durations (connection/wait seconds between consecutive segments), origin/destination places, indicative_prices (fare_class, currency_code, price, price_low, price_high), booking_links (ticket deeplinks), booking_configuration (max passengers, age groups), transit_guides (editorial articles) and segments (with per-leg booking_links, booking_configuration and transit_guides) -> options -> hops (vehicle_kind, carrier, line with stops and polyline, frequency, operating_days, codeshares, indicative_prices).
access-token string requiredtimeout integer — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)origin string nullable — Origin place name (city, station, airport) (examples: "New York")origin_pos string nullable — Origin coordinates as 'lat,lng' (examples: "40.7128,-74.0060"; pattern: ^-?\d{1,3}(\.\d+)?,-?\d{1,3}(\.\d+)?$)destination string nullable — Destination place name (city, station, airport) (examples: "Boston")destination_pos string nullable — Destination coordinates as 'lat,lng' (examples: "42.3601,-71.0589"; pattern: ^-?\d{1,3}(\.\d+)?,-?\d{1,3}(\.\d+)?$)currency string — ISO 4217 currency code for indicative prices (default: "USD"; examples: "USD", "EUR", "GBP"; minLength: 3; maxLength: 3)language_code string — Language/locale for localized route and place names (default: "en"; examples: "en", "es", "fr")count integer required — Max number of routes to return (min: 1)@type string (default: "Rome2RioRoute")name string nullablecanonical_name string nullablegrouping_key string nullableduration integer nullableis_connectable boolean nullabletransport_kinds array (default: [])transfer_durations array (default: [])origin object nullable@type string (default: "Rome2RioPlace")short_name string nullablecanonical_name string nullablekind string nullablecode string nullablecountry_code string nullabletime_zone string nullablelatitude number nullablelongitude number nullableradius number nullablenearby_city string nullabledestination object nullable@type string (default: "Rome2RioPlace")short_name string nullablecanonical_name string nullablekind string nullablecode string nullablecountry_code string nullabletime_zone string nullablelatitude number nullablelongitude number nullableradius number nullablenearby_city string nullableindicative_prices array (default: [])@type string (default: "Rome2RioPrice")fare_class string nullablecurrency_code string nullableprice number nullableprice_low number nullableprice_high number nullableis_display boolean nullablebooking_links array (default: [])@type string (default: "Rome2RioBookingLink")link_type string nullableurl string nullableproviders array (default: [])origin_canonical string nullabledestination_canonical string nullabletemplated_parameters array (default: [])booking_configuration object nullable@type string (default: "Rome2RioBookingConfiguration")max_passengers integer nullabledefault_passenger_age integer nullableage_groups array (default: [])@type string (default: "Rome2RioAgeGroup")age integer nullablename string nullabletransit_guides array (default: [])@type string (default: "Rome2RioTransitGuide")guide_title string nullableurl string nullablethumbnail_url string nullabledescription string nullablesegments array (default: [])@type string (default: "Rome2RioSegment")is_major boolean nullableduration integer nullablekind string nullableorigin string nullabledestination string nullableindicative_prices array (default: [])@type string (default: "Rome2RioPrice")fare_class string nullablecurrency_code string nullableprice number nullableprice_low number nullableprice_high number nullableis_display boolean nullablebooking_links array (default: [])@type string (default: "Rome2RioBookingLink")link_type string nullableurl string nullableproviders array (default: [])origin_canonical string nullabledestination_canonical string nullabletemplated_parameters array (default: [])booking_configuration object nullable@type string (default: "Rome2RioBookingConfiguration")max_passengers integer nullabledefault_passenger_age integer nullableage_groups array (default: [])transit_guides array (default: [])@type string (default: "Rome2RioTransitGuide")guide_title string nullableurl string nullablethumbnail_url string nullabledescription string nullableoptions array (default: [])@type string (default: "Rome2RioOption")indicative_prices array (default: [])hops array (default: [])422 — The request body did not validate Check the fields against this schema. A URN with the wrong prefix is the most common cause.408 — The request ran past its time limit Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.412 — No routes found between the given origin and destination Retrying will not help: either the entity does not exist, or the input points at a different one.429 — Too many requests: a rate limit or a usage window is exhausted When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.500 — Something broke on our side Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.529 — Rate limit reached, or the endpoint is overloaded Wait at least 30 seconds, then retry.X-Error — Error message text (present only on error)X-Request-ID — Unique request identifierX-Execution-Time — Execution time in secondsX-Result-Count — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.X-Total-Available-Results — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.X-Warning — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.X-Retry-After — Seconds to wait before retrying. Present only on 429.