Omio Search API
Our Omio Search API allows you to scrape train, bus, flight, and ferry journeys from Omio search results, for one-way trips and round trips.
The API endpoint is https://serpapi.com/search?engine=omio
Head to the playground for a live and interactive demo.
API parameters
Search query
departure_id
Required
Parameter defines the departure place. It's an Omio place ID of a city, a station, an airport, or a port (e.g., 376217 for Berlin, or 334196 for Berlin Hbf). A city includes all its stations, airports, and ports.
The id of every station in the results is a place ID. Omio's route pages also have them in the departure_fk and arrival_fk fields of their search form (e.g., Berlin to Munich).
Localization
hl
Optional
Parameter defines the language of the results, like the language selected on Omio (e.g., en for English (US), en-gb for English (UK), or de for German). It defaults to en. Head to the Omio languages page for a full list of supported languages.
currency
Optional
Parameter defines the currency of the returned prices. It defaults to the currency Omio uses for the language (e.g., USD for en, GBP for en-gb, or EUR for de). Head to the Omio currencies page for a full list of supported currency codes.
Dates and times
outbound_date
Required
Parameter defines the outbound date. The format is YYYY-MM-DD (e.g., 2026-12-09).
return_date
Optional
Parameter defines the return date, for a round trip. The format is YYYY-MM-DD (e.g., 2026-12-12). It can't be earlier than outbound_date.
Round trip results are the outbound journeys, with the outbound price. Use the departure_token of a journey to get its return journeys.
outbound_time
Optional
Parameter defines the time Omio searches outbound trains from, like "Depart at" on Omio. The format is HH:MM (e.g., 14:00). On routes where Omio searches trains in a time window, the window starts at this time (usually 08:00 without it). The results have every train Omio returns, including trains that depart outside the window. Other routes have all the trains of the day, whatever this time. It doesn't apply to buses, flights, or ferries.
return_time
Optional
Parameter defines the time Omio searches return trains from, like "Depart at" on Omio. The format is HH:MM (e.g., 16:00). On routes where Omio searches trains in a time window, the window starts at this time (usually 12:00 without it). The results have every train Omio returns, including trains that depart outside the window. Other routes have all the trains of the day, whatever this time. It can only be used with return_date.
Number of passengers
adults
Optional
Parameter defines the number of adults (ages 26 to 57). It defaults to 1 when youth_ages and senior_ages aren't set, and to 0 otherwise.
There can be up to 9 passengers in total.
Get return journeys
departure_token
Optional
Parameter is used to select an outbound journey and get its return journeys. Find this token in the round trip results. It must be used with the same parameters as the search the token comes from, including return_date. Head to the Omio Round Trips API page for more details.
SerpApi parameters
no_cache
Optional
Parameter will force SerpApi to fetch the Omio results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.
async
Optional
Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.
zero_trace
Optional
Enterprise only. Parameter enables ZeroTrace mode. It can be set to false (default) or true. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.
output
Optional
Parameter defines the format of the result. It can be set to json (default) to get a structured JSON of the results, html to get the raw HTML retrieved, or md to get a Markdown-formatted version optimized for LLMs and AI agents.
json_restrictor
Optional
Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
API results
JSON results
JSON output includes structured data for Journeys (trains, buses, flights, and ferries) and Round Trips.
A search status is accessible through search_metadata.status.
It flows this way: Processing -> Success || Error.
If a search has failed, error will contain an error message.
search_metadata.id is the search ID inside SerpApi.
HTML results
This API does not have a full HTML response, only text.
search_metadata.prettify_html_file contains a link to the prettified version of the result.
It is displayed in the playground.
Markdown results
Markdown output is optimized for LLMs and AI agents. It provides a curated view of the JSON results
in a token-efficient format using tables, markdown links, and YAML frontmatter.
To access, use the output=md parameter, the /search.md endpoint, or request header Accept: text/markdown.
API examples
Result for departure_id: 376217, arrival_id: 376946, and outbound_date
Places are Omio place IDs: 376217 is Berlin and 376946 is Munich. A city includes all its stations, airports, and ports, and the id of each station in the results can be searched too. Journeys are in trains, buses, flights, and ferries, like the tabs on Omio, in Omio's order: flights in Omio's recommended order, and other journeys by departure time. Times are local to each station. price includes taxes, like the total on Omio's booking page; Omio's results show prices without taxes to visitors in the United States. booking_link opens the journey on Omio, to choose a fare and book it.
{
...
"trains": [
{
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 08:36"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 13:20"
},
"total_duration": 284,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"segments": [
{
"travel_mode": "train",
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 08:36"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 13:20"
},
"duration": 284,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 1005"
}
],
"price": 78.18,
"booking_link": "https://www.omio.com/app/search-frontend/journey/train/16757147/E09609AB585794F8ABE5AF1B9FE6CCC82/-8583056477019539070?locale=en&origin_domain=com"
},
...
],
"buses": [
{
"departure_station": {
"name": "Berlin, Bahnhof Südkreuz",
"id": "8596206",
"time": "2027-01-02 07:15"
},
"arrival_station": {
"name": "München, Fröttmaning P+R Parkplatz",
"id": "16811044",
"time": "2027-01-02 17:35"
},
"total_duration": 620,
"company": "FlixBus",
"company_logo": "https://static.omio.design/web/logos/63/meinfernbus_flixbus.png",
"segments": [
{
"travel_mode": "bus",
"departure_station": {
"name": "Berlin, Bahnhof Südkreuz",
"id": "8596206",
"time": "2027-01-02 07:15"
},
"arrival_station": {
"name": "Praha, ÚAN Florenc",
"id": "3346249",
"time": "2027-01-02 11:40"
},
"duration": 265,
"company": "FlixBus",
"company_logo": "https://static.omio.design/web/logos/63/meinfernbus_flixbus.png",
"transport_id": "FlixBus"
},
{
"travel_mode": "bus",
"departure_station": {
"name": "Praha, ÚAN Florenc",
"id": "3346249",
"time": "2027-01-02 12:50"
},
"arrival_station": {
"name": "München, Fröttmaning P+R Parkplatz",
"id": "16811044",
"time": "2027-01-02 17:35"
},
"duration": 285,
"company": "FlixBus",
"company_logo": "https://static.omio.design/web/logos/63/meinfernbus_flixbus.png",
"transport_id": "FlixBus"
}
],
"layovers": [
{
"name": "Praha, ÚAN Florenc",
"id": "3346249",
"duration": 70
}
],
"price": 50.11,
"booking_link": "https://www.omio.com/app/search-frontend/journey/bus/-1426201817/E09609AB585794F8ABE5AF1B9FE6CCC82/-3598404759741043068?locale=en&origin_domain=com"
},
...
],
"flights": [
{
"departure_station": {
"name": "Berlin Brandenburg Airport",
"id": "17134736",
"iata_code": "BER",
"time": "2027-01-02 09:55"
},
"arrival_station": {
"name": "Munich Airport",
"id": "313870",
"iata_code": "MUC",
"time": "2027-01-02 11:05"
},
"total_duration": 70,
"company": "Lufthansa",
"company_logo": "https://static.omio.design/web/logos/63/lufthansa.png",
"segments": [
{
"travel_mode": "flight",
"departure_station": {
"name": "Berlin Brandenburg Airport",
"id": "17134736",
"iata_code": "BER",
"time": "2027-01-02 09:55"
},
"arrival_station": {
"name": "Munich Airport",
"id": "313870",
"iata_code": "MUC",
"time": "2027-01-02 11:05"
},
"duration": 70,
"company": "Lufthansa",
"company_logo": "https://static.omio.design/web/logos/63/lufthansa.png",
"transport_id": "LH1949"
}
],
"price": 132.92,
"booking_link": "https://www.omio.com/app/search-frontend/journey/flight/-1755217715/E09609AB585794F8ABE5AF1B9FE6CCC82/5682424172165866949?locale=en&origin_domain=com"
},
...
],
...
}
Result for outbound_time: 14:00
On some routes, Omio searches trains in a time window, which usually starts at 08:00. outbound_time moves the start of the window, like "Depart at" on Omio. Trains Omio returns outside the window are in the results too. Buses, flights, and ferries are always for the whole day.
{
...
"trains": [
{
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 14:37"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 19:18"
},
"total_duration": 281,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"segments": [
{
"travel_mode": "train",
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 14:37"
},
"arrival_station": {
"name": "Nuremberg Hbf",
"id": "329690",
"time": "2027-01-02 17:22"
},
"duration": 165,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 1101"
},
{
"travel_mode": "train",
"departure_station": {
"name": "Nuremberg Hbf",
"id": "329690",
"time": "2027-01-02 17:36"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 19:18"
},
"duration": 102,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 1205"
}
],
"layovers": [
{
"name": "Nuremberg Hbf",
"id": "329690",
"duration": 14
}
],
"price": 91.22,
"booking_link": "https://www.omio.com/app/search-frontend/journey/train/355597220/LCCCF624E2B6D4470BF67E44CB23DEC9B/-4474350196869935049?locale=en&origin_domain=com"
},
{
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 14:37"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 19:19"
},
"total_duration": 282,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"segments": [
{
"travel_mode": "train",
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 14:37"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 19:19"
},
"duration": 282,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 1101"
}
],
"price": 91.22,
"booking_link": "https://www.omio.com/app/search-frontend/journey/train/2118673989/LCCCF624E2B6D4470BF67E44CB23DEC9B/-4295337158803882505?locale=en&origin_domain=com"
},
...
],
...
}
Result for return_date: round trip
Round trip results are the outbound journeys, with the price of the outbound journey, like on Omio. Each journey has a departure_token to get its return journeys, instead of a booking_link.
{
...
"trains": [
{
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 08:36"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 13:20"
},
"total_duration": 284,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"segments": [
{
"travel_mode": "train",
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 08:36"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 13:20"
},
"duration": 284,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 1005"
}
],
"price": 78.18,
"departure_token": "-8583056477019539070"
},
{
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 09:37"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 14:21"
},
"total_duration": 284,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"segments": [
{
"travel_mode": "train",
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 09:37"
},
"arrival_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-02 14:21"
},
"duration": 284,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 1505"
}
],
"price": 91.22,
"departure_token": "-6547174371218490557"
},
...
],
...
}
Result for departure_token: return journeys
With the same parameters and the departure_token of an outbound journey, the results are the return journeys, in the travel mode of the outbound journey. price is the price of the return journey, total_price the price of the round trip, and booking_link opens the round trip on Omio.
{
...
"trains": [
{
"departure_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-05 12:34"
},
"arrival_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-05 17:23"
},
"total_duration": 289,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"segments": [
{
"travel_mode": "train",
"departure_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-05 12:34"
},
"arrival_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-05 17:23"
},
"duration": 289,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 1006"
}
],
"price": 52.12,
"total_price": 130.3,
"booking_link": "https://www.omio.com/app/search-frontend/journey/train/1603796686/EAE68861029914FEEACF3500B69E7F699/-8583056477019539070/-1866535841138432838?locale=en&origin_domain=com"
},
{
"departure_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-05 12:38"
},
"arrival_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-05 17:23"
},
"total_duration": 285,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"segments": [
{
"travel_mode": "train",
"departure_station": {
"name": "Munich Hbf",
"id": "329668",
"time": "2027-01-05 12:38"
},
"arrival_station": {
"name": "Nuremberg Hbf",
"id": "329690",
"time": "2027-01-05 14:26"
},
"duration": 108,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 588"
},
{
"travel_mode": "train",
"departure_station": {
"name": "Nuremberg Hbf",
"id": "329690",
"time": "2027-01-05 14:36"
},
"arrival_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-05 17:23"
},
"duration": 167,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 1006"
}
],
"layovers": [
{
"name": "Nuremberg Hbf",
"id": "329690",
"duration": 10
}
],
"price": 52.12,
"total_price": 130.3,
"booking_link": "https://www.omio.com/app/search-frontend/journey/train/1794632387/EAE68861029914FEEACF3500B69E7F699/-8583056477019539070/7772641989346563892?locale=en&origin_domain=com"
},
...
],
...
}
Result for departure_id: 388317 and arrival_id: 17193649: ferries and car pooling
Naples (388317) to Capri (17193649) is served by ferries. Omio lists car pooling rides, like BlaBlaCar, with the buses, with car_pooling set to true. Their meeting points have no id: Omio only knows them by their address.
{
...
"ferries": [
{
"departure_station": {
"name": "Naples Beverello",
"id": "16863098",
"time": "2027-01-02 07:00"
},
"arrival_station": {
"name": "Port of Capri",
"id": "16878135",
"time": "2027-01-02 07:50"
},
"total_duration": 50,
"company": "Snav",
"company_logo": "https://static.omio.design/web/logos/63/snavc.png",
"segments": [
{
"travel_mode": "ferry",
"departure_station": {
"name": "Naples Beverello",
"id": "16863098",
"time": "2027-01-02 07:00"
},
"arrival_station": {
"name": "Port of Capri",
"id": "16878135",
"time": "2027-01-02 07:50"
},
"duration": 50,
"company": "Snav",
"company_logo": "https://static.omio.design/web/logos/63/snavc.png",
"transport_id": "SNAV JET"
}
],
"price": 30.42,
"booking_link": "https://www.omio.com/app/search-frontend/journey/ferry/1088309935/E60B29042D8B64F8EB2EB06430338E170/5135514628339925268?locale=en&origin_domain=com"
},
...
],
"buses": [
{
"departure_station": {
"name": "Casagiove - Piazza degli Eroi, 9, Casagiove CE",
"id": "690100087",
"time": "2027-01-02 15:00"
},
"arrival_station": {
"name": "Angri - Via dei Goti, 164, Angri SA",
"time": "2027-01-02 15:40"
},
"total_duration": 40,
"company": "BlaBlaCar",
"company_logo": "https://static.omio.design/web/logos/63/blablacar.png",
"car_pooling": true,
"segments": [
{
"travel_mode": "bus",
"departure_station": {
"name": "Casagiove - Piazza degli Eroi, 9, Casagiove CE",
"id": "690100087",
"time": "2027-01-02 15:00"
},
"arrival_station": {
"name": "Angri - Via dei Goti, 164, Angri SA",
"time": "2027-01-02 15:40"
},
"duration": 40,
"company": "BlaBlaCar",
"company_logo": "https://static.omio.design/web/logos/63/blablacar.png"
}
],
"price": 6.04,
"booking_link": "https://www.omio.com/app/search-frontend/journey/bus/-1866130263/E60B29042D8B64F8EB2EB06430338E170/5949508653177498519?locale=en&origin_domain=com"
},
...
],
...
}
Result for hl: de, adults: 2, youth_ages: 10, and senior_ages: 65
hl sets the language of the station names and the currency of the prices, unless currency is set: de is German, in EUR. Prices are for all the passengers: two adults, a youth aged 10, and a senior aged 65.
{
...
"trains": [
{
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 08:36"
},
"arrival_station": {
"name": "München Hbf",
"id": "329668",
"time": "2027-01-02 13:20"
},
"total_duration": 284,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"segments": [
{
"travel_mode": "train",
"departure_station": {
"name": "Berlin Hbf",
"id": "334196",
"time": "2027-01-02 08:36"
},
"arrival_station": {
"name": "München Hbf",
"id": "329668",
"time": "2027-01-02 13:20"
},
"duration": 284,
"company": "Deutsche Bahn",
"company_logo": "https://static.omio.design/web/logos/63/deutsche_bahn.png",
"transport_id": "ICE 1005"
}
],
"price": 180.0,
"booking_link": "https://www.omio.com/app/search-frontend/journey/train/16757147/L108403EB01B240BAA20FC83F6EEE1C49/-8583056477019539070?locale=de&origin_domain=de"
},
...
],
...
}
JSON structure overview
{
...
"trains": [
{
"departure_station": {
"name": "String - Name of the station, airport, bus stop, or port.",
"id": "String - Omio place ID of the station, to use in departure_id or arrival_id. Missing for stops Omio only knows by their address, like car pooling meeting points.",
"iata_code": "String - IATA code of the airport.",
"time": "String - Local date and time of the departure, in YYYY-MM-DD HH:MM format.",
"distance_km": "Number - Distance from the place of the search, in kilometers, for alternative routes."
},
"arrival_station": {
"name": "String - Name of the station, airport, bus stop, or port.",
"id": "String - Omio place ID of the station, to use in departure_id or arrival_id. Missing for stops Omio only knows by their address.",
"iata_code": "String - IATA code of the airport.",
"time": "String - Local date and time of the arrival, in YYYY-MM-DD HH:MM format.",
"distance_km": "Number - Distance from the place of the search, in kilometers, for alternative routes."
},
"total_duration": "Integer - Duration of the journey, in minutes.",
"company": "String - Company of the journey, or the first one when Omio shows several. (Ex. Deutsche Bahn, FlixBus, Lufthansa)",
"company_logo": "String - Link to the logo of the company.",
"companies": [
{
"name": "String - Name of a company of the journey, when Omio shows several. (Ex. Italo, Deutsche Bahn)",
"logo": "String - Link to the logo of the company."
}
],
"operated_by": "String - Company operating the journey for the company. (Ex. Air France for KLM)",
"partially_operated": "Boolean - True if operated_by only operates some segments of the journey.",
"tickets_left": "Integer - Number of tickets left, when Omio shows it.",
"car_pooling": "Boolean - True for car pooling rides, like BlaBlaCar, which Omio lists with the buses.",
"alternative_route": "Boolean - True for journeys from or to a nearby place.",
"segments": [
{
"travel_mode": "String - Travel mode of the segment. (Ex. train, bus, flight, ferry)",
"departure_station": {
"name": "String - Name of the station.",
"id": "String - Omio place ID of the station.",
"iata_code": "String - IATA code of the airport.",
"time": "String - Local date and time of the departure, in YYYY-MM-DD HH:MM format."
},
"arrival_station": {
"name": "String - Name of the station.",
"id": "String - Omio place ID of the station.",
"iata_code": "String - IATA code of the airport.",
"time": "String - Local date and time of the arrival, in YYYY-MM-DD HH:MM format."
},
"duration": "Integer - Duration of the segment, in minutes.",
"company": "String - Company of the segment.",
"company_logo": "String - Link to the logo of the company.",
"transport_id": "String - Number or name of the train, flight, bus, or ferry. (Ex. ICE 1005, VY7643, SNAV JET)"
}
],
"layovers": [
{
"name": "String - Name of the station of the transfer.",
"id": "String - Omio place ID of the station.",
"iata_code": "String - IATA code of the airport.",
"duration": "Integer - Duration of the transfer, in minutes."
}
],
"price": "Float - Price of the journey for all the passengers, with taxes, in the currency of the search. For round trips, price of the outbound or of the return journey.",
"total_price": "Float - Price of the round trip, for return journeys.",
"departure_token": "String - Token to get the return journeys of an outbound journey, for round trips.",
"booking_link": "String - Link to the journey on Omio, to book it."
}
],
"buses": [
"Object - Bus journey, with the same fields as trains."
],
"flights": [
"Object - Flight journey, with the same fields as trains."
],
"ferries": [
"Object - Ferry journey, with the same fields as trains."
]
}