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

FlixBus City Detail API Documentation

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

FlixBus City Detail API Documentation Get one city by id: name, both id formats, country code, subdivision code and the time zone offset in seconds.

FlixBus City Detail API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/flixbus/city
Auth header
x-api-key
Cost
1 credit/request
city_id = 1234567890
Response preview
200 OK
{
    "data": {
        "city": {
            "id": "40d8f682-8646-11e6-9066-549f350fcb0c",
            "name": "Berlin",
            "legacy_id": 88,
            "country_code": "DE",
            "subdivision_code": null,
            "timezone_offset_seconds": 7200
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "city_detail"
...

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.

city_id string Required

City UUID from the cities endpoint. Example: 40d8f682-8646-11e6-9066-549f350fcb0c.

Example value 1234567890

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": {
        "city": {
            "id": "40d8f682-8646-11e6-9066-549f350fcb0c",
            "name": "Berlin",
            "legacy_id": 88,
            "country_code": "DE",
            "subdivision_code": null,
            "timezone_offset_seconds": 7200
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "city_detail"
    },
    "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": {
        "city_id": [
            "The city_id is a UUID."
        ]
    },
    "message": "The request validation failed"
}
404

Resource Not Found

The city id is unknown. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "city_detail"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested FlixBus resource was not found."
    },
    "success": false
}
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": "city_detail"
    },
    "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.