Omio APIomio.com ↗
Search and compare train, bus, flight, and ferry tickets across Europe via the Omio API. Get trip details, fare classes, and date-range pricing in structured JSON.
What is the Omio API?
The Omio API exposes 6 endpoints for searching and comparing ground, air, and sea transport across European routes. Starting with search_location_autocomplete to resolve city and station IDs, you can run a full trip search via search_trips, retrieve fare classes and cancellation policies through get_trip_details, and scan cheapest prices across a date range with get_price_by_date — all returning structured JSON.
curl -X GET 'https://api.parse.bot/scraper/b6eb475f-3bd9-47ad-b7bc-66a60f5e53ce/search_location_autocomplete?query=Berlin' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace omio-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Omio Travel SDK — search locations, compare trips, check price calendar."""
from parse_apis.omio_travel_api import Omio, TravelMode, RouteNotFound, PriceCalendar
omio = Omio()
# Search for a city by name — typed field access on each Location
for loc in omio.locations.search(query="Berlin", limit=3):
print(loc.display_name, loc.country_code, loc.position_id)
# Construct Berlin by its known position_id, then list popular destinations
berlin = omio.location(position_id=376217)
for dest in berlin.popular_destinations(limit=3):
print(dest.display_name, dest.population, dest.country_code)
# Check the price calendar from Berlin to Dresden across a date range
calendar = berlin.price_calendar(to_id="376367", start_date="2026-07-01", end_date="2026-07-07")
print(calendar.prices, calendar.errors)
# Search train trips from Berlin to Dresden
trip = berlin.trips.search(
destination_id="376367",
departure_date="2026-07-01",
travel_mode=TravelMode.TRAIN,
limit=1,
).first()
if trip:
print(trip.departure_time, trip.arrival_time, trip.price, trip.currency, trip.mode)
# Get full trip details with fare classes and ticket offers
detail = trip.details(search_id="placeholder", travel_mode=TravelMode.TRAIN)
print(detail.overview.departure_location_name, detail.overview.arrival_location_name)
for journey in detail.journeys:
for segment in journey.segments:
print(segment.company_name, segment.duration, segment.travel_mode)
# Typed error handling — catch RouteNotFound on a bad route
try:
detail_bad = omio.tripdetails.get(
search_id="INVALID", trip_id="0", outbound_id="0", travel_mode=TravelMode.BUS
)
print(detail_bad.overview.trip_type)
except RouteNotFound as exc:
print(f"Route not found: {exc}")
print("exercised: locations.search / popular_destinations / price_calendar / trips.search / trip.details / tripdetails.get")
Autocomplete location search. Returns hierarchical results: each city-level location may contain child station entries. Use the positionId from results as origin/destination in trip searches.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search term for location autocomplete (e.g. 'Berlin', 'Munich', 'Paris') |
{
"type": "object",
"fields": {
"locations": "array of location objects with positionId, displayName, countryCode, type, children"
},
"sample": {
"data": {
"locations": [
{
"type": "location",
"children": [
{
"type": "station",
"positionId": 334196,
"countryCode": "DE",
"displayName": "Berlin Hbf"
}
],
"latitude": 52.52437,
"longitude": 13.41053,
"population": 3426354,
"positionId": 376217,
"countryCode": "DE",
"displayName": "Berlin"
}
]
},
"status": "success"
}
}About the Omio API
Location Resolution and Route Discovery
search_location_autocomplete accepts a plain-text query and returns an array of location objects, each with a positionId, displayName, countryCode, type, and a children array of sub-stations. These positionId values are required inputs for every other endpoint. get_popular_destinations takes a single position_id and returns destination objects that include population and nested popularDestinations, useful for surfacing common routes from a given city.
Trip Search and Session Management
search_trips requires origin_id, destination_id, and departure_date (accepted as YYYY-MM-DD or DD/MM/YYYY). An optional travel_mode parameter accepts a comma-separated list of train, bus, flight, and/or ferry to narrow results. The response includes a trips array and a search_id string. That search_id can be passed to get_search_results to retrieve the same session's results again, but sessions expire quickly — treat the search_id as short-lived. Each trip object in the trips array carries journeyId and outboundId fields needed downstream.
Trip Details and Fare Data
get_trip_details requires trip_id (the journeyId), outbound_id (the outboundId), and a valid search_id from a recent search_trips call. The response includes overview, journeys, segments, ticketOptions, and cancellation policies. This is where fare class distinctions and ticket conditions live. A separate travel_mode filter can be supplied here as well.
Date-Range Pricing
get_price_by_date accepts from_id, to_id, start_date, and end_date, all in YYYY-MM-DD format. The response is a date-keyed object where each date entry carries priceCents and numberOfResults broken down by transport mode. This makes it straightforward to identify the cheapest travel days across a window without running individual search_trips calls for each date.
The Omio API is a managed, monitored endpoint for omio.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when omio.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official omio.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a flexible-date fare calendar showing the cheapest train or bus prices across a month using
get_price_by_date - Display autocomplete location suggestions as users type a city name, resolving station-level
positionIdvalues for accurate searches - Compare train vs. bus vs. flight options on a single route by filtering
search_tripsresults with thetravel_modeparameter - Show fare class and cancellation policy details per ticket using
get_trip_detailsresponse fields liketicketOptionsand cancellation policies - Populate a route inspiration page using
get_popular_destinationsto surface common city pairs from a given origin - Aggregate multi-modal journey segments to display layover times and carrier names from the
segmentsarray inget_trip_details - Monitor price fluctuations on a specific European corridor by querying
get_price_by_dateat regular intervals
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Omio have an official developer API?+
What does `get_trip_details` return beyond what `search_trips` shows?+
get_trip_details returns the full ticket breakdown including ticketOptions, individual segments with carrier and timing data, and cancellation policy terms. The search_trips result gives trip-level summaries and the journeyId/outboundId identifiers you need to call get_trip_details, but fare conditions and segment-level detail only appear in the details response.How quickly do search sessions expire?+
search_id expire quickly after the initial search_trips call. Both get_search_results and get_trip_details require a search_id from a recent search. In practice, you should call get_trip_details in the same workflow as search_trips rather than storing search_id values for later reuse.Does the API support return or multi-city trip searches?+
search_trips covers one-way searches between a single origin and destination pair for a single departure date. You can fork this API on Parse and revise it to add a return-leg or multi-city search endpoint.Does the API return seat availability or real-time inventory counts?+
numberOfResults counts per transport mode, but does not expose seat-level availability figures. You can fork this API on Parse and revise it to surface inventory fields if they become accessible on the route.