# FlixBus Bus Trips, Fares & Seat Availability Scraper (`scrapers_lat/flixbus-scraper`) Actor

Scrape FlixBus and FlixTrain intercity bus trips by route and date across 40+ countries in Europe and the US. Extract price, currency, seats available, transfers, duration, amenities and stations. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/flixbus-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Travel, E-commerce, Automation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $11.54 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![FlixBus Bus Trips, Fares & Seat Availability Scraper](https://scrapers.lat/banners/flixbus-scraper.png)](https://console.apify.com/actors/TBwZsEvj4DHYTe529/input)

## FlixBus Bus Trips, Fares & Seat Availability Scraper

Here is one real result, a multi-leg trip, with every field the actor returns:

```json
{
  "imageUrl": "https://cdn-cf.cms.flixbus.com/drupal-assets/2025-01/flixbus-green.png",
  "origin": "Berlin",
  "destination": "Munich",
  "departure": "2026-08-24T07:15:00+02:00",
  "arrival": "2026-08-24T17:35:00+02:00",
  "durationText": "10h 20m",
  "durationMinutes": 620,
  "price": 57.48,
  "priceWithFee": 58.47,
  "currency": "EUR",
  "status": "available",
  "seatsAvailable": 28,
  "capacity": "medium",
  "bikeSlots": 0,
  "transfers": 1,
  "transferType": "Transfer",
  "operator": "FlixBus DACH GmbH",
  "operators": ["FlixBus DACH GmbH", "FlixBus Polska sp. z.o.o."],
  "brand": "FlixBus",
  "meansOfTransport": "bus",
  "amenities": ["WiFi", "Power sockets"],
  "decks": 2,
  "seatLayout": "TWO_TWO",
  "departureStation": "Berlin Südkreuz",
  "arrivalStation": "Munich Fröttmaning",
  "bikesAllowed": true,
  "wheelchairStatus": "unknown",
  "tripId": "ic:dcbb994f-9603-11e6-9066-549f350fcb0c:dcc0b7f3-9603-11e6-9066-549f350fcb0c/73b28cd0-e073-453c-8885-b9ed59cac169:dcbc6452-9603-11e6-9066-549f350fcb0c:dcbc6452-9603-11e6-9066-549f350fcb0c:94e87ca9-57df-41cd-9d33-15fb8a8a65ce",
  "legs": [
    {
      "from": "Berlin Südkreuz",
      "to": "Prague (Central Bus Station Florenc)",
      "departure": "2026-08-24T07:15:00+02:00",
      "arrival": "2026-08-24T11:40:00+02:00",
      "meansOfTransport": "bus",
      "operator": "FlixBus DACH GmbH",
      "brand": "FlixBus",
      "amenities": ["WIFI", "POWER_SOCKETS"]
    },
    {
      "from": "Prague (Central Bus Station Florenc)",
      "to": "Munich Fröttmaning",
      "departure": "2026-08-24T12:50:00+02:00",
      "arrival": "2026-08-24T17:35:00+02:00",
      "meansOfTransport": "bus",
      "operator": "FlixBus Polska sp. z.o.o.",
      "brand": "FlixBus",
      "amenities": ["WIFI", "POWER_SOCKETS"]
    }
  ],
  "bookingUrl": "https://shop.flixbus.com/search?departureCity=88&arrivalCity=94&rideDate=24.08.2026&adult=1&_locale=en&currency=EUR",
  "observedAt": "2026-08-10T14:41:24.204Z",
  "error": null
}
```

The most complete FlixBus trip scraper available. It returns every field a FlixBus route search exposes for each trip (departure and arrival times, duration, fare and fare-with-fee, live seat availability, transfers, operators, amenities, seat layout, stations, and a bookable deep link), plus a per-leg breakdown for multi-leg trips, and gives you route, date, party-size, and currency controls to price exactly the trips you need.

**📥 [Input](https://apify.com/scrapers_lat/flixbus-scraper/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/flixbus-scraper/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/flixbus-scraper/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/flixbus-scraper/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Coverage](https://img.shields.io/badge/Coverage-Europe%20%26%20US-blue)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)
![Billing](https://img.shields.io/badge/Billing-Pay%20per%20result-brightgreen)

### Table of contents

- [What it does](#what-it-does)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Example output record](#example-output-record)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Billing and limits](#billing-and-limits)
- [FAQ and troubleshooting](#faq-and-troubleshooting)

### What it does

The actor resolves the origin and destination city names you pass to the best-matching FlixBus cities, searches the route for your travel date and party size, and writes one normalized record per trip to the run's dataset. Each record carries the departure and arrival times, total duration, the base fare and the fare including the service fee (for your party size in your chosen currency), live seat availability and capacity band, the number of transfers, the operating carriers, the on-board amenities, seat layout, boarding and drop-off stations, and a deep link that opens the trip in the FlixBus shop.

Multi-leg trips also include a `legs` array with each individual segment (from, to, times, operator, amenities). Missing source values are returned as `null`, never invented.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns up to 10 trips from Berlin to Munich, priced for one adult in euros.

```json
{
  "fromCity": "Berlin",
  "toCity": "Munich",
  "departureDate": "2026-08-24",
  "passengers": 1,
  "currency": "EUR",
  "maxTrips": 10
}
```

Leave `departureDate` empty to search a date about two weeks from today. City names are resolved automatically, so `New York` or `Paris` work without a station code.

### Input reference

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `fromCity` | string | yes | `Berlin` | Origin city name, for example `Berlin`, `Paris`, `New York`. Resolved to the best-matching FlixBus city. |
| `toCity` | string | yes | `Munich` | Destination city name, for example `Munich`, `Amsterdam`, `Washington`. Resolved to the best-matching FlixBus city. |
| `departureDate` | string | no | (about two weeks out) | Travel date as `YYYY-MM-DD`. If empty, the scraper uses a date about two weeks from today. |
| `passengers` | integer | no | `1` | Number of adult passengers (1 to 9). Fares are returned for this party size. |
| `currency` | enum | no | `EUR` | Fare currency: `EUR`, `USD`, `GBP`, `CHF`, `PLN`, `CZK`, `DKK`, `SEK`, `NOK`, `HUF`, `RON`, `BGN`, `HRK`, `BRL`. |
| `maxTrips` | integer | no | `10` | Maximum trips to collect for the route and date. Free Apify plans are capped at 10. |

`fromCity` and `toCity` are required. If a city cannot be resolved or the route has no service on the date, the actor writes a single item with a populated `error` field.

### Output reference

One dataset item per trip. Types: `string`, `integer`, `number`, `boolean`, `string[]`, `object[]`, or `null` when the source value is absent.

| Field | Type | Description |
|---|---|---|
| `imageUrl` | string | Brand image URL for the trip. |
| `origin` | string | Resolved origin city. |
| `destination` | string | Resolved destination city. |
| `departure` | string | Departure timestamp with timezone offset (ISO 8601). |
| `arrival` | string | Arrival timestamp with timezone offset (ISO 8601). |
| `durationText` | string | Human-readable trip duration, for example `10h 20m`. |
| `durationMinutes` | integer | Total trip duration in minutes. |
| `price` | number | Base fare for the party size, in the chosen currency. |
| `priceWithFee` | number | Fare including the service fee. |
| `currency` | string | Fare currency code. |
| `status` | string | Booking status, for example `available`. |
| `seatsAvailable` | integer | Live number of seats still available, or `null`. |
| `capacity` | string | Capacity band, for example `low`, `medium`, `high`. |
| `bikeSlots` | integer | Number of bike slots available. |
| `transfers` | integer | Number of transfers (0 for a direct trip). |
| `transferType` | string | `Direct` or `Transfer`. |
| `operator` | string | Primary operating carrier. |
| `operators` | string\[] | All operating carriers across the trip. |
| `brand` | string | Brand, for example `FlixBus`. |
| `meansOfTransport` | string | Mode, for example `bus`. |
| `amenities` | string\[] | On-board amenities, for example `WiFi`, `Power sockets`. |
| `decks` | integer | Number of decks on the vehicle. |
| `seatLayout` | string | Seat layout code, for example `TWO_TWO`. |
| `departureStation` | string | Boarding station name. |
| `arrivalStation` | string | Drop-off station name. |
| `bikesAllowed` | boolean | Whether bikes are allowed on this trip. |
| `wheelchairStatus` | string | Wheelchair accessibility status, or `unknown`. |
| `tripId` | string | FlixBus internal trip identifier. |
| `legs` | object\[] | Per-segment breakdown for multi-leg trips (from, to, times, operator, amenities). Absent for direct trips. |
| `bookingUrl` | string | Deep link that opens the trip in the FlixBus shop. |
| `observedAt` | string | ISO 8601 timestamp of when the record was collected. |
| `error` | string | `null` on success. On a failed run, a single item with a populated `error` field is written instead. |

### Example output record

Real record from a live run (input `{"fromCity":"Berlin","toCity":"Munich","departureDate":"2026-08-24","maxTrips":10}`), a direct trip (no `legs` array):

```json
{
  "imageUrl": "https://cdn-cf.cms.flixbus.com/drupal-assets/2025-01/flixbus-green.png",
  "origin": "Berlin",
  "destination": "Munich",
  "departure": "2026-08-24T07:40:00+02:00",
  "arrival": "2026-08-24T15:35:00+02:00",
  "durationText": "7h 55m",
  "durationMinutes": 475,
  "price": 32.99,
  "priceWithFee": 33.98,
  "currency": "EUR",
  "status": "available",
  "seatsAvailable": 31,
  "capacity": "high",
  "bikeSlots": 0,
  "transfers": 0,
  "transferType": "Direct",
  "operator": "FlixBus DACH GmbH",
  "operators": ["FlixBus DACH GmbH"],
  "brand": "FlixBus",
  "meansOfTransport": "bus",
  "amenities": ["WiFi", "Power sockets"],
  "decks": 1,
  "seatLayout": "TWO_TWO",
  "departureStation": "Berlin central bus station",
  "arrivalStation": "Munich central bus station",
  "bikesAllowed": true,
  "wheelchairStatus": "unknown",
  "tripId": "direct:2a3d7728-df32-4175-9cd2-7f7e4e1f90b1:dcbaaee6-9603-11e6-9066-549f350fcb0c:dcbabbfa-9603-11e6-9066-549f350fcb0c",
  "bookingUrl": "https://shop.flixbus.com/search?departureCity=88&arrivalCity=94&rideDate=24.08.2026&adult=1&_locale=en&currency=EUR",
  "observedAt": "2026-08-10T14:41:24.297Z",
  "error": null
}
```

### Run via API and CLI

Start a run and wait for it to finish, then read the dataset. Replace `<TOKEN>` with your Apify API token.

Run synchronously and get dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~flixbus-scraper/run-sync-get-dataset-items?token=%3CTOKEN%3E" \
  -H "Content-Type: application/json" \
  -d '{"fromCity":"Berlin","toCity":"Munich","departureDate":"2026-08-24","passengers":2,"currency":"EUR","maxTrips":25}'
```

Start a run asynchronously:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~flixbus-scraper/runs?token=%3CTOKEN%3E" \
  -H "Content-Type: application/json" \
  -d '{"fromCity":"New York","toCity":"Washington","currency":"USD","maxTrips":50}'
```

Apify CLI:

```bash
apify call scrapers_lat/flixbus-scraper \
  --input '{"fromCity":"Paris","toCity":"Amsterdam","departureDate":"2026-09-01"}'
```

### Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing `format`:

```bash
## JSON
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&clean=true&format=csv"

## Paginate large datasets
curl "https://api.apify.com/v2/datasets/%3CDATASET_ID%3E/items?token=%3CTOKEN%3E&offset=1000&limit=1000"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object. Use `offset` and `limit` to page through large result sets. `clean=true` drops empty and internal fields.

### Billing and limits

- **Pay per result.** You are charged per trip record returned (`result` event). See the [pricing tab](https://apify.com/scrapers_lat/flixbus-scraper/pricing) for the current per-result price.
- **No charge on failure.** If a run errors, the actor writes a single item with a populated `error` field and does not charge for it. Empty runs cost nothing.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached, the actor stops emitting and charging further billable results.
- **Free Apify plans** are capped at 10 trips per run. Upgrade for higher `maxTrips`.
- **Live availability.** Fares and seat counts are pulled at scrape time and change quickly. Re-run close to booking for current numbers.

### FAQ and troubleshooting

**How do I set the route?**
Pass `fromCity` and `toCity` as plain city names. The scraper resolves each to the best-matching FlixBus city, so station codes are not needed.

**What date does it search if I leave `departureDate` empty?**
A date about two weeks from today. Set `departureDate` (`YYYY-MM-DD`) to control it.

**Can I price for more than one passenger or a different currency?**
Yes. Set `passengers` (1 to 9) and `currency`. Fares are returned for that party size in that currency.

**What is `priceWithFee`?**
The total including the FlixBus service fee. `price` is the base fare before the fee.

**How do I read a multi-leg trip?**
When `transfers` is greater than 0, the `legs` array lists each segment with its own stations, times, operator, and amenities. Direct trips omit `legs`.

**A run returned 0 records. Why?**
Either a city could not be resolved, or the route has no service on the date. Check the city spelling and try another date. Zero-result runs are not charged.

**Is this an official FlixBus tool?**
No. This actor is independent and has no affiliation with FlixBus or Flix SE. It reads only publicly available trip and fare data. Use the results in accordance with FlixBus's terms and applicable law.

### Related scrapers

- [Ryanair Flights Scraper](https://apify.com/scrapers_lat/ryanair-flights-scraper): Ryanair flights, fares, and availability by route and date.
- [Deutsche Bahn Scraper](https://apify.com/scrapers_lat/deutsche-bahn-scraper): German rail connections, times, and fares.
- [Booking Hotels Scraper](https://apify.com/scrapers_lat/booking-hotels-scraper): hotel listings and prices from Booking.com.
- [Eventbrite Scraper](https://apify.com/scrapers_lat/eventbrite-scraper): events with dates, venues, and ticket info.
- [SeatGeek Events Scraper](https://apify.com/scrapers_lat/seatgeek-events-scraper): live event listings and ticket prices.

### More scrapers at scrapers.lat

Built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for US and Latin American public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> Independent tool, not affiliated with FlixBus or Flix SE. Accesses only publicly available trip and fare data. Use in accordance with FlixBus's terms and applicable law.

# Actor input Schema

## `maxTrips` (type: `integer`):

Maximum number of trips to collect for the route and date. Optional.

## `fromCity` (type: `string`):

Origin city name, for example 'Berlin', 'Paris' or 'New York'. The scraper resolves it to the best matching FlixBus city.

## `toCity` (type: `string`):

Destination city name, for example 'Munich', 'Amsterdam' or 'Washington'. The scraper resolves it to the best matching FlixBus city.

## `departureDate` (type: `string`):

Travel date as YYYY-MM-DD. If left empty, the scraper uses a date about two weeks from today.

## `passengers` (type: `integer`):

Number of adult passengers. Prices are returned for this party size.

## `currency` (type: `string`):

Currency in which fares are returned.

## Actor input object example

```json
{
  "maxTrips": 10,
  "fromCity": "Berlin",
  "toCity": "Munich",
  "passengers": 1,
  "currency": "EUR"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxTrips": 10,
    "fromCity": "Berlin",
    "toCity": "Munich",
    "passengers": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/flixbus-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxTrips": 10,
    "fromCity": "Berlin",
    "toCity": "Munich",
    "passengers": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/flixbus-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxTrips": 10,
  "fromCity": "Berlin",
  "toCity": "Munich",
  "passengers": 1
}' |
apify call scrapers_lat/flixbus-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/flixbus-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TBwZsEvj4DHYTe529/builds/kvirhAaibwih5sQyP/openapi.json
