# FlixBus Fares Scraper — Bus Prices, Times & Seats by Date (`yugenox/flixbus-fares-scraper`) Actor

Scrape FlixBus fares between any cities for any dates: departure and arrival times, stations, duration, transfers, total and per-passenger price, seats left, operator and amenities. Date ranges, return trips, passengers, 14 currencies. No login.

- **URL**: https://apify.com/yugenox/flixbus-fares-scraper.md
- **Developed by:** [Yugenox Corp](https://apify.com/yugenox) (community)
- **Categories:** Travel, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 trips

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## FlixBus Fares Scraper — Bus Prices, Times & Seats by Date

Get **FlixBus and FlixTrain fares between any two cities for any dates**: departure and arrival times, stations, duration, number of changes and where you change, the total and per-passenger price (with and without the service fee), seats still available, operator, brand and on-board amenities. One row per trip, exactly as FlixBus offers it for the date you search.

Works for every FlixBus market: Europe, the UK, the USA, Canada, Brazil and more. No login, no browser.

### What you can do with it

- **Price comparison and travel sites**: fill your search results or fare calendars with FlixBus trips.
- **Fare monitoring**: schedule a daily run for your routes and watch prices and seats change as the date gets closer.
- **Mobility research**: frequency, travel times, transfer patterns and price levels between city pairs.
- **Travel agencies and group planners**: cheapest departures for a group (adults and children) over a whole month.

### Input

| Field | What it does |
|---|---|
| **Routes** | One per line: `Berlin -> Munich`, `Toronto -> Montreal`, `Paris, FR -> Amsterdam`. `to`, `→` and `|` work too. Add a country code after a comma when a name exists in several countries. |
| Also search the way back | Searches each route in the opposite direction too. |
| Departure date / Number of days | First date (empty = tomorrow) and how many consecutive days to search, up to 120. |
| Specific dates | Exact dates instead of a range. |
| Adults / Children 6-14 / Children 0-5 | Passengers. Prices are the total for everyone; the per-passenger price has its own field. |
| Currency | EUR, USD, CAD, GBP, PLN, CZK, CHF, SEK, DKK, NOK, HUF, RON, BGN, BRL. |
| Direct trips only / Bookable trips only / Max price | Filters. Trips you filter out are not charged. |
| Max trips | Cap for the whole run (0 = no limit). |

Example:

```json
{
  "routes": ["Berlin -> Munich", "Toronto -> Montreal"],
  "returnTrips": true,
  "startDate": "2026-12-18",
  "days": 7,
  "adults": 2,
  "currency": "EUR",
  "maxItems": 1000
}
```

### Output

One row per trip (trimmed; `legs` has one entry per bus or train):

```json
{
  "route": "Berlin → Munich",
  "searchDate": "2026-11-20",
  "fromCity": "Berlin",
  "toCity": "Munich",
  "departureTime": "2026-11-20T07:40:00+01:00",
  "arrivalTime": "2026-11-20T15:35:00+01:00",
  "duration": "7h 55m",
  "durationMinutes": 475,
  "departureStation": "Berlin central bus station",
  "arrivalStation": "Munich central bus station",
  "transfers": 0,
  "transferType": "Direct",
  "transferCities": [],
  "price": 32.99,
  "pricePerPassenger": 32.99,
  "priceWithPlatformFee": 33.98,
  "currency": "EUR",
  "passengers": { "adults": 1, "children6to14": 0, "children0to5": 0 },
  "seatsAvailable": 26,
  "capacity": "medium",
  "status": "available",
  "meansOfTransport": ["bus"],
  "operators": ["FlixBus DACH GmbH"],
  "brands": ["FlixBus"],
  "amenities": ["WIFI", "POWER_SOCKETS"],
  "isAfterMidnight": false,
  "legs": [{ "departureStation": "Berlin central bus station", "arrivalStation": "Munich central bus station", "meansOfTransport": "bus", "operator": "FlixBus DACH GmbH" }],
  "bookingUrl": "https://shop.flixbus.com/search?departureCity=40d8f682-8646-11e6-9066-549f350fcb0c&arrivalCity=40d901a5-8646-11e6-9066-549f350fcb0c&rideDate=20.11.2026&adult=1&_locale=en"
}
```

Also in every row: city and station IDs, original price, seats left at this price (when FlixBus shows it), bike slots, seat types, partner-operator flag, wheelchair status, trip ID, position and scrape time. Download as JSON, CSV, Excel or use the API.

### Pricing

Pay per result:

- **$3.00 per 1,000 trips** saved ($0.003 per trip).
- **$0.0005 per route-date search that finds nothing to save** (no service that day, everything filtered out or already saved).
- **$0.001 per run start.**

Example: one route for 30 days with about 20 departures a day ≈ 600 trips ≈ $1.80.

### Tips

- One search = one route on one date. A month of fares for 10 routes is 300 searches and usually finishes in a few minutes.
- FlixBus shows night departures just after midnight with the day before (`isAfterMidnight: true`). When you search consecutive days, each trip is saved once.
- Prices change often; schedule the actor (daily or hourly) to track them.
- If a city name is ambiguous, add the country: `Frankfurt, DE`, `London, GB`, `Portland, US`.

### FAQ

**Is it legal to scrape FlixBus?**
This actor reads the same public fare information anyone sees on the FlixBus website without logging in: timetables, prices and seat availability. It does not log in, book, or bypass any access control. Using public data is generally lawful, but how you use it is your responsibility; check the rules that apply to your use case (for example, if you republish prices) and ask a lawyer if you are unsure.

**Does it access any private data?**
No. It only collects trip and fare data (cities, stations, times, prices, seats, operators). No passenger, customer or account data is read.

**Why did a route return no trips?**
FlixBus has no service between those cities on that date, or the city name matched a different place. The run's status message says which, and those searches cost $0.0005 each.

**What happens if FlixBus refuses the requests?**
The run stops cleanly with a plain message, keeps what was saved, and you are not charged for refused searches.

# Actor input Schema

## `routes` (type: `array`):

One route per line: from city -> to city, e.g. "Berlin -> Munich", "Toronto -> Montreal", "Paris, FR -> Amsterdam". "to", "→" and "|" work too. Add a country code after a comma when a city name exists in several countries. FlixBus city IDs (UUIDs) are accepted as well.

## `returnTrips` (type: `boolean`):

Also search every route in the opposite direction (Munich -> Berlin for Berlin -> Munich) on the same dates.

## `startDate` (type: `string`):

First departure date to search (YYYY-MM-DD). Empty = tomorrow.

## `days` (type: `integer`):

How many consecutive days to search from the departure date, e.g. 7 for a week or 30 for a month of fares per route. Each day of each route is one search.

## `dates` (type: `array`):

Optional: exact dates to search instead of a date range (YYYY-MM-DD), e.g. 2026-12-23, 2026-12-30.

## `adults` (type: `integer`):

Adult passengers (15+). Prices are the total for all passengers; the per-passenger price is in its own field.

## `children6to14` (type: `integer`):

Children aged 6 to 14.

## `children0to5` (type: `integer`):

Children aged 0 to 5.

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

Currency FlixBus prices the trips in.

## `directOnly` (type: `boolean`):

Keep only trips without a change of bus or train.

## `onlyAvailable` (type: `boolean`):

Leave out trips FlixBus marks as sold out or not bookable.

## `maxPrice` (type: `integer`):

Optional: leave out trips whose total price (all passengers, in the chosen currency) is above this. 0 = no limit.

## `maxItems` (type: `integer`):

Maximum number of trips to save for the whole run. 0 = no limit.

## `proxyConfiguration` (type: `object`):

Apify Proxy (datacenter) works well for FlixBus and comes with every Apify plan.

## `_noResidential` (type: `boolean`):

Test switch: use Apify datacenter proxy even if residential is selected above.

## Actor input object example

```json
{
  "routes": [
    "Berlin -> Munich"
  ],
  "returnTrips": false,
  "days": 1,
  "adults": 1,
  "children6to14": 0,
  "children0to5": 0,
  "currency": "EUR",
  "directOnly": false,
  "onlyAvailable": false,
  "maxPrice": 0,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "_noResidential": false
}
```

# Actor output Schema

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

All scraped trips.

## `run` (type: `string`):

Status and statistics for this run.

## `report` (type: `string`):

RUN_REPORT: how the run ended, counts, requests and proxy use.

# 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 = {
    "routes": [
        "Berlin -> Munich"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("yugenox/flixbus-fares-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 = {
    "routes": ["Berlin -> Munich"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("yugenox/flixbus-fares-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 '{
  "routes": [
    "Berlin -> Munich"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call yugenox/flixbus-fares-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yugenox/flixbus-fares-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/o0gcRw5WKx7l1Xru0/builds/8vClyKB9TG6jhT7HX/openapi.json
