FlixBus API

FlixBus API for Bus and Train Trip Search, Prices, Stops, and a Cheapest-Day Calendar

Scrappa's FlixBus API returns structured JSON from FlixBus, the long-distance bus and FlixTrain network. Look up cities and stations by name, search the trips of a day between two cities with fares, seats left, duration and transfers, open one trip for the line and every stop, and find the cheapest day of a route over up to 31 days. Scrappa is an independent service and is not affiliated with or endorsed by FlixBus.

500 free credits
No card needed
From $0.20 / 1k
Pay as you go
Structured JSON
Ready for apps
API key access
Test in minutes
9
Endpoints
31
Days per calendar
$0.20
Per 1k requests

Try it now

Make one request. Inspect structured JSON.

Use the first endpoint in this API family with a Scrappa API key. Every account includes 500 free monthly credits, so you can validate the response shape before buying credits.

Request preview
Request
curl -X GET "https://scrappa.co/api/flixbus/search?from_city_id=40d8f682-8646-11e6-9066-549f350fcb0c&to_city_id=40d91e53-8646-11e6-9066-549f350fcb0c&departure_date=2027-03-14&adults=1&sort=price" \
  -H "Accept: application/json" \
  -H "X-API-KEY: YOUR_API_KEY"
JSON response
{
  "success": true,
  "data": {
    "from_city_id": "40d8f682-8646-11e6-9066-549f350fcb0c",
    "to_city_id": "40d91e53-8646-11e6-9066-549f350fcb0c",
    "departure_date": "2027-03-14",
    "adults": 1,
    "currency": "EUR",
    "sort": "price",
    "total": 27,
    "trips": [
      {
        "trip_id": "direct:78e70bcf-351d-4589-8271-9d339a9ede21:dcbc32c3-9603-11e6-9066-549f350fcb0c:dcbada9a-9603-11e6-9066-549f350fcb0c",
        "departure": {
          "local_time": "00:10",
          "station_name": "Berlin Alexanderplatz"
        },
        "arrival": {
          "local_time": "04:15",
          "station_name": "Hamburg ZOB"
        },
        "duration": {
          "hours": 4,
          "minutes": 5,
          "total_minutes": 245
        },
        "transfers": 0,
        "price": {
          "currency": "EUR",
          "total": 36.99,
          "total_with_platform_fee": 37.98
        },
        "seats_left": 1,
        "capacity": "medium",
        "amenities": [
          "WIFI",
          "POWER_SOCKETS"
        ]
      }
    ]
  },
  "meta": {
    "endpoint_family": "trip_search",
    "billable": true,
    "upstream_calls": 1
  }
}

What you can build

Structured data for real applications. Here are some ideas.

Fare Monitoring

Track the cheapest fare for a route and day, with fee-inclusive prices and the seats left at that price.

Cheapest Day Finder

Compare the lowest fare of every day in a window of up to 31 days to pick the best day to travel.

Travel Search Features

Add city and station autocomplete and trip results with transfers and amenities to your own travel app.

Route Analysis

Measure duration, transfers and price bands for the cities reachable from any FlixBus city.

Station Data

Collect station names, addresses, zip codes and coordinates for mapping and logistics.

FlixBus scraper API

FlixBus API for trip search, prices, stops, and a price calendar

The FlixBus API is built for fare monitoring, travel search features and route research. Find the city ids, search all trips of a day with their fares, duration and transfers, then open a trip for the line and every stop, or scan a date window for the cheapest day.

Find city and station ids by name with the autocomplete endpoints.

Search all trips of a day in one call, sorted by departure, price or duration, with filters for price, transfers and departure time.

Read the fare with and without platform fee, the average price per person and the seats left when FlixBus publishes them.

Open a trip for the line code, the brand and every stop with arrival and departure times.

Scan up to 31 days for the cheapest fare of each day with the calendar endpoint.

Choose the right FlixBus API endpoint

Use autocomplete for ids

Pass a name to the city autocomplete to get the city ids that search and calendar need.

Open FlixBus City Autocomplete API docs

Use Trip Search for fares

Pass two city ids and a day to list every trip with fare, duration, transfers and amenities.

Open FlixBus Trip Search API docs

Use the Calendar for the cheapest day

Pass a start date and up to 31 days to get the cheapest fare per day. Each day is one upstream search.

Open FlixBus Price Calendar API docs

Available endpoints

Everything you need in one API.

Scrappa vs ScrapingBee / ScraperAPI

See how Scrappa compares to the official API.

FlixBus trip data as JSON
Scrappa:
ScrapingBee / ScraperAPI: Build your own parser
Cheapest-day calendar
Scrappa:
ScrapingBee / ScraperAPI:
Filters and sorting on the full day
Scrappa:
ScrapingBee / ScraperAPI:
Price per 1k requests
Scrappa: From $0.20
ScrapingBee / ScraperAPI: Varies by credits per request
Unified API key
Scrappa: Yes (80+ APIs)
ScrapingBee / ScraperAPI: Scraping only
Free tier
Scrappa: 500 credits/month
ScrapingBee / ScraperAPI: Trial credits

Key features

City and station autocomplete with both id formats and coordinates
Trip search with fares, seats left, duration, transfers, legs, amenities and seat types
Filters for price, transfers and departure time, honoured on the full day set
Trip detail with the line and every stop
Cheapest-day calendar for up to 31 days
City catalogue and reachable cities with price bands

Frequently asked questions

No. Scrappa is an independent service and is not affiliated with or endorsed by FlixBus. The FlixBus API returns structured JSON from public data through a Scrappa API key.

Every Scrappa account includes 500 free credits each month. After that, each request costs one credit, which works out to $0.20 to $0.30 per 1,000 requests depending on the credit pack or plan. Failed requests are never charged.

FlixBus publishes the seats left at a price only for some trips. Null means not published. It does not mean sold out.

FlixBus has no calendar route. Scrappa searches every day of your window and returns the cheapest fare per day. One request covers up to 31 days. If one day fails, the whole request fails and is not charged.

Not in one call. Search the return day as a second one-way trip.

Start using the FlixBus API

Sign up and get 500 free credits. No credit card required.