# Omio Trip Search API Documentation

<p><strong>Omio Trip Search API Documentation</strong> Search trips by train, bus and flight between two places on a date, one way or round trip. Each trip has the carrier with logo and codes, the price in minor units (cents) with its currency, duration in minutes, the number of stops, departure and arrival times and places, every leg with line number, class and zones, the changes between legs, the fare offers, tickets left and flags for split tickets and routed connections. The response also carries the number of trips per mode, the lowest price per mode and the search id for the trip and providers endpoints. Trips are sorted and paged by Scrappa over the full result set: price and duration sorting is done by Scrappa (sort_source is client), departure, arrival and smart use the Omio order (sort_source is server). Page 2 is always the next slice, never page 1 again. Add return_date for a round trip. The results are then the outbound trips (trip_type is round_trip), and the price of each is the lowest total price of outbound and return together. Omio gives the return trips only for one chosen outbound: open it with the trip endpoint (search_id and trip_id) to get its return_options. Search results are live and a search takes a few seconds. Omio is not affiliated with Scrappa.</p>

- **Documentation:** [https://scrappa.co/docs/omio-api/omio_search](https://scrappa.co/docs/omio-api/omio_search)
- **API group:** Omio API
- **Endpoint:** `GET https://scrappa.co/api/omio/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `origin_id` | integer | Yes | Position id of the departure place. Get it from the places endpoint. Example: 376217 for Berlin. |
| `destination_id` | integer | Yes | Position id of the arrival place. Example: 379727 for Paris. |
| `date` | string | Yes | Departure date, YYYY-MM-DD, today up to 364 days ahead. |
| `return_date` | string | No | Optional. Return date for a round trip, YYYY-MM-DD, on or after the departure date and within 364 days. Leave it out for a one way search. |
| `adults` | integer | No | Number of adults, 1 to 9. Defaults to 1. A search always includes at least one adult. |
| `children` | integer | No | Number of children aged 6 to 11, 0 to 9. Defaults to 0. |
| `infants` | integer | No | Number of infants aged 0 to 5, 0 to 9, at most one per adult. Defaults to 0. |
| `travel_mode` | string | No | Comma separated modes: train, bus, flight. Defaults to all three. Only trips of these modes are returned. |
| `currency` | string | No | Price currency: EUR, USD, GBP, CHF, PLN, CZK, SEK, NOK, DKK, HUF or RON. Defaults to EUR. |
| `sort` | string | No | smart, price, duration, departure or arrival. Defaults to smart. See sort_source in the response. |
| `limit` | integer | No | Trips per page, 1 to 100. Defaults to 25. |
| `page` | integer | No | Page number, 1 to 50. Defaults to 1. |

## Example response

```json
{
    "data": {
        "date": "2026-11-14",
        "sort": "price",
        "results": [
            {
                "legs": [
                    {
                        "mode": "train",
                        "tags": [],
                        "class": null,
                        "index": 0,
                        "company": "FlixTrain",
                        "line_number": "FlixTrain",
                        "arrival_time": "2026-11-14T15:29:00.000+01:00",
                        "arrival_zone": "Europe/Berlin",
                        "departure_time": "2026-11-14T09:57:00.000+01:00",
                        "departure_zone": "Europe/Berlin",
                        "duration_minutes": 332,
                        "marketing_company": null,
                        "no_change_for_next_segment": false
                    },
                    {
                        "mode": "bus",
                        "tags": [],
                        "class": null,
                        "index": 1,
                        "company": "FlixBus",
                        "line_number": "FlixBus",
                        "arrival_time": "2026-11-15T02:20:00.000+01:00",
                        "arrival_zone": "Europe/Paris",
                        "departure_time": "2026-11-14T17:45:00.000+01:00",
                        "departure_zone": "Europe/Berlin",
                        "duration_minutes": 515,
                        "marketing_company": null,
                        "no_change_for_next_segment": false
                    }
                ],
                "mode": "bus",
                "price": {
                    "currency": "EUR",
                    "amount_minor": 5600
                },
                "stops": 1,
                "offers": [
                    {
                        "type": "ONE_WAY",
                        "class": null,
                        "price": {
                            "currency": "EUR",
                            "amount_minor": 5600
                        },
                        "is_available": true,
                        "discount_cards": [],
                        "availability_rank": 99,
                        "unavailability_reasons": []
                    }
                ],
                "arrival": {
                    "city": "Paris",
                    "name": "Paris, Quai de Bercy (Bercy Seine)",
                    "type": "busstation",
                    "latitude": 48.83632528252408,
                    "iata_code": null,
                    "longitude": 2.3793135252719426,
                    "position_id": 16834868,
                    "country_code": "FR"
                },
                "changes": [
                    {
                        "type": "transfer",
                        "after_leg": 0,
                        "to_position_id": 16904720,
                        "duration_minutes": 136,
                        "from_position_id": 16904720
                    }
                ],
                "trip_id": "5607700354612381189-1045-bus-1",
                "provider": {
                    "id": 1045,
                    "code": "meinfernbus_flixbus",
                    "name": "FlixBus",
                    "logo_url": "https://static.omio.design/web/logos/31/meinfernbus_flixbus.png",
                    "toc_codes": [],
                    "iata_codes": []
                },
                "departure": {
                    "city": "Berlin",
                    "name": "Berlin Hbf",
                    "type": "station",
                    "latitude": 52.525102698597905,
                    "iata_code": null,
                    "longitude": 13.369429982803336,
                    "position_id": 334196,
                    "country_code": "DE"
                },
                "journey_id": "26271589",
                "is_bookable": true,
                "outbound_id": "5607700354612381189",
                "arrival_time": "2026-11-15T02:20:00.000+01:00",
                "tickets_left": null,
                "departure_time": "2026-11-14T09:57:00.000+01:00",
                "original_price": null,
                "is_split_ticket": false,
                "duration_minutes": 983,
                "selling_companies": [
                    "FlixBus"
                ],
                "service_providers": [
                    "Flixbus"
                ],
                "is_routed_connection": false
            },
            {
                "legs": [
                    {
                        "mode": "train",
                        "tags": [],
                        "class": null,
                        "index": 0,
                        "company": "FlixTrain",
                        "line_number": "FlixTrain",
                        "arrival_time": "2026-11-14T13:00:00.000+01:00",
                        "arrival_zone": "Europe/Berlin",
                        "departure_time": "2026-11-14T07:57:00.000+01:00",
                        "departure_zone": "Europe/Berlin",
                        "duration_minutes": 303,
                        "marketing_company": null,
                        "no_change_for_next_segment": false
                    },
                    {
                        "mode": "bus",
                        "tags": [],
                        "class": null,
                        "index": 1,
                        "company": "FlixBus",
                        "line_number": "FlixBus",
                        "arrival_time": "2026-11-14T22:30:00.000+01:00",
                        "arrival_zone": "Europe/Paris",
                        "departure_time": "2026-11-14T15:00:00.000+01:00",
                        "departure_zone": "Europe/Berlin",
                        "duration_minutes": 450,
                        "marketing_company": null,
                        "no_change_for_next_segment": false
                    }
                ],
                "mode": "bus",
                "price": {
                    "currency": "EUR",
                    "amount_minor": 5700
                },
                "stops": 1,
                "offers": [
                    {
                        "type": "ONE_WAY",
                        "class": null,
                        "price": {
                            "currency": "EUR",
                            "amount_minor": 5700
                        },
                        "is_available": true,
                        "discount_cards": [],
                        "availability_rank": 99,
                        "unavailability_reasons": []
                    }
                ],
                "arrival": {
                    "city": "Paris",
                    "name": "Paris, Quai de Bercy (Bercy Seine)",
                    "type": "busstation",
                    "latitude": 48.83632528252408,
                    "iata_code": null,
                    "longitude": 2.3793135252719426,
                    "position_id": 16834868,
                    "country_code": "FR"
                },
                "changes": [
                    {
                        "type": "transfer",
                        "after_leg": 0,
                        "to_position_id": 477057,
                        "duration_minutes": 120,
                        "from_position_id": 477057
                    }
                ],
                "trip_id": "7503613243312151024-1045-bus-1",
                "provider": {
                    "id": 1045,
                    "code": "meinfernbus_flixbus",
                    "name": "FlixBus",
                    "logo_url": "https://static.omio.design/web/logos/31/meinfernbus_flixbus.png",
                    "toc_codes": [],
                    "iata_codes": []
                },
                "departure": {
                    "city": "Berlin",
                    "name": "Berlin Hbf",
                    "type": "station",
                    "latitude": 52.525102698597905,
                    "iata_code": null,
                    "longitude": 13.369429982803336,
                    "position_id": 334196,
                    "country_code": "DE"
                },
                "journey_id": "-1545168921",
                "is_bookable": true,
                "outbound_id": "7503613243312151024",
                "arrival_time": "2026-11-14T22:30:00.000+01:00",
                "tickets_left": null,
                "departure_time": "2026-11-14T07:57:00.000+01:00",
                "original_price": null,
                "is_split_ticket": false,
                "duration_minutes": 873,
                "selling_companies": [
                    "FlixBus"
                ],
                "service_providers": [
                    "Flixbus"
                ],
                "is_routed_connection": false
            }
        ],
        "currency": "EUR",
        "origin_id": 376217,
        "trip_type": "one_way",
        "pagination": {
            "page": 1,
            "total": 8,
            "has_more": true,
            "page_size": 2
        },
        "passengers": {
            "adults": 1,
            "infants": 0,
            "children": 0
        },
        "return_date": null,
        "search_meta": {
            "search_id": "EEEEB9FDC8C6C4EA495BBAAB911D3E2D8",
            "modes_done": [
                "flight",
                "bus",
                "train"
            ],
            "poll_count": 1,
            "upstream_calls": 2,
            "modes_requested": [
                "train",
                "bus",
                "flight"
            ]
        },
        "sort_source": "client",
        "results_count": 8,
        "destination_id": 379727,
        "results_per_mode": {
            "bus": 3,
            "train": 1,
            "flight": 4
        },
        "price_floor_per_mode": {
            "bus": {
                "currency": "EUR",
                "amount_minor": 5200
            },
            "train": {
                "currency": "EUR",
                "amount_minor": 12000
            },
            "flight": {
                "currency": "EUR",
                "amount_minor": 15300
            }
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "trip_search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter is missing or invalid. This response is not billable. |
| 404 | Resource Not Found | The search, trip or route was not found or has expired. This response is not billable. |
| 503 | Service Unavailable | Omio could not be reached, did not finish the search in time, or answered with an unexpected shape. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
