# FlixBus API

> FlixBus returns dated bus trips, schedules, availability, and fares as a workflow and API.

FlixBus finds dated bus trips between two cities, including stops, local departure and arrival times, availability, and displayed per-person prices. Search bus trips needs an origin, destination, and local departure date; traveler count, currency, and maximum results are optional.

- Page: https://fous.com/tools/flixbus
- Handle: `@flixbus`
- Category: [Travel](https://fous.com/tools/category/travel)
- Source website: https://flixbus.com
- Last verified: Sep 29, 2026

## Methods

### Search bus trips

Operation `search_bus_trips`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find dated FlixBus trip options between two cities, with stops, local times, availability, and displayed per-person prices. Some routes also show partner operators; prices and seats may change at booking.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `date` | string | yes | `"2026-10-16"` | Local departure date, for example 2026-10-15. |
| `adults` | integer | no | `2` | Number of adult travelers, for example 2. |
| `origin` | string | yes | `"New York"` | Departure city, for example Berlin. |
| `currency` | string | no | `"USD"` | Three-letter fare currency, for example EUR. |
| `destination` | string | yes | `"Boston"` | Arrival city, for example Prague. |
| `max_results` | integer | no | `3` | Maximum trips to return, for example 20. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "origin",
    "destination",
    "date"
  ],
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Local departure date, for example 2026-10-15.",
      "examples": [
        "2026-10-16",
        "2026-10-15"
      ]
    },
    "adults": {
      "type": "integer",
      "default": 1,
      "maximum": 9,
      "minimum": 1,
      "description": "Number of adult travelers, for example 2.",
      "examples": [
        2
      ]
    },
    "origin": {
      "type": "string",
      "title": "From",
      "minLength": 1,
      "description": "Departure city, for example Berlin.",
      "examples": [
        "New York",
        "Berlin"
      ]
    },
    "currency": {
      "type": "string",
      "default": "EUR",
      "pattern": "^[A-Za-z]{3}$",
      "description": "Three-letter fare currency, for example EUR.",
      "examples": [
        "USD"
      ]
    },
    "destination": {
      "type": "string",
      "title": "To",
      "minLength": 1,
      "description": "Arrival city, for example Prague.",
      "examples": [
        "Boston",
        "Prague"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum trips to return, for example 20.",
      "x-fous-developer": true,
      "examples": [
        3
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "date": "2026-10-16",
      "adults": 2,
      "origin": "New York",
      "currency": "USD",
      "destination": "Boston",
      "max_results": 3
    },
    {
      "date": "2026-10-15",
      "origin": "Berlin",
      "destination": "Prague"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `trips` | array |  |  |
| `trips[].bookable` | boolean | `true` |  |
| `trips[].currency` | string | `"USD"` |  |
| `trips[].operator` | string | `"Greyhound"` |  |
| `trips[].page_link` | string | `"https://shop.flixbus.com/search?departureCity=c0a47c54-53ea-46dc-984b-b764fc0b2fa9&arrivalCity=eeff627f-2fda-4e75-8468-` |  |
| `trips[].transfers` | integer | `0` |  |
| `trips[].seats_left` | integer or null | `2` | Seats left at this price when shown. |
| `trips[].travel_time` | string | `"4h 30m"` |  |
| `trips[].arrival_stop` | string or null | `"Boston (South Station)"` |  |
| `trips[].arrival_time` | string | `"2026-10-16T05:30:00-04:00"` | Local ISO 8601 arrival time with offset. |
| `trips[].departure_stop` | string or null | `"New York Port Authority"` |  |
| `trips[].departure_time` | string | `"2026-10-16T01:00:00-04:00"` | Local ISO 8601 departure time with offset. |
| `trips[].arrival_stop_id` | string or null | `"9b6bfd56-3ecb-11ea-8017-02437075395e"` |  |
| `trips[].price_per_person` | number or null | `35.99` |  |
| `trips[].departure_stop_id` | string or null | `"e204bb66-8ab9-4437-8d0d-2b603cdf0c43"` |  |
| `search_link` | string | `"https://shop.flixbus.com/search?departureCity=c0a47c54-53ea-46dc-984b-b764fc0b2fa9&arrivalCity=eeff627f-2fda-4e75-8468-` |  |
| `origin_city_id` | string | `"c0a47c54-53ea-46dc-984b-b764fc0b2fa9"` |  |
| `destination_city_id` | string | `"eeff627f-2fda-4e75-8468-783d47955b3a"` |  |

**Example input**

```json
{
  "date": "2026-10-16",
  "adults": 2,
  "origin": "New York",
  "currency": "USD",
  "destination": "Boston",
  "max_results": 3
}
```

**Example output**

```json
{
  "trips": [
    {
      "bookable": true,
      "currency": "USD",
      "operator": "Greyhound",
      "page_link": "https://shop.flixbus.com/search?departureCity=c0a47c54-53ea-46dc-984b-b764fc0b2fa9&arrivalCity=eeff627f-2fda-4e75-8468-783d47955b3a&route=New+York%2C+NY-Boston%2C+MA&rideDate=16.10.2026&adult=2&_local…",
      "transfers": 0,
      "seats_left": null,
      "travel_time": "4h 30m",
      "arrival_stop": "Boston (South Station)",
      "arrival_time": "2026-10-16T05:30:00-04:00",
      "departure_stop": "New York Port Authority",
      "departure_time": "2026-10-16T01:00:00-04:00",
      "arrival_stop_id": "9b6bfd56-3ecb-11ea-8017-02437075395e",
      "price_per_person": 35.99,
      "departure_stop_id": "e204bb66-8ab9-4437-8d0d-2b603cdf0c43"
    },
    {
      "bookable": true,
      "currency": "USD",
      "operator": "Greyhound",
      "page_link": "https://shop.flixbus.com/search?departureCity=c0a47c54-53ea-46dc-984b-b764fc0b2fa9&arrivalCity=eeff627f-2fda-4e75-8468-783d47955b3a&route=New+York%2C+NY-Boston%2C+MA&rideDate=16.10.2026&adult=2&_local…",
      "transfers": 0,
      "seats_left": null,
      "travel_time": "4h 05m",
      "arrival_stop": "Boston (South Station)",
      "arrival_time": "2026-10-16T05:10:00-04:00",
      "departure_stop": "New York (GW Bridge)",
      "departure_time": "2026-10-16T01:05:00-04:00",
      "arrival_stop_id": "9b6bfd56-3ecb-11ea-8017-02437075395e",
      "price_per_person": 39.99,
      "departure_stop_id": "74b8f0dc-56a2-4d1b-b0a4-abe9df30a007"
    }
  ],
  "search_link": "https://shop.flixbus.com/search?departureCity=c0a47c54-53ea-46dc-984b-b764fc0b2fa9&arrivalCity=eeff627f-2fda-4e75-8468-783d47955b3a&route=New+York%2C+NY-Boston%2C+MA&rideDate=16.10.2026&adult=2&_local…",
  "origin_city_id": "c0a47c54-53ea-46dc-984b-b764fc0b2fa9",
  "destination_city_id": "eeff627f-2fda-4e75-8468-783d47955b3a"
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@flixbus",
  "visibility": "public",
  "operation": "search_bus_trips",
  "version": 1,
  "input": {
    "date": "2026-10-16",
    "adults": 2,
    "origin": "New York",
    "currency": "USD",
    "destination": "Boston",
    "max_results": 3
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@flixbus\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_bus_trips\",\n  \"version\": 1,\n  \"input\": {\n    \"date\": \"2026-10-16\",\n    \"adults\": 2,\n    \"origin\": \"New York\",\n    \"currency\": \"USD\",\n    \"destination\": \"Boston\",\n    \"max_results\": 3\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@flixbus",
  "visibility": "public",
  "operation": "search_bus_trips",
  "version": 1,
  "input": {
    "date": "2026-10-16",
    "adults": 2,
    "origin": "New York",
    "currency": "USD",
    "destination": "Boston",
    "max_results": 3
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/flixbus`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `search_bus_trips`: Search bus trips. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-flixbus https://api.fous.com/mcp/tools/flixbus --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Compare bus fares between cities
- Plan trips around departure and arrival times
- Check trip availability and seats left
- Review transfer counts and travel times
- Identify trip operators and stops

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this FlixBus tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a FlixBus account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from flixbus.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What bus trips run between two cities on a date?

Search bus trips returns dated options between an origin and destination, with stops and local departure and arrival times.

### What is the displayed fare per person?

Search bus trips returns displayed per-person prices and their currency.

### How long is a trip, and are seats available?

Search bus trips returns travel time and, when shown, seats left at the displayed price.

## Related

- [Trip.com API](https://fous.com/tools/trip-com.md): Trip.com offers hotel and flight bookings, with hotel listings limited to initial public results and prices and fares subject to change.
- [Expedia API](https://fous.com/tools/expedia.md): Expedia helps travelers find hotels, vacation stays, and travel deals, with hotel prices and flight options for selected destinations and dates; flight listings may be limited.
- [Google Flights API](https://fous.com/tools/google-flights.md): Google Flights returns route schedules, public fares, monthly lowest prices, and flight or destination options with times, stops, emissions, and fares that may change.
- [Deutsche Bahn API](https://fous.com/tools/deutsche-bahn.md): Train schedules, tickets and travel information in Germany.
- [Viator API](https://fous.com/tools/viator.md): Tours, day trips, and experiences.
- [Kayak API](https://fous.com/tools/kayak.md): Kayak compares flight and hotel prices across booking sites and current rental car offers; hotel rates assume two adults per room and cover public location pages, while prices and availability can change at booking.
- [Rome2rio API](https://fous.com/tools/rome2rio.md): Compare ways to travel between places by train, bus, ferry, plane and car.
- [GetYourGuide API](https://fous.com/tools/getyourguide.md): Tours, tickets and activities in destinations around the world.
- [All Travel tools](https://fous.com/tools/category/travel)
