Install

Search bus trips between two cities on a date.

Searches FlixBus/FlixTrain trips like the shop's own search: departure and arrival time and station, duration, transfers, bus or train, seats left and the price the shop shows (including the platform fee). City names are free text; the first match is used and returned. Includes a link to the same search in the FlixBus shop.

No reports yetRead-only, no login
Site
FlixBus, Germany
Version
v1
Runs, last 7 days
No reports yet
sha256
7b98cdd55119…

Requests

sent from your browser, in order
  1. 1GETglobal.api.flixbus.com/search/autocomplete/cities?country&flixbus_cities_only&is_train_only&lang&popular_stations&q&stationsno cookies
  2. 2GETglobal.api.flixbus.com/search/autocomplete/cities?country&flixbus_cities_only&is_train_only&lang&popular_stations&q&stationsno cookies
  3. 3GETglobal.api.flixbus.com/search/service/v4/search?currency&departure_date&from_city_id&include_after_midnight_rides&locale&products&search_by&to_city_idno cookies

Parameters

from your agent
adultsinteger = 1
datestringrequiredDeparture date YYYY-MM-DD
fromstringrequiredDeparture city, e.g. 'Berlin'
only_availablebooleanDrop sold-out and otherwise unbookable trips = true
tostringrequiredArrival city, e.g. 'München'

Returns

to your agent
currencyany
datestring
fromstringCity actually used
shop_urlstringThe same search in the FlixBus shop, to book
tostring
tripsobject[]arrival, available, departure, duration_min, from_station, means, price_eur, price_without_fee_eur, seats_left, status, to_station, transfers

Where it can send

  • global.api.flixbus.com

Anything else is blocked by the extension.

Reads from your session

Nothing. Your browser attaches the site's cookies by itself.

Used only in requests to the addresses on the left. Never sent to wield.run or your agent.

Checks

a run passes when
  • length(output.trips) > `0`
  • output.from == 'Berlin'
  • output.to == 'München'
  • output.trips[0].price_eur > `0`
  • output.trips[0].duration_min > `200`
  • starts_with(output.trips[0].departure, '2026-11-20')
  • output.trips[0].from_station != `null`

Raw recipe

Served as canonical JSON from /api/v1/recipes/flixbus.de/search-trips, so its sha256 matches the ETag and the index.

Check it yourself
curl -s https://wield.run/api/v1/recipes/flixbus.de/search-trips | shasum -a 256
# 7b98cdd5511986941fc9f36bcae5172d1ebcc93394c0951578c41f019696666e
flixbus.de/search-trips.json, v1
{
  "description": "Searches FlixBus/FlixTrain trips like the shop's own search: departure and arrival time and station, duration, transfers, bus or train, seats left and the price the shop shows (including the platform fee). City names are free text; the first match is used and returned. Includes a link to the same search in the FlixBus shop.",
  "effect": "read",
  "id": "flixbus.de/search-trips",
  "keywords": [
    "flixbus",
    "flixtrain",
    "fernbus",
    "bus",
    "busreise",
    "busverbindung",
    "günstig reisen",
    "coach",
    "bus ticket",
    "bus trip",
    "intercity bus",
    "cheap travel"
  ],
  "output": {
    "schema": {
      "properties": {
        "currency": {
          "const": "EUR"
        },
        "date": {
          "format": "date",
          "type": "string"
        },
        "from": {
          "description": "City actually used",
          "type": "string"
        },
        "shop_url": {
          "description": "The same search in the FlixBus shop, to book",
          "format": "uri",
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "trips": {
          "items": {
            "properties": {
              "arrival": {
                "type": "string"
              },
              "available": {
                "type": "boolean"
              },
              "departure": {
                "description": "ISO 8601 with offset",
                "type": "string"
              },
              "duration_min": {
                "type": "integer"
              },
              "from_station": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "means": {
                "items": {
                  "enum": [
                    "bus",
                    "train"
                  ]
                },
                "type": "array"
              },
              "price_eur": {
                "description": "Price as the shop shows it, platform fee included",
                "type": [
                  "number",
                  "null"
                ]
              },
              "price_without_fee_eur": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "seats_left": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "type": "string"
              },
              "to_station": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "transfers": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "from",
        "to",
        "date",
        "trips"
      ],
      "type": "object"
    },
    "value": "{from: steps.from_city.name, to: steps.to_city.name, date: params.date, currency: 'EUR', shop_url: join('', ['https://shop.flixbus.de/search?departureCity=', steps.from_city.id, '&arrivalCity=', steps.to_city.id, '&rideDate=', join('.', reverse(split(params.date, '-'))), '&adult=', to_string(params.adults)]), trips: params.only_available && steps.search.trips[?available] || steps.search.trips}"
  },
  "params": {
    "additionalProperties": false,
    "properties": {
      "adults": {
        "default": 1,
        "maximum": 9,
        "minimum": 1,
        "type": "integer"
      },
      "date": {
        "description": "Departure date YYYY-MM-DD",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
        "type": "string"
      },
      "from": {
        "description": "Departure city, e.g. 'Berlin'",
        "maxLength": 80,
        "minLength": 2,
        "type": "string"
      },
      "only_available": {
        "default": true,
        "description": "Drop sold-out and otherwise unbookable trips",
        "type": "boolean"
      },
      "to": {
        "description": "Arrival city, e.g. 'München'",
        "maxLength": 80,
        "minLength": 2,
        "type": "string"
      }
    },
    "required": [
      "from",
      "to",
      "date"
    ],
    "type": "object"
  },
  "provenance": {
    "method": "browser-inspect",
    "notes": "spikes/flixbus.md. Public search gateway global.api.flixbus.com (CloudFront + API Gateway, no bot management on reads). Cross-origin from shop.flixbus.de and its CORS answer has no Allow-Credentials, so every request uses credentials 'omit' (include fails). site.origin is shop.flixbus.de because www.flixbus.de's search form does a tab-under to a hotel affiliate. results is an object keyed by trip uid, so it is sorted by departure; station names are joined from the top-level stations map.",
    "recorded_at": "2026-11-07T11:25:00+01:00",
    "recorded_by": "C4"
  },
  "requires_login": false,
  "schema": "https://wield.run/schema/recipe/v1.json",
  "site": {
    "country": "DE",
    "id": "flixbus.de",
    "language": "de",
    "name": "FlixBus",
    "origin": "https://shop.flixbus.de",
    "origins": [
      "https://global.api.flixbus.com"
    ]
  },
  "steps": [
    {
      "expect": {
        "assert": "length(body) > `0`",
        "content_type": "json",
        "status": [
          200
        ]
      },
      "extract": {
        "json": {
          "id": "[0].id",
          "name": "[0].name"
        }
      },
      "id": "from_city",
      "request": {
        "credentials": "omit",
        "headers": {
          "Accept": "application/json"
        },
        "method": "GET",
        "query": {
          "country": "de",
          "flixbus_cities_only": "false",
          "is_train_only": "false",
          "lang": "de",
          "popular_stations": "true",
          "q": "{{params.from}}",
          "stations": "true"
        },
        "url": "https://global.api.flixbus.com/search/autocomplete/cities"
      }
    },
    {
      "expect": {
        "assert": "length(body) > `0`",
        "content_type": "json",
        "status": [
          200
        ]
      },
      "extract": {
        "json": {
          "id": "[0].id",
          "name": "[0].name"
        }
      },
      "id": "to_city",
      "request": {
        "credentials": "omit",
        "headers": {
          "Accept": "application/json"
        },
        "method": "GET",
        "query": {
          "country": "de",
          "flixbus_cities_only": "false",
          "is_train_only": "false",
          "lang": "de",
          "popular_stations": "true",
          "q": "{{params.to}}",
          "stations": "true"
        },
        "url": "https://global.api.flixbus.com/search/autocomplete/cities"
      }
    },
    {
      "expect": {
        "assert": "body.trips != null",
        "content_type": "json",
        "status": [
          200
        ]
      },
      "extract": {
        "json": {
          "trips": "let $st = stations in sort_by(values(trips[0].results || `{}`), &departure.date)[].{departure: departure.date, arrival: arrival.date, from_station: let $sid = departure.station_id in items($st)[?[0] == $sid] | [0][1].name, to_station: let $sid = arrival.station_id in items($st)[?[0] == $sid] | [0][1].name, duration_min: duration.hours * `60` + duration.minutes, transfers: length(legs || `[]`) - `1`, means: legs[].means_of_transport, price_eur: price.total_with_platform_fee || price.total || `null`, price_without_fee_eur: price.total || `null`, available: status == 'available', status: status, seats_left: available.seats || `null`}"
        }
      },
      "id": "search",
      "request": {
        "credentials": "omit",
        "headers": {
          "Accept": "application/json"
        },
        "method": "GET",
        "query": {
          "currency": "EUR",
          "departure_date": "{{params.date | date:DD.MM.YYYY}}",
          "from_city_id": "{{steps.from_city.id}}",
          "include_after_midnight_rides": "1",
          "locale": "de",
          "products": "{\"adult\":{{params.adults}}}",
          "search_by": "cities",
          "to_city_id": "{{steps.to_city.id}}"
        },
        "url": "https://global.api.flixbus.com/search/service/v4/search"
      }
    }
  ],
  "task": "Search bus trips between two cities on a date",
  "tos": {
    "notes": "FlixBus terms restrict automated extraction of timetable and price data. One user-initiated search at a time from the user's browser, 3 requests. Booking stays in the FlixBus shop via shop_url.",
    "reviewed": false
  },
  "verify": {
    "checks": [
      "length(output.trips) > `0`",
      "output.from == 'Berlin'",
      "output.to == 'München'",
      "output.trips[0].price_eur > `0`",
      "output.trips[0].duration_min > `200`",
      "starts_with(output.trips[0].departure, '2026-11-20')",
      "output.trips[0].from_station != `null`"
    ],
    "example_params": {
      "date": "2026-11-20",
      "from": "Berlin",
      "to": "München"
    },
    "max_ms": 4000
  },
  "version": 1
}