Omio train, bus and flight search API
Use the Omio train, bus and flight search API to retrieve trip options, price information, journey segments and endpoints, station and stop records, plan providers and source-page links as structured JSON from Omio. Supply origin and destination in the query; optionally select date, departure offset in days and sort option to set the requested scope. Use these results to compare journey options for the selected route and dates before choosing a travel itinerary. For sort option, choose departure / price / duration. The detail page includes parameter definitions, paired request and response examples, and usage pricing for this operation.
- Selected price
- $0.002 / billing creditPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
Omio train, bus and flight search API
Prepare your request, then continue with your agent.
Pricing
$0.002 / billing credit
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
- Provider
- Pricing
On this page
Overview
Omio train, bus and flight search API
Use the Omio train, bus and flight search API to retrieve trip options, price information, journey segments and endpoints, station and stop records, plan providers and source-page links as structured JSON from Omio. Supply origin and destination in the query; optionally select date, departure offset in days and sort option to set the requested scope. Use these results to compare journey options for the selected route and dates before choosing a travel itinerary. For sort option, choose departure / price / duration. The detail page includes parameter definitions, paired request and response examples, and usage pricing for this operation.
Omio train, bus and flight search API
Live search over trains, buses, flights and ferries between two places on one day, as Omio shows it: every trip with departure and arrival, duration, stops, price and currency, seats left, operator and seller, travel class, fare options, and each segment with stations, times, operator and train or flight number. Also the result count per mode and the cheapest trip per mode. The search takes 5-25 seconds while the operators answer.
Inputs and results
Send the listed inputs as GET query parameters. Required inputs: from, to. Supported values, filters and optional identifiers are listed below.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
from | string | Required | Origin: an Omio place id from /omio/v1/places, or a city or station name. |
to | string | Required | Destination: place id or name. |
date | string | Optional | Travel date (YYYY-MM-DD). Default: `days_ahead` days from today. |
days_ahead | integer | Optional | Days from today when no `date` is given (default 30). |
modes | string | Optional | Only these modes, comma separated: `train`, `bus`, `flight`, `ferry`. |
passenger_ages | string | Optional | Passenger ages, comma separated (e.g. `35,8`). Default one adult. |
adults | integer | Optional | Number of adults when no ages are given (default 1). |
currency | string | Optional | Price currency (3 letters). Default `EUR`. |
max_stops | integer | Optional | At most this many changes. |
sort | string | Optional | Order of trips. Default `departure`. Allowed values: departure, price, duration. |
limit | integer | Optional | Trips (default 100, max 300). |
locale | string | Optional | Language (2 letters). Default `en`. |
raw | string | Optional | Use 0 to leave out the source raw blocks. This controls raw source payloads, not the normalized result records. Allowed values: 0, 1. |
fields | string | Optional | Optional comma-separated output fields; nested paths follow the source field-selection syntax. Call metadata is retained. |
fresh | string | Optional | Use 1 to bypass the source response cache. Cache hits are also billed according to reported credits. Allowed values: 1. |
output | string | Optional | Response format for this product: json. Omit this parameter to use JSON. Allowed values: json. |
records | string | Optional | Source export selector for CSV or NDJSON. It has no effect on this JSON-only product. |
Using OpenAny
Send this request to the OpenAny gateway with your OpenAny API key in the Authorization header. The query values below match the paired request example.
OpenAny request example
curl "https://api.openany.si/v1/agent-apis/apish/omio/v1/search?from=Berlin&to=Munich&output=json&raw=0&limit=1" \
-H "Authorization: Bearer <OPENANY_API_KEY>"This command illustrates the OpenAny request format. The response example below retains its stated provenance; it is not evidence that this gateway request was executed.
Response example
Recorded source response for the exact request shown above. Filters, field selectors and page choices in that request define the returned scope.
{
"search_id": "ED6A56F011E96456E869608D629C914A3",
"from": {
"id": 376217,
"name": "Berlin"
},
"to": {
"id": 376946,
"name": "Munich"
},
"date": "2026-12-19",
"currency": "EUR",
"passenger_ages": [
30
],
"applied_filters": {
"modes": null,
"max_stops": null,
"sort": "departure"
},
"modes": {
"bus": {
"status": "done",
"results": 19
},
"flight": {
"status": "done",
"results": 32
},
"ferry": {
"status": "notavailable",
"results": 0
},
"train": {
"status": "done",
"results": 7
}
},
"cheapest_by_mode": {
"bus": {
"price": 58,
"departure": "2026-12-19T00:15:00.000+01:00",
"operator": "FlixBus"
}
},
"total": 58,
"count": 1,
"trips": [
{
"id": "4685047820974844826",
"journey_id": "-1818076049",
"mode": "bus",
"departure": "2026-12-19T00:15:00.000+01:00",
"arrival": "2026-12-19T09:55:00.000+01:00",
"duration_min": 580,
"stops": 1,
"price": 58,
"currency": "EUR",
"status": "available",
"bookable": true,
"tickets_left": 39,
"operator": "FlixBus",
"operator_code": "meinfernbus_flixbus",
"operator_logo": "https://static.omio.design/web/logos/100/meinfernbus_flixbus.png",
"sold_by": [
"FlixBus"
],
"providers": [
"Flixbus"
],
"classes": [],
"fare_options": [
{
"type": "ONE_WAY",
"class": null,
"price": 58,
"fare_id": "flixbusConnect.NORMAL",
"available": true,
"discounts": []
}
],
"split_ticket": false,
"connection_guarantee": false,
"nearby_departure": false,
"nearby_arrival": false,
"airport_transfer": false,
"segments": [
{
"mode": "bus",
"from": {
"id": 8596206,
"name": "Berlin, Bahnhof Südkreuz",
"type": "busstation",
"city": "Berlin",
"country_code": "DE",
"lat": 52.47622516200133,
"lng": 13.364395486525495
},
"to": {
"id": 475553,
"name": "Dresden, Bayrische Straße (Hauptbahnhof)",
"type": "busstation",
"city": "Dresden",
"country_code": "DE",
"lat": 51.039306599739675,
"lng": 13.732375563507048
},
"departure": "2026-12-19T00:15:00.000+01:00",
"arrival": "2026-12-19T02:50:00.000+01:00",
"departure_time_zone": "Europe/Berlin",
"arrival_time_zone": "Europe/Berlin",
"duration_min": 155,
"operator": "FlixBus",
"operator_code": "meinfernbus_flixbus",
"service": "FlixBus",
"tags": []
},
{
"mode": "bus",
"from": {
"id": 475553,
"name": "Dresden, Bayrische Straße (Hauptbahnhof)",
"type": "busstation",
"city": "Dresden",
"country_code": "DE",
"lat": 51.039306599739675,
"lng": 13.732375563507048
},
"to": {
"id": 318076,
"name": "Munich, Central Bus Station (ZOB)",
"type": "busstation",
"city": "Munich",
"country_code": "DE",
"lat": 48.14224,
"lng": 11.54997
},
"departure": "2026-12-19T03:15:00.000+01:00",
"arrival": "2026-12-19T09:55:00.000+01:00",
"departure_time_zone": "Europe/Berlin",
"arrival_time_zone": "Europe/Berlin",
"duration_min": 400,
"operator": "FlixBus",
"operator_code": "meinfernbus_flixbus",
"service": "FlixBus",
"tags": []
}
]
}
],
"url": "https://www.omio.com/app/search-frontend/results/ED6A56F011E96456E869608D629C914A3/train?locale=en",
"cached": false,
"fetched_at": "2026-11-19T12:25:19.976Z",
"credits_used": 1
}Usage and price
The price is USD 0.002 per actual credit reported in credits_used, with no fixed per-call fee. A response reporting zero credits has zero usage cost. Up to USD 0.002 is reserved for this request; the final price follows reported usage within the configured upper limit. A valid empty result or an unsuccessful lookup can still consume source credits. Cache hits also consume credits.
Coverage and limits
Coverage and update times follow the source. Use the documented field definitions when interpreting the selected result. Requests have a 120-second time budget and a 8 MiB response limit.
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
applied_filtersobjectmax_stopsnullmodesnullsortstring
cachedbooleancheapest_by_modeobjectbusobjectdeparturestringoperatorstringpriceinteger
countintegercredits_usedintegercurrencystringdatestringfetched_atstringfromobjectidintegernamestring
modesobjectbusobjectresultsintegerstatusstring
ferryobjectresultsintegerstatusstring
flightobjectresultsintegerstatusstring
trainobjectresultsintegerstatusstring
passenger_agesinteger[]search_idstringtoobjectidintegernamestring
totalintegertripsobject[]airport_transferbooleanarrivalstringbookablebooleanclassesunknown[]connection_guaranteebooleancurrencystringdeparturestringduration_minintegerfare_optionsobject[]availablebooleanclassnulldiscountsunknown[]fare_idstringpriceintegertypestring
idstringjourney_idstringmodestringnearby_arrivalbooleannearby_departurebooleanoperatorstringoperator_codestringoperator_logostringpriceintegerprovidersstring[]segmentsobject[]arrivalstringarrival_time_zonestringdeparturestringdeparture_time_zonestringduration_minintegerfromobjectcitystringcountry_codestringidintegerlatnumberlngnumbernamestringtypestring
modestringoperatorstringoperator_codestringservicestringtagsunknown[]toobjectcitystringcountry_codestringidintegerlatnumberlngnumbernamestringtypestring
sold_bystring[]split_ticketbooleanstatusstringstopsintegertickets_leftinteger
urlstring
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
applied_filters?: {
max_stops?: null;
modes?: null;
sort?: string;
};
cached?: boolean;
cheapest_by_mode?: {
bus?: {
departure?: string;
operator?: string;
price?: number;
};
};
count?: number;
credits_used?: number;
currency?: string;
date?: string;
fetched_at?: string;
from?: {
id?: number;
name?: string;
};
modes?: {
bus?: {
results?: number;
status?: string;
};
ferry?: {
results?: number;
status?: string;
};
flight?: {
results?: number;
status?: string;
};
train?: {
results?: number;
status?: string;
};
};
passenger_ages?: Array<number>;
search_id?: string;
to?: {
id?: number;
name?: string;
};
total?: number;
trips?: Array<{
airport_transfer?: boolean;
arrival?: string;
bookable?: boolean;
classes?: Array<unknown>;
connection_guarantee?: boolean;
currency?: string;
departure?: string;
duration_min?: number;
fare_options?: Array<{
available?: boolean;
class?: null;
discounts?: Array<unknown>;
fare_id?: string;
price?: number;
type?: string;
}>;
id?: string;
journey_id?: string;
mode?: string;
nearby_arrival?: boolean;
nearby_departure?: boolean;
operator?: string;
operator_code?: string;
operator_logo?: string;
price?: number;
providers?: Array<string>;
segments?: Array<{
arrival?: string;
arrival_time_zone?: string;
departure?: string;
departure_time_zone?: string;
duration_min?: number;
from?: {
city?: string;
country_code?: string;
id?: number;
lat?: number;
lng?: number;
name?: string;
type?: string;
};
mode?: string;
operator?: string;
operator_code?: string;
service?: string;
tags?: Array<unknown>;
to?: {
city?: string;
country_code?: string;
id?: number;
lat?: number;
lng?: number;
name?: string;
type?: string;
};
}>;
sold_by?: Array<string>;
split_ticket?: boolean;
status?: string;
stops?: number;
tickets_left?: number;
}>;
url?: string;
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
apishCurrent Omio train, bus and flight search API · GET · View API reference | $0.002 / billing credit | — | —successP50— |
- Pricing
- $0.002
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 2. Price update time: not supplied.
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/apish/omio/v1/search- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'https://api.openany.si/v1/agent-apis/apish/omio/v1/search?from=Berlin&limit=1&output=json&raw=0&to=Munich' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
from | URL query parametersquery | string | Yes | Origin: an Omio place id from /omio/v1/places, or a city or station name. |
to | URL query parametersquery | string | Yes | Destination: place id or name. |
date | URL query parametersquery | string | No | Travel date (YYYY-MM-DD). Default: `days_ahead` days from today. |
days_ahead | URL query parametersquery | integer | No | Days from today when no `date` is given (default 30). |
modes | URL query parametersquery | string | No | Only these modes, comma separated: `train`, `bus`, `flight`, `ferry`. |
passenger_ages | URL query parametersquery | string | No | Passenger ages, comma separated (e.g. `35,8`). Default one adult. |
adults | URL query parametersquery | integer | No | Number of adults when no ages are given (default 1). |
currency | URL query parametersquery | string | No | Price currency (3 letters). Default `EUR`. |
max_stops | URL query parametersquery | integer | No | At most this many changes. |
sort | URL query parametersquery | string | No | Order of trips. Default `departure`. enum: "departure", "price", "duration" |
limit | URL query parametersquery | integer | No | Trips (default 100, max 300). |
locale | URL query parametersquery | string | No | Language (2 letters). Default `en`. |
raw | URL query parametersquery | string | No | 0 leaves out the bulky `raw` source blocks (often 10-30x smaller). enum: "0", "1" |
fields | URL query parametersquery | string | No | Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included. |
fresh | URL query parametersquery | string | No | 1 skips the 24-hour cache and fetches live. enum: "1" |
output | URL query parametersquery | string | No | JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported. enum: "json" |
records | URL query parametersquery | string | No | With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row. |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Sample response · Documented HTTP 200 Example from the provider's documentation. Field values in your results will differ.
{
"applied_filters": {
"max_stops": null,
"modes": null,
"sort": "departure"
},
"cached": false,
"cheapest_by_mode": {
"bus": {
"departure": "2026-12-19T00:15:00.000+01:00",
"operator": "FlixBus",
"price": 58
}
},
"count": 1,
"credits_used": 1,
"currency": "EUR",
"date": "2026-12-19",
"fetched_at": "2026-11-19T12:25:19.976Z",
"from": {
"id": 376217,
"name": "Berlin"
},
"modes": {
"bus": {
"results": 19,
"status": "done"
},
"ferry": {
"results": 0,
"status": "notavailable"
},
"flight": {
"results": 32,
"status": "done"
},
"train": {
"results": 7,
"status": "done"
}
},
"passenger_ages": [
30
],
"search_id": "ED6A56F011E96456E869608D629C914A3",
"to": {
"id": 376946,
"name": "Munich"
},
"total": 58,
"trips": [
{
"airport_transfer": false,
"arrival": "2026-12-19T09:55:00.000+01:00",
"bookable": true,
"classes": [],
"connection_guarantee": false,
"currency": "EUR",
"departure": "2026-12-19T00:15:00.000+01:00",
"duration_min": 580,
"fare_options": [
{
"available": true,
"class": null,
"discounts": [],
"fare_id": "flixbusConnect.NORMAL",
"price": 58,
"type": "ONE_WAY"
}
],
"id": "4685047820974844826",
"journey_id": "-1818076049",
"mode": "bus",
"nearby_arrival": false,
"nearby_departure": false,
"operator": "FlixBus",
"operator_code": "meinfernbus_flixbus",
"operator_logo": "https://static.omio.design/web/logos/100/meinfernbus_flixbus.png",
"price": 58,
"providers": [
"Flixbus"
],
"segments": [
{
"arrival": "2026-12-19T02:50:00.000+01:00",
"arrival_time_zone": "Europe/Berlin",
"departure": "2026-12-19T00:15:00.000+01:00",
"departure_time_zone": "Europe/Berlin",
"duration_min": 155,
"from": {
"city": "Berlin",
"country_code": "DE",
"id": 8596206,
"lat": 52.47622516200133,
"lng": 13.364395486525495,
"name": "Berlin, Bahnhof Südkreuz",
"type": "busstation"
},
"mode": "bus",
"operator": "FlixBus",
"operator_code": "meinfernbus_flixbus",
"service": "FlixBus",
"tags": [],
"to": {
"city": "Dresden",
"country_code": "DE",
"id": 475553,
"lat": 51.039306599739675,
"lng": 13.732375563507048,
"name": "Dresden, Bayrische Straße (Hauptbahnhof)",
"type": "busstation"
}
},
{
"arrival": "2026-12-19T09:55:00.000+01:00",
"arrival_time_zone": "Europe/Berlin",
"departure": "2026-12-19T03:15:00.000+01:00",
"departure_time_zone": "Europe/Berlin",
"duration_min": 400,
"from": {
"city": "Dresden",
"country_code": "DE",
"id": 475553,
"lat": 51.039306599739675,
"lng": 13.732375563507048,
"name": "Dresden, Bayrische Straße (Hauptbahnhof)",
"type": "busstation"
},
"mode": "bus",
"operator": "FlixBus",
"operator_code": "meinfernbus_flixbus",
"service": "FlixBus",
"tags": [],
"to": {
"city": "Munich",
"country_code": "DE",
"id": 318076,
"lat": 48.14224,
"lng": 11.54997,
"name": "Munich, Central Bus Station (ZOB)",
"type": "busstation"
}
}
],
"sold_by": [
"FlixBus"
],
"split_ticket": false,
"status": "available",
"stops": 1,
"tickets_left": 39
}
],
"url": "https://www.omio.com/app/search-frontend/results/ED6A56F011E96456E869608D629C914A3/train?locale=en"
}Composite rule pricing
Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.
Base fee: $0.000000. One matching variant replaces the base fee. Matching add-ons and quantity charges are added.
| Fee item | Price | Metering source | When | Quantity limit |
|---|---|---|---|---|
| Actual API.SH credits consumed | $0.002000 / billing credit | Response · /credits_used · Numeric value | Always | 1 billing credit · Decimal places: 0 |
Each quantity charge is rounded before summing: ceil. Requests exceeding this cost limit are rejected; it is not a price cap: $0.002000.
Response quantities settle after the response. Before execution, the maximum quantity determines the reservation; unused reservation is released. Missing or invalid quantities are not treated as zero.
Pricing parameters and defaults
[]
Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# Omio train, bus and flight search API
Use the Omio train, bus and flight search API to retrieve trip options, price information, journey segments and endpoints, station and stop records, plan providers and source-page links as structured JSON from Omio. Supply origin and destination in the query; optionally select date, departure offset in days and sort option to set the requested scope. Use these results to compare journey options for the selected route and dates before choosing a travel itinerary. For sort option, choose departure / price / duration. The detail page includes parameter definitions, paired request and response examples, and usage pricing for this operation.
## Available implementations
apish · Omio train, bus and flight search API: https://openany.si/markets/apis/capabilities/omio-train-bus-and-flight-search-api?offering=21f5e751-6463-4f00-9cc1-a96783b0cf34 · $0.002 / billing credit
## Selected API contract
Documentation: https://openany.si/apis/21f5e751-6463-4f00-9cc1-a96783b0cf34
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/omio/v1/search
Price: $0.002 / billing credit
Provider: apish
Contract revision: 2
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
curl \
'https://api.openany.si/v1/agent-apis/apish/omio/v1/search?from=Berlin&limit=1&output=json&raw=0&to=Munich' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'
```
## API contract
```json
{
"resource_type": "api",
"name": "Omio train, bus and flight search API",
"endpoint": "https://api.openany.si/v1/agent-apis/apish/omio/v1/search",
"method": "GET",
"content_type": "none",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "Origin: an Omio place id from /omio/v1/places, or a city or station name.",
"location": "query",
"name": "from",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "Destination: place id or name.",
"location": "query",
"name": "to",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "Travel date (YYYY-MM-DD). Default: `days_ahead` days from today.",
"location": "query",
"name": "date",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "Days from today when no `date` is given (default 30).",
"location": "query",
"name": "days_ahead",
"nullable": false,
"required": false,
"type": "integer"
},
{
"description": "Only these modes, comma separated: `train`, `bus`, `flight`, `ferry`.",
"location": "query",
"name": "modes",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "Passenger ages, comma separated (e.g. `35,8`). Default one adult.",
"location": "query",
"name": "passenger_ages",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "Number of adults when no ages are given (default 1).",
"location": "query",
"name": "adults",
"nullable": false,
"required": false,
"type": "integer"
},
{
"description": "Price currency (3 letters). Default `EUR`.",
"location": "query",
"name": "currency",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "At most this many changes.",
"location": "query",
"name": "max_stops",
"nullable": false,
"required": false,
"type": "integer"
},
{
"description": "Order of trips. Default `departure`.",
"enum_values": [
"departure",
"price",
"duration"
],
"location": "query",
"name": "sort",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "Trips (default 100, max 300).",
"location": "query",
"name": "limit",
"nullable": false,
"required": false,
"type": "integer"
},
{
"description": "Language (2 letters). Default `en`.",
"location": "query",
"name": "locale",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
"enum_values": [
"0",
"1"
],
"location": "query",
"name": "raw",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.",
"location": "query",
"name": "fields",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "1 skips the 24-hour cache and fetches live.",
"enum_values": [
"1"
],
"location": "query",
"name": "fresh",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
"enum_values": [
"json"
],
"location": "query",
"name": "output",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.",
"location": "query",
"name": "records",
"nullable": false,
"required": false,
"type": "string"
}
],
"billing": {
"currency": "USD",
"mode": "rules",
"parameters": [],
"policy_version": 2,
"sale": {
"addons": [],
"base_price_micro_usd": "0",
"max_cost_micro_usd": "2000",
"quantities": [
{
"id": "upstream_credits",
"label": "Actual API.SH credits consumed",
"max_quantity": "1",
"measure": "value",
"pointer": "/credits_used",
"price_micro_usd": "2000",
"quantity_scale": 0,
"source": "response",
"unit": "credit",
"unit_quantity": "1"
}
],
"rounding": "ceil",
"variants": []
}
},
"examples": [
{
"http_status": 200,
"name": "Official example · Live API.SH response · Minimal request",
"request": {
"body": null,
"headers": {},
"path": {},
"query": {
"from": "Berlin",
"limit": "1",
"output": "json",
"raw": "0",
"to": "Munich"
}
},
"response_body": {
"applied_filters": {
"max_stops": null,
"modes": null,
"sort": "departure"
},
"cached": false,
"cheapest_by_mode": {
"bus": {
"departure": "2026-12-19T00:15:00.000+01:00",
"operator": "FlixBus",
"price": 58
}
},
"count": 1,
"credits_used": 1,
"currency": "EUR",
"date": "2026-12-19",
"fetched_at": "2026-11-19T12:25:19.976Z",
"from": {
"id": 376217,
"name": "Berlin"
},
"modes": {
"bus": {
"results": 19,
"status": "done"
},
"ferry": {
"results": 0,
"status": "notavailable"
},
"flight": {
"results": 32,
"status": "done"
},
"train": {
"results": 7,
"status": "done"
}
},
"passenger_ages": [
30
],
"search_id": "ED6A56F011E96456E869608D629C914A3",
"to": {
"id": 376946,
"name": "Munich"
},
"total": 58,
"trips": [
{
"airport_transfer": false,
"arrival": "2026-12-19T09:55:00.000+01:00",
"bookable": true,
"classes": [],
"connection_guarantee": false,
"currency": "EUR",
"departure": "2026-12-19T00:15:00.000+01:00",
"duration_min": 580,
"fare_options": [
{
"available": true,
"class": null,
"discounts": [],
"fare_id": "flixbusConnect.NORMAL",
"price": 58,
"type": "ONE_WAY"
}
],
"id": "4685047820974844826",
"journey_id": "-1818076049",
"mode": "bus",
"nearby_arrival": false,
"nearby_departure": false,
"operator": "FlixBus",
"operator_code": "meinfernbus_flixbus",
"operator_logo": "https://static.omio.design/web/logos/100/meinfernbus_flixbus.png",
"price": 58,
"providers": [
"Flixbus"
],
"segments": [
{
"arrival": "2026-12-19T02:50:00.000+01:00",
"arrival_time_zone": "Europe/Berlin",
"departure": "2026-12-19T00:15:00.000+01:00",
"departure_time_zone": "Europe/Berlin",
"duration_min": 155,
"from": {
"city": "Berlin",
"country_code": "DE",
"id": 8596206,
"lat": 52.47622516200133,
"lng": 13.364395486525495,
"name": "Berlin, Bahnhof Südkreuz",
"type": "busstation"
},
"mode": "bus",
"operator": "FlixBus",
"operator_code": "meinfernbus_flixbus",
"service": "FlixBus",
"tags": [],
"to": {
"city": "Dresden",
"country_code": "DE",
"id": 475553,
"lat": 51.039306599739675,
"lng": 13.732375563507048,
"name": "Dresden, Bayrische Straße (Hauptbahnhof)",
"type": "busstation"
}
},
{
"arrival": "2026-12-19T09:55:00.000+01:00",
"arrival_time_zone": "Europe/Berlin",
"departure": "2026-12-19T03:15:00.000+01:00",
"departure_time_zone": "Europe/Berlin",
"duration_min": 400,
"from": {
"city": "Dresden",
"country_code": "DE",
"id": 475553,
"lat": 51.039306599739675,
"lng": 13.732375563507048,
"name": "Dresden, Bayrische Straße (Hauptbahnhof)",
"type": "busstation"
},
"mode": "bus",
"operator": "FlixBus",
"operator_code": "meinfernbus_flixbus",
"service": "FlixBus",
"tags": [],
"to": {
"city": "Munich",
"country_code": "DE",
"id": 318076,
"lat": 48.14224,
"lng": 11.54997,
"name": "Munich, Central Bus Station (ZOB)",
"type": "busstation"
}
}
],
"sold_by": [
"FlixBus"
],
"split_ticket": false,
"status": "available",
"stops": 1,
"tickets_left": 39
}
],
"url": "https://www.omio.com/app/search-frontend/results/ED6A56F011E96456E869608D629C914A3/train?locale=en"
}
}
]
}
```Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Official example · Live API.SH response · Minimal request
Example from the provider's documentation. Field values in your results will differ.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 17
Review these request fields before running. Keep the published provider and request method unchanged.
from- Origin: an Omio place id from /omio/v1/places, or a city or station name.
to- Destination: place id or name.
date- Travel date (YYYY-MM-DD). Default: `days_ahead` days from today.
days_ahead- Days from today when no `date` is given (default 30).
modes- Only these modes, comma separated: `train`, `bus`, `flight`, `ferry`.
passenger_ages- Passenger ages, comma separated (e.g. `35,8`). Default one adult.
adults- Number of adults when no ages are given (default 1).
currency- Price currency (3 letters). Default `EUR`.
max_stops- At most this many changes.
sort- Order of trips. Default `departure`.
limit- Trips (default 100, max 300).
locale- Language (2 letters). Default `en`.
raw- 0 leaves out the bulky `raw` source blocks (often 10-30x smaller).
fields- Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
fresh- 1 skips the 24-hour cache and fetches live.
output- JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.
records- With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/apish/omio/v1/search?from=Berlin&limit=1&output=json&raw=0&to=Munich' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "applied_filters": { "max_stops": null, "modes": null, "sort": "departure" }, "cached": false, "cheapest_by_mode": { "bus": { "departure": "2026-12-19T00:15:00.000+01:00", "operator": "FlixBus", "price": 58 } }, "count": 1, "credits_used": 1, "currency": "EUR", "date": "2026-12-19", "fetched_at": "2026-11-19T12:25:19.976Z", "from": { "id": 376217, "name": "Berlin" }, "modes": { "bus": { "results": 19, "status": "done" }, "ferry": { "results": 0, "status": "notavailable" }, "flight": { "results": 32, "status": "done" }, "train": { "results": 7, "status": "done" } }, "passenger_ages": [ 30 ], "search_id": "ED6A56F011E96456E869608D629C914A3", "to": { "id": 376946, "name": "Munich" }, "total": 58, "trips": [ { "airport_transfer": false, "arrival": "2026-12-19T09:55:00.000+01:00", "bookable": true, "classes": [], "connection_guarantee": false, "currency": "EUR", "departure": "2026-12-19T00:15:00.000+01:00", "duration_min": 580, "fare_options": [ { "available": true, "class": null, "discounts": [], "fare_id": "flixbusConnect.NORMAL", "price": 58, "type": "ONE_WAY" } ], "id": "4685047820974844826", "journey_id": "-1818076049", "mode": "bus", "nearby_arrival": false, "nearby_departure": false, "operator": "FlixBus", "operator_code": "meinfernbus_flixbus", "operator_logo": "https://static.omio.design/web/logos/100/meinfernbus_flixbus.png", "price": 58, "providers": [ "Flixbus" ], "segments": [ { "arrival": "2026-12-19T02:50:00.000+01:00", "arrival_time_zone": "Europe/Berlin", "departure": "2026-12-19T00:15:00.000+01:00", "departure_time_zone": "Europe/Berlin", "duration_min": 155, "from": { "city": "Berlin", "country_code": "DE", "id": 8596206, "lat": 52.47622516200133, "lng": 13.364395486525495, "name": "Berlin, Bahnhof Südkreuz", "type": "busstation" }, "mode": "bus", "operator": "FlixBus", "operator_code": "meinfernbus_flixbus", "service": "FlixBus", "tags": [], "to": { "city": "Dresden", "country_code": "DE", "id": 475553, "lat": 51.039306599739675, "lng": 13.732375563507048, "name": "Dresden, Bayrische Straße (Hauptbahnhof)", "type": "busstation" } }, { "arrival": "2026-12-19T09:55:00.000+01:00", "arrival_time_zone": "Europe/Berlin", "departure": "2026-12-19T03:15:00.000+01:00", "departure_time_zone": "Europe/Berlin", "duration_min": 400, "from": { "city": "Dresden", "country_code": "DE", "id": 475553, "lat": 51.039306599739675, "lng": 13.732375563507048, "name": "Dresden, Bayrische Straße (Hauptbahnhof)", "type": "busstation" }, "mode": "bus", "operator": "FlixBus", "operator_code": "meinfernbus_flixbus", "service": "FlixBus", "tags": [], "to": { "city": "Munich", "country_code": "DE", "id": 318076, "lat": 48.14224, "lng": 11.54997, "name": "Munich, Central Bus Station (ZOB)", "type": "busstation" } } ], "sold_by": [ "FlixBus" ], "split_ticket": false, "status": "available", "stops": 1, "tickets_left": 39 } ], "url": "https://www.omio.com/app/search-frontend/results/ED6A56F011E96456E869608D629C914A3/train?locale=en" }