# FlixBus trip itinerary API

Get FlixBus itineraries by source journey UID or route and date via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as days_ahead, from, output, and retrieve structured data including opaque source itinerary identifier, source service-line label, source itinerary-leg type, source stop name, and source stop departure timestamp for journey detail, and stop display.

Documentation: https://openany.si/market/apis/flixbus/flixbus-trip-itinerary-api/?offering=3083bb05-2617-46ff-8827-f6cc555565e6
API ID: 3083bb05-2617-46ff-8827-f6cc555565e6
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/flixbus/v1/trip
Page update time: 2026-12-03T02:47:05.557Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:47:03.453Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "FlixBus trip itinerary API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "uid": {
          "type": "string",
          "description": "Trip uid from `/flixbus/v1/search` (`direct:…` or `interconnection:…`)."
        },
        "from": {
          "type": "string",
          "description": "Instead of `uid`: departure city (with `to`)."
        },
        "to": {
          "type": "string",
          "description": "Arrival city."
        },
        "date": {
          "type": "string",
          "description": "Travel date `YYYY-MM-DD` (with `from`/`to`)."
        },
        "days_ahead": {
          "type": "integer",
          "description": "Days from today (with `from`/`to`)."
        },
        "index": {
          "type": "integer",
          "description": "Which departure of that day (0 = first)."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "arrival": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "zip_code": {
          "type": "string"
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "credits_used": {
      "type": "integer"
    },
    "departure": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "description": {
          "type": "null"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "zip_code": {
          "type": "string"
        }
      }
    },
    "fetched_at": {
      "type": "string"
    },
    "legs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string"
          },
          "brand_type": {
            "type": "string"
          },
          "carriers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "line": {
            "type": "string"
          },
          "line_destination": {
            "type": "string"
          },
          "line_id": {
            "type": "integer"
          },
          "messages": {
            "type": "object",
            "properties": {
              "from": {
                "type": "null"
              },
              "to": {
                "type": "null"
              }
            }
          },
          "operators": {
            "type": "array",
            "items": {}
          },
          "stops": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "arrival": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "departure": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "type": "string"
                },
                "time": {
                  "type": "string"
                }
              }
            }
          },
          "sub_brand": {
            "type": "null"
          },
          "transfer_minutes": {
            "type": "null"
          },
          "type": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        }
      }
    },
    "uid": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/flixbus/v1/trip?days_ahead=30&from=Berlin&output=json&raw=0&to=Prague' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "arrival": {
    "address": "(Praha,,ÚAN Florenc)   Křižíkova 2110/2b",
    "city": "Prague",
    "country": "CZ",
    "description": "Platform number available here: www.florenc.cz, or on the information board in Hall 1. For more information about the station, click here: www.bit.ly/prguan. In case of a delay of more than 90 minutes with a journey time of more than 3 hours, you can get free refreshments at our shop in Hall 1.",
    "lat": 50.089345943898095,
    "lng": 14.440050423145296,
    "name": "Prague (Central Bus Station Florenc)",
    "zip_code": "186 00"
  },
  "cached": false,
  "credits_used": 1,
  "departure": {
    "address": "Hildegard-Knef-Platz",
    "city": "Berlin",
    "country": "DE",
    "description": null,
    "lat": 52.476050612436865,
    "lng": 13.36435614186235,
    "name": "Berlin Südkreuz",
    "zip_code": "10829"
  },
  "fetched_at": "2026-11-19T12:25:05.480Z",
  "legs": [
    {
      "brand": "FlixBus",
      "brand_type": "core",
      "carriers": [
        "FlixBus DACH GmbH"
      ],
      "line": "N60",
      "line_destination": "Vienna International Airport",
      "line_id": 3635,
      "messages": {
        "from": null,
        "to": null
      },
      "operators": [],
      "stops": [
        {
          "arrival": null,
          "departure": "2026-12-19T00:15:00+01:00",
          "name": "Berlin Südkreuz",
          "time": "2026-12-19T00:15:00+01:00"
        },
        {
          "arrival": "2026-12-19T00:35:00+01:00",
          "departure": "2026-12-19T00:40:00+01:00",
          "name": "Berlin Airport BER, T 1/2",
          "time": "2026-12-19T00:35:00+01:00"
        },
        {
          "arrival": "2026-12-19T02:35:00+01:00",
          "departure": "2026-12-19T02:40:00+01:00",
          "name": "Dresden Neustadt, Exit",
          "time": "2026-12-19T02:35:00+01:00"
        },
        {
          "arrival": "2026-12-19T02:50:00+01:00",
          "departure": "2026-12-19T03:00:00+01:00",
          "name": "Dresden central station (Bayrische Straße)",
          "time": "2026-12-19T02:50:00+01:00"
        },
        {
          "arrival": "2026-12-19T04:40:00+01:00",
          "departure": null,
          "name": "Prague (Central Bus Station Florenc)",
          "time": "2026-12-19T04:40:00+01:00"
        }
      ],
      "sub_brand": null,
      "transfer_minutes": null,
      "type": "ride",
      "warnings": []
    }
  ],
  "uid": "direct:e29b98d7-7cca-450a-a693-b2aa0a871a40:dcbb994f-9603-11e6-9066-549f350fcb0c:dcbc6452-9603-11e6-9066-549f350fcb0c"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- apish: https://openany.si/market/apis/flixbus/flixbus-trip-itinerary-api/?offering=3083bb05-2617-46ff-8827-f6cc555565e6

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
