# FlixBus Price Calendar API Documentation

<p><strong>FlixBus Price Calendar API Documentation</strong> The cheapest fare for each day of a date window on one route, with the cheapest trip_id, the shortest duration and the number of trips of that day. A day without trips has cheapest_price null, never 0. FlixBus has no calendar route, so Scrappa searches every day: meta.upstream_calls shows the count. If one day fails the whole request fails and is not billed. Rides after midnight count for the day they depart.</p>

- **Documentation:** [https://scrappa.co/docs/flixbus-api/flixbus_calendar](https://scrappa.co/docs/flixbus-api/flixbus_calendar)
- **API group:** FlixBus API
- **Endpoint:** `GET https://scrappa.co/api/flixbus/calendar`

## 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. |
| `start_date` | string | Yes | First day, YYYY-MM-DD, today or later. Example: 2027-03-14. |
| `days` | integer | No | Number of days from the start date, 1 to 31. Defaults to 7. Each day is one upstream search. |
| `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. |

## Example response

```json
{
    "data": {
        "days": 2,
        "adults": 1,
        "calendar": [
            {
                "date": "2027-03-14",
                "currency": "EUR",
                "trip_count": 27,
                "cheapest_price": 10.48,
                "fastest_minutes": 245,
                "cheapest_trip_id": "direct:78e70bcf-351d-4589-8271-9d339a9ede21:dcbc32c3-9603-11e6-9066-549f350fcb0c:dcbada9a-9603-11e6-9066-549f350fcb0c",
                "cheapest_price_net": 9.49
            },
            {
                "date": "2027-03-15",
                "currency": "EUR",
                "trip_count": 0,
                "cheapest_price": null,
                "fastest_minutes": null,
                "cheapest_trip_id": null,
                "cheapest_price_net": null
            }
        ],
        "currency": "EUR",
        "start_date": "2027-03-14",
        "to_city_id": "40d91e53-8646-11e6-9066-549f350fcb0c",
        "from_city_id": "40d8f682-8646-11e6-9066-549f350fcb0c",
        "days_with_trips": 1
    },
    "meta": {
        "billable": true,
        "upstream_calls": 2,
        "endpoint_family": "price_calendar"
    },
    "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)
