# FlixBus Trip Search API Documentation

<p><strong>FlixBus Trip Search API Documentation</strong> Search trips between two cities for one day. Each trip has the trip_id for the trip endpoint, local departure and arrival times and stations, duration, number of transfers, legs with operator, brand, amenities and seat types, the price (total, total with platform fee, average per person), seats_left and a capacity band. seats_left is null when FlixBus does not publish it: null does not mean sold out. The response holds the full day set and has no pages. Rides after midnight are flagged with after_midnight. Filters and sorting are applied to the whole day. Round trips, children, date ranges and paging parameters are rejected: search the return day as a second one-way trip. Scrappa is an independent service and is not affiliated with FlixBus.</p>

- **Documentation:** [https://scrappa.co/docs/flixbus-api/flixbus_search](https://scrappa.co/docs/flixbus-api/flixbus_search)
- **API group:** FlixBus API
- **Endpoint:** `GET https://scrappa.co/api/flixbus/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 |
| --- | --- | --- | --- |
| `from_city_id` | string | Yes | Origin city UUID from the cities endpoint. Example: 40d8f682-8646-11e6-9066-549f350fcb0c for Berlin. |
| `to_city_id` | string | Yes | Destination city UUID from the cities endpoint, different from the origin. Example: 40d91e53-8646-11e6-9066-549f350fcb0c for Hamburg. |
| `departure_date` | string | Yes | Departure day, YYYY-MM-DD, today or later. Example: 2027-03-14. |
| `adults` | integer | No | Number of adults, 1 to 9. Defaults to 1. The total price scales with it, the average price stays per person. |
| `currency` | string | No | EUR or USD. Defaults to EUR. |
| `sort` | string | No | departure, price or duration. Defaults to departure. Price sorts by the fare with platform fee. |
| `max_price` | number | No | Highest fare with platform fee, in the chosen currency. Trips above it are removed. |
| `max_transfers` | integer | No | Highest number of transfers, 0 to 5. Use 0 for direct trips only. |
| `departure_after` | string | No | Earliest local departure time, HH:MM. Example: 08:30. |
| `departure_before` | string | No | Latest local departure time, HH:MM. Example: 18:00. |

## Example response

```json
{
    "data": {
        "sort": "departure",
        "total": 2,
        "trips": [
            {
                "legs": [
                    {
                        "layout": [
                            {
                                "deck": 0,
                                "column_layout": "TWO_TWO"
                            }
                        ],
                        "arrival": {
                            "date": "2026-11-03",
                            "time": "2026-11-03T04:15:00+01:00",
                            "city_id": "40d91e53-8646-11e6-9066-549f350fcb0c",
                            "city_name": "Hamburg",
                            "local_time": "04:15",
                            "station_id": "dcbada9a-9603-11e6-9066-549f350fcb0c",
                            "station_name": "Hamburg ZOB"
                        },
                        "ride_id": "78e70bcf-351d-4589-8271-9d339a9ede21",
                        "brand_id": "a18f138c-68fa-4b45-a42f-adb0378e10d3",
                        "amenities": [
                            "WIFI",
                            "POWER_SOCKETS"
                        ],
                        "departure": {
                            "date": "2026-11-03",
                            "time": "2026-11-03T00:10:00+01:00",
                            "city_id": "40d8f682-8646-11e6-9066-549f350fcb0c",
                            "city_name": "Berlin",
                            "local_time": "00:10",
                            "station_id": "dcbc32c3-9603-11e6-9066-549f350fcb0c",
                            "station_name": "Berlin Alexanderplatz"
                        },
                        "brand_name": "FlixBus",
                        "seat_types": [
                            "SEATER"
                        ],
                        "operator_id": "mfb",
                        "sub_brand_id": null,
                        "cheapest_seat": "SEATER",
                        "operator_name": "FlixBus DACH GmbH",
                        "is_marketplace": false,
                        "vehicle_details": [],
                        "means_of_transport": "bus"
                    }
                ],
                "price": {
                    "total": 36.99,
                    "average": 36.99,
                    "currency": "EUR",
                    "original": 36.99,
                    "total_with_platform_fee": 37.98,
                    "average_with_platform_fee": 37.98
                },
                "status": "available",
                "arrival": {
                    "date": "2026-11-03",
                    "time": "2026-11-03T04:15:00+01:00",
                    "city_id": "40d91e53-8646-11e6-9066-549f350fcb0c",
                    "city_name": "Hamburg",
                    "local_time": "04:15",
                    "station_id": "dcbada9a-9603-11e6-9066-549f350fcb0c",
                    "station_name": "Hamburg ZOB"
                },
                "trip_id": "direct:78e70bcf-351d-4589-8271-9d339a9ede21:dcbc32c3-9603-11e6-9066-549f350fcb0c:dcbada9a-9603-11e6-9066-549f350fcb0c",
                "capacity": "medium",
                "duration": {
                    "hours": 4,
                    "minutes": 5,
                    "total_minutes": 245
                },
                "messages": [],
                "provider": "flixbus",
                "amenities": [
                    "WIFI",
                    "POWER_SOCKETS"
                ],
                "departure": {
                    "date": "2026-11-03",
                    "time": "2026-11-03T00:10:00+01:00",
                    "city_id": "40d8f682-8646-11e6-9066-549f350fcb0c",
                    "city_name": "Berlin",
                    "local_time": "00:10",
                    "station_id": "dcbc32c3-9603-11e6-9066-549f350fcb0c",
                    "station_name": "Berlin Alexanderplatz"
                },
                "is_direct": true,
                "transfers": 0,
                "bike_slots": 0,
                "seats_left": 1,
                "restrictions": {
                    "info_title": "",
                    "info_message": "",
                    "bikes_allowed": true,
                    "info_title_hint": "",
                    "sale_restriction": false,
                    "wheelchair_status": "unknown"
                },
                "transfer_type": "Direct",
                "after_midnight": false,
                "available_seats": 24,
                "transfer_type_key": "direct",
                "intermediate_stations_count": 0
            },
            {
                "legs": [
                    {
                        "layout": [
                            {
                                "deck": 0,
                                "column_layout": "TWO_TWO"
                            },
                            {
                                "deck": 1,
                                "column_layout": "TWO_TWO"
                            }
                        ],
                        "arrival": {
                            "date": "2026-11-03",
                            "time": "2026-11-03T09:40:00+01:00",
                            "city_id": "40de1ad1-8646-11e6-9066-549f350fcb0c",
                            "city_name": "Prague",
                            "local_time": "09:40",
                            "station_id": "dcbc6452-9603-11e6-9066-549f350fcb0c",
                            "station_name": "Prague (Central Bus Station Florenc)"
                        },
                        "ride_id": "b158d8d4-118c-40fe-a668-713cc4332421",
                        "brand_id": "a18f138c-68fa-4b45-a42f-adb0378e10d3",
                        "amenities": [
                            "WIFI",
                            "POWER_SOCKETS"
                        ],
                        "departure": {
                            "date": "2026-11-03",
                            "time": "2026-11-03T04:55:00+01:00",
                            "city_id": "40d8f682-8646-11e6-9066-549f350fcb0c",
                            "city_name": "Berlin",
                            "local_time": "04:55",
                            "station_id": "dcbc32c3-9603-11e6-9066-549f350fcb0c",
                            "station_name": "Berlin Alexanderplatz"
                        },
                        "brand_name": "FlixBus",
                        "seat_types": [
                            "SEATER"
                        ],
                        "operator_id": "mfb",
                        "sub_brand_id": null,
                        "cheapest_seat": "SEATER",
                        "operator_name": "FlixBus DACH GmbH",
                        "is_marketplace": false,
                        "vehicle_details": [],
                        "means_of_transport": "bus"
                    },
                    {
                        "layout": [
                            {
                                "deck": 0,
                                "column_layout": "TWO_TWO"
                            }
                        ],
                        "arrival": {
                            "date": "2026-11-03",
                            "time": "2026-11-03T18:05:00+01:00",
                            "city_id": "40d901a5-8646-11e6-9066-549f350fcb0c",
                            "city_name": "Munich",
                            "local_time": "18:05",
                            "station_id": "dcbabbfa-9603-11e6-9066-549f350fcb0c",
                            "station_name": "Munich central bus station"
                        },
                        "ride_id": "66d7d868-0d2d-450e-a434-48020c0b54b5",
                        "brand_id": "a18f138c-68fa-4b45-a42f-adb0378e10d3",
                        "amenities": [
                            "WIFI",
                            "POWER_SOCKETS"
                        ],
                        "departure": {
                            "date": "2026-11-03",
                            "time": "2026-11-03T12:50:00+01:00",
                            "city_id": "40de1ad1-8646-11e6-9066-549f350fcb0c",
                            "city_name": "Prague",
                            "local_time": "12:50",
                            "station_id": "dcbc6452-9603-11e6-9066-549f350fcb0c",
                            "station_name": "Prague (Central Bus Station Florenc)"
                        },
                        "brand_name": "FlixBus",
                        "seat_types": [
                            "SEATER"
                        ],
                        "operator_id": "flixpl",
                        "sub_brand_id": null,
                        "cheapest_seat": "SEATER",
                        "operator_name": "FlixBus Polska sp. z.o.o.",
                        "is_marketplace": false,
                        "vehicle_details": [],
                        "means_of_transport": "bus"
                    },
                    {
                        "layout": [
                            {
                                "deck": 1,
                                "column_layout": "TWO_TWO"
                            },
                            {
                                "deck": 0,
                                "column_layout": "TWO_TWO"
                            }
                        ],
                        "arrival": {
                            "date": "2026-11-04",
                            "time": "2026-11-04T09:30:00+01:00",
                            "city_id": "40de90ff-8646-11e6-9066-549f350fcb0c",
                            "city_name": "Rome",
                            "local_time": "09:30",
                            "station_id": "dcbd9538-9603-11e6-9066-549f350fcb0c",
                            "station_name": "Rome Tiburtina Bus station"
                        },
                        "ride_id": "4f6cf4d0-a6b1-416d-9fd2-60b133f8112a",
                        "brand_id": "a18f138c-68fa-4b45-a42f-adb0378e10d3",
                        "amenities": [
                            "WIFI",
                            "POWER_SOCKETS"
                        ],
                        "departure": {
                            "date": "2026-11-03",
                            "time": "2026-11-03T22:00:00+01:00",
                            "city_id": "40d901a5-8646-11e6-9066-549f350fcb0c",
                            "city_name": "Munich",
                            "local_time": "22:00",
                            "station_id": "dcbabbfa-9603-11e6-9066-549f350fcb0c",
                            "station_name": "Munich central bus station"
                        },
                        "brand_name": "FlixBus",
                        "seat_types": [
                            "SEATER"
                        ],
                        "operator_id": "flixital",
                        "sub_brand_id": null,
                        "cheapest_seat": "SEATER",
                        "operator_name": "FlixBus Italia S.r.l.",
                        "is_marketplace": false,
                        "vehicle_details": [],
                        "means_of_transport": "bus"
                    }
                ],
                "price": {
                    "total": 71.97,
                    "average": 71.97,
                    "currency": "EUR",
                    "original": 71.97,
                    "total_with_platform_fee": 72.96,
                    "average_with_platform_fee": 72.96
                },
                "status": "available",
                "arrival": {
                    "date": "2026-11-04",
                    "time": "2026-11-04T09:30:00+01:00",
                    "city_id": "40de90ff-8646-11e6-9066-549f350fcb0c",
                    "city_name": "Rome",
                    "local_time": "09:30",
                    "station_id": "dcbd9538-9603-11e6-9066-549f350fcb0c",
                    "station_name": "Rome Tiburtina Bus station"
                },
                "trip_id": "ic:dcbc32c3-9603-11e6-9066-549f350fcb0c:dcbd9538-9603-11e6-9066-549f350fcb0c/b158d8d4-118c-40fe-a668-713cc4332421:dcbc6452-9603-11e6-9066-549f350fcb0c:dcbc6452-9603-11e6-9066-549f350fcb0c:66d7d868-0d2d-450e-a434-48020c0b54b5:dcbabbfa-9603-11e6-9066-549f350fcb0c:dcbabbfa-9603-11e6-9066-549f350fcb0c:4f6cf4d0-a6b1-416d-9fd2-60b133f8112a",
                "capacity": "high",
                "duration": {
                    "hours": 28,
                    "minutes": 35,
                    "total_minutes": 1715
                },
                "messages": [],
                "provider": "flixbus",
                "amenities": [
                    "WIFI",
                    "POWER_SOCKETS"
                ],
                "departure": {
                    "date": "2026-11-03",
                    "time": "2026-11-03T04:55:00+01:00",
                    "city_id": "40d8f682-8646-11e6-9066-549f350fcb0c",
                    "city_name": "Berlin",
                    "local_time": "04:55",
                    "station_id": "dcbc32c3-9603-11e6-9066-549f350fcb0c",
                    "station_name": "Berlin Alexanderplatz"
                },
                "is_direct": false,
                "transfers": 2,
                "bike_slots": 0,
                "seats_left": null,
                "restrictions": {
                    "info_title": "",
                    "info_message": "",
                    "bikes_allowed": true,
                    "info_title_hint": "",
                    "sale_restriction": false,
                    "wheelchair_status": "unknown"
                },
                "transfer_type": "Transfer",
                "after_midnight": false,
                "available_seats": 36,
                "transfer_type_key": "direct#fast#direct",
                "intermediate_stations_count": null
            }
        ],
        "adults": 1,
        "brands": {
            "a18f138c-68fa-4b45-a42f-adb0378e10d3": {
                "id": "a18f138c-68fa-4b45-a42f-adb0378e10d3",
                "logo": "https://cdn-cf.cms.flixbus.com/drupal-assets/2025-01/flixbus-green.png",
                "name": "FlixBus",
                "type": "core"
            }
        },
        "cities": {
            "40d8f682-8646-11e6-9066-549f350fcb0c": {
                "id": "40d8f682-8646-11e6-9066-549f350fcb0c",
                "name": "Berlin",
                "slug": "berlin",
                "legacy_id": 88
            },
            "40d91e53-8646-11e6-9066-549f350fcb0c": {
                "id": "40d91e53-8646-11e6-9066-549f350fcb0c",
                "name": "Hamburg",
                "slug": "hamburg",
                "legacy_id": 118
            }
        },
        "filters": {
            "max_transfers": 0
        },
        "currency": "EUR",
        "stations": {
            "dcbaaee6-9603-11e6-9066-549f350fcb0c": {
                "id": "dcbaaee6-9603-11e6-9066-549f350fcb0c",
                "name": "Berlin central bus station",
                "slug": "berlin-zob",
                "is_train": false,
                "legacy_id": 1
            },
            "dcbada9a-9603-11e6-9066-549f350fcb0c": {
                "id": "dcbada9a-9603-11e6-9066-549f350fcb0c",
                "name": "Hamburg ZOB",
                "slug": "hamburg",
                "is_train": false,
                "legacy_id": 36
            }
        },
        "operators": {
            "mfb": {
                "id": "mfb",
                "url": "http://flixbus.de",
                "name": "FlixBus DACH GmbH"
            }
        },
        "to_city_id": "40d91e53-8646-11e6-9066-549f350fcb0c",
        "from_city_id": "40d8f682-8646-11e6-9066-549f350fcb0c",
        "departure_date": "2027-03-14",
        "total_before_filters": 2
    },
    "meta": {
        "billable": true,
        "upstream_calls": 1,
        "endpoint_family": "trip_search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required query parameter is missing or invalid. This response is not billable. |
| 503 | Service Unavailable | FlixBus could not be reached 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)
