FlixBus Trips Scraper - Departures, Stations, Seats
Pricing
from $2.54 / 1,000 trips
FlixBus Trips Scraper - Departures, Stations, Seats
Search FlixBus trips between two cities on a date. Each row has departure and arrival times, stations, duration, direct or transfer status, leg count, seats, bike slots, amenities and operators. Three inputs are required; adults, locale, currency and proxy are optional.
FlixBus Trip Search Scraper - Departures, Stations, Prices, Seats
FlixBus Trip Search Scraper returns one dataset row for each trip it finds between two cities on a date: departure and arrival times, city and station names, duration, price fields, seat and bike availability, transfer detail, amenities and operators. It calls the same JSON endpoints the FlixBus mobile app uses at global.api.flixbus.com; there is no browser, login or API key involved. Seven input fields are declared, three of them required, and the parser writes 28 field properties. The overview dataset view projects 13 of those fields into a table.
An agent can ask for a route such as Berlin to Munich or Paris to Amsterdam, pick a departure date and passenger count, then read the default dataset through the Apify API or export it as JSON, CSV or Excel. City names are resolved through FlixBus's own autocomplete before the search, so the input takes Berlin rather than an internal city ID. The full field list is in the data dictionary index and the overview column page.
What does this Actor return?
One trip is one row in the default dataset. The dataset schema declares 28 fields and one view, overview, with 13 columns. The other 15 fields are still written to the dataset, but they are not in that view's table.
| Data slice | Fields written by the parser | What an agent can do with it |
|---|---|---|
| Trip identity | tripUid, provider, transferType, transferTypeKey | Key rows by tripUid, separate direct trips from transfers |
| Schedule | departureDate, arrivalDate, departureCityName, arrivalCityName, departureStationName, arrivalStationName, durationHours, durationMinutes | Sort by time, compare station pairs, filter by duration |
| Price | priceTotal, priceTotalWithFee, priceOriginal | Compare the quoted total, the fee-inclusive total and the pre-discount value |
| Availability | seatsAvailable, seatsLeftAtPrice, bikeSlots, capacity, bikesAllowed | Filter for remaining seats, bike space or a capacity level of low, medium or high |
| Route detail | legCount, legs, intermediateStationsCount, amenities, operators | Separate a direct bus from a transfer and read per-leg detail |
| Query echo | fromCityInput, toCityInput, departureDateInput | Keep the requested route and date next to each result |
The overview view shows departureDate, arrivalDate, departureCityName, arrivalCityName, departureStationName, arrivalStationName, transferType, durationHours, durationMinutes, priceTotal, priceTotalWithFee, seatsAvailable and legCount. Request ?view=overview on the dataset API to get that column order. The overview page lists those 13 columns in the order the view declares, and the index lists all 28 fields.
What does one trip row contain?
Times are ISO 8601 strings on departureDate and arrivalDate; duration is split into integer durationHours and durationMinutes. Station names come from the search response's station table, and city names from its city table, so a row can name Berlin ZOB and Munich ZOB rather than only the cities. transferType is Direct or Transfer, while transferTypeKey keeps the raw upstream key. provider names the trip provider, for example flixbus.
The parser builds legs as an array of leg objects. Each entry carries ride_id, ISO departure and arrival dates, station IDs, means_of_transport, leg-level amenities, operator_id, brand_id, layout_configuration with deck values, seat_types, and a cheapest_seat label. The dataset schema describes legs as a JSON array of leg details with a string type; amenities and operators are flat comma-separated strings collected across all legs and sorted by the parser. intermediateStationsCount is described in the schema for direct trips. bikesAllowed is a boolean from the trip's restrictions.
The billing tests in the repository include one row shaped exactly like parser output. It describes a Direct Berlin to Munich trip on 20 December 2026, leaving Berlin ZOB at 08:00 and arriving at Munich ZOB at 12:00, with a duration of 4 hours and 0 minutes, 1 leg, 20 seats available, 5 left at the quoted rate, 2 bike slots, capacity high, operator FLIXBUS, amenities power_sockets, wifi and bikesAllowed: true. That is a checked-in fixture, not a live observation.
Which inputs does a run take?
fromCity, toCity and departureDate are the three required inputs. The schema declares seven properties in total; the other four have defaults. The date picker sends an ISO 8601 value, which the Actor converts to the d.m.Y format FlixBus expects, so 2026-12-20 becomes 20.12.2026.
| Input | Required | Schema default or prefill | Effect |
|---|---|---|---|
fromCity | yes | Berlin | Origin city name, passed to autocomplete |
toCity | yes | Munich | Destination city name, passed to autocomplete |
departureDate | yes | 2026-12-20 | Search date, accepted as ISO 8601 |
adults | no | 1 | Integer, schema range 1 to 10 |
locale | no | en | Locale used for city resolution and results; de and fr are named as examples |
currency | no | EUR | ISO 4217 code; USD and GBP are named as examples |
proxyConfiguration | no | {"useApifyProxy": false} | Apify proxy settings for the HTTP session |
A minimal search uses only the required fields:
{"fromCity": "Berlin","toCity": "Munich","departureDate": "2026-12-20"}
The same input with an explicit passenger count and locale:
{"fromCity": "Paris","toCity": "Amsterdam","departureDate": "2026-12-20","adults": 1,"locale": "en","currency": "EUR"}
Which cities and routes can I search?
Any city name the FlixBus autocomplete endpoint resolves can be used as an origin or destination. The schema names Berlin, Munich, Paris, Amsterdam and Madrid in its examples. The client sends the city string as q, the locale as lang and limit: 1, then takes the first match, so a misspelled or ambiguous name resolves to one city rather than a set of choices.
The number of rows a route yields depends on what FlixBus publishes for that date. A check of this Actor recorded on 2026-10-20, using the same departure date for three routes, returned 35 trips for Paris to Amsterdam, 21 for Berlin to Munich and 2 for Madrid to Barcelona. Those are observed counts, not guaranteed returns. The Actor has no maxItems input; the dataset contains the trips the search returns unless the run's charge limit stops delivery early.
How does the Actor find trips?
Two public endpoints on https://global.api.flixbus.com do the work. GET /mobile/v1/network/autocomplete resolves each city name to a FlixBus city ID. GET /search/service/v4/search then receives from_city_id, to_city_id, departure_date, adults, locale, currency, search_by=cities and a products JSON object with the adult count. Requests identify themselves as FlixBus/9.82.0 (Android; de.flixbus.app).
Each HTTP request has a 30-second timeout and up to 3 attempts. Status codes 429, 500, 502, 503 and 504, network errors and invalid JSON are retried; the waits between attempts are 2 and 4 seconds. A non-retryable HTTP error is raised at once. After all attempts fail, the run ends with an API error: status message. A response with no trips writes no rows and takes no charge.
proxyConfiguration is optional and prefilled with useApifyProxy: false. When supplied, the Actor creates an Apify proxy configuration and uses the resulting URL for both endpoints. Frequent or repeated searches are the case where a proxy matters, because the endpoint can return HTTP 429.
How are delivered trips counted and charged?
The code declares two billable event names, trip and search. It reads the live pricing at the start of each run and resolves which one applies; the two names represent different charging models and are never substituted for each other. When trip is priced, each delivered trip is written and charged in one step, keyed by tripUid. Rows without a uid are dropped as unresolved, duplicate uids are dropped, and rows that would fail the dataset schema are dropped before the write.
On the legacy search path, one flat charge covers the result set and is taken before the rows are written. On a local or free run where neither event is priced, every trip is delivered unbilled. There are no enrichment events on this Actor: a trip is one flat record. Current amounts are on the Actor's Pricing tab.
If the run's total charge limit is reached mid-batch, the write is truncated to what can be charged, and the status message says the maximum cost setting, not the end of the results, stopped the run. A short dataset after that message means the limit needs raising to collect the rest. The output schema exposes the default dataset items URL as results, so the same rows can be read through the Apify API.
What happens when a search fails or returns nothing?
A city that autocomplete cannot resolve raises a 404 City not found error inside the client; the run ends FAILED with an API error: message naming the city. Input faults are treated differently: a missing required field, a non-integer adults value, a value below 1 or a departureDate that is not ISO 8601 ends SUCCEEDED with a status message explaining the fault and writes no rows. That choice keeps a pasted typo out of the run failure rate.
A valid search that finds no trips also ends SUCCEEDED. Its status message names the origin, destination and date, and no charge is taken because there is nothing to deliver. For scheduled runs, this means an empty dataset is distinguishable from a stopped run by reading the status message.
Which other travel scrapers cover the same workflow?
This Actor is part of a travel and booking toolkit. The related Actors below cover other parts of the same research task, with links to their Store pages:
- Booking.com Scraper - hotel properties, room rates and availability.
- Agoda Scraper - Agoda search results, pricing and property details.
- Airbnb Scraper - listings, details and reviews.
- Hostelworld Scraper - hostels, listings and property detail.
- Changi Airport Timetable Scraper - arrival and departure boards for Singapore Changi (SIN).
- eSIMDB Travel eSIM Scraper - travel eSIM plans by country and region.
What do people ask before running this?
Do I need a FlixBus account or API key? No. The Actor calls the public autocomplete and search endpoints used by the FlixBus Android app and sends no credentials. The only account needed is the Apify account that starts the run.
Can I run the same search on a schedule? Yes. Use the Apify Scheduler with a saved task whose input fixes fromCity, toCity, adults, locale and currency, and set departureDate for the date to check. Each run writes its own dataset.
Does it return transfers and per-leg detail? Yes. transferType marks a trip as Direct or Transfer, legCount counts the legs, and legs carries per-leg dates, station IDs, operator and brand IDs, amenities, seat types and deck layout.
Can I filter for seats, bikes and capacity? Yes. seatsAvailable and seatsLeftAtPrice carry seat counts, bikeSlots and bikesAllowed cover bikes, and capacity holds the upstream low, medium or high indicator.
How many trips will one run return? Whatever the search returns for that route and date. The measured counts on 2026-10-20 were 35 trips for Paris to Amsterdam, 21 for Berlin to Munich and 2 for Madrid to Barcelona. A charge limit can stop delivery early, in which case the status message says so.
What happens if a city name is wrong? Autocomplete takes its first match, so check the resolved name if results look odd. If no city matches, the run fails with API error: [404] City not found: <name>.
Can I download or query the results? Yes. The Dataset tab exports JSON, CSV, Excel and HTML, and the output schema's results property points to the default dataset items URL for API access. The overview view can be requested with ?view=overview.
Where is the full field list? The data dictionary index documents all 28 fields, and the overview page documents the 13 columns in the default view.