Skip to content
Scrappa Get API key
FlixBus API 1 credit/request

FlixBus Station Autocomplete API Documentation

GET https://scrappa.co/api/flixbus/stations

FlixBus Station Autocomplete API Documentation Find FlixBus and FlixTrain stations by name: id, numeric legacy id, name, street address, zip code, country, owning city, coordinates and train flag. Use the station id with the station endpoint.

FlixBus Station Autocomplete API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/flixbus/stations
Auth header
x-api-key
Cost
1 credit/request
query = coffee shops
Response preview
200 OK
{
    "data": {
        "query": "berlin",
        "total": 3,
        "stations": [
            {
                "id": "17483554-a4a8-4dad-b940-b5f56740014f",
                "city": {
                    "id": "42d5ccaf-d0dc-4381-bd1f-9b5b38862cca",
                    "name": "Berlin Airport",
                    "slug": "berlin-airport",
                    "legacy_id": 127363
                },
                "name": "Berlin Airport BER, T 1/2",
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

query string Required

City or station name, 2 to 100 characters. Example: berlin.

Example value coffee shops

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "query": "berlin",
        "total": 3,
        "stations": [
            {
                "id": "17483554-a4a8-4dad-b940-b5f56740014f",
                "city": {
                    "id": "42d5ccaf-d0dc-4381-bd1f-9b5b38862cca",
                    "name": "Berlin Airport",
                    "slug": "berlin-airport",
                    "legacy_id": 127363
                },
                "name": "Berlin Airport BER, T 1/2",
                "slug": "berlin-airport-ber-p5",
                "score": 17.911556,
                "address": "Hugo-Junkers-Ring (Busparkplatz B)",
                "country": {
                    "code": "DE",
                    "name": "Germany"
                },
                "zipcode": "12529",
                "is_train": false,
                "location": {
                    "lat": 52.364540515813786,
                    "lon": 13.514171431931567
                },
                "legacy_id": 44061,
                "importance_order": 85
            },
            {
                "id": "dcbaaee6-9603-11e6-9066-549f350fcb0c",
                "city": {
                    "id": "40d8f682-8646-11e6-9066-549f350fcb0c",
                    "name": "Berlin",
                    "slug": "berlin",
                    "legacy_id": 88
                },
                "name": "Berlin central bus station",
                "slug": "berlin-zob",
                "score": 17.589495,
                "address": "Masurenallee 4-6",
                "country": {
                    "code": "DE",
                    "name": "Germany"
                },
                "zipcode": "14057",
                "is_train": false,
                "location": {
                    "lat": 52.507171,
                    "lon": 13.279399
                },
                "legacy_id": 1,
                "importance_order": 25
            },
            {
                "id": "394a5408-d778-4959-a63e-973253443ed2",
                "city": {
                    "id": "40d8f682-8646-11e6-9066-549f350fcb0c",
                    "name": "Berlin",
                    "slug": "berlin",
                    "legacy_id": 88
                },
                "name": "Berlin Central Station",
                "slug": "berlin-central-station-flixtrain",
                "score": 17.55965,
                "address": "Europaplatz 1",
                "country": {
                    "code": "DE",
                    "name": "Germany"
                },
                "zipcode": "10557",
                "is_train": true,
                "location": {
                    "lat": 52.525063,
                    "lon": 13.369438
                },
                "legacy_id": 20688,
                "importance_order": 24
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "station_autocomplete"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required query parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "query": [
            "The search text needs at least 2 characters."
        ]
    },
    "message": "The request validation failed"
}
503

Service Unavailable

FlixBus could not be reached or answered with an unexpected shape. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "station_autocomplete"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "The FlixBus API is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.