---
title: ToolRouter — Tool Detail
description: Detailed documentation for a ToolRouter tool including skills, parameters, and examples.
url: https://toolrouter.com/tools/flight-search
---
# Flight Search

Search live flight inventory across airlines for any route. Get real-time pricing, baggage, emissions, stops, and booking deadlines for one-way or round-trip flights, or scan a bounded date window for cheap travel days. Supports economy through first class and returns IDs needed for booking handoff.

- **Version:** 0.04
- **Categories:** data, productivity

## Skills (4)

### Search Flights (`search_flights`)

Search for flight offers between two airports. Returns prices, airlines, departure and arrival times, duration, number of stops, baggage, emissions, and booking deadlines for each offer.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `origin` | string | Yes | Origin airport or city IATA code (e.g. 'LHR', 'NYC', 'SYD') |
| `destination` | string | Yes | Destination airport or city IATA code |
| `departure_date` | string | Yes | Departure date in YYYY-MM-DD format |
| `return_date` | string | No | Return date for round-trip (omit for one-way) |
| `adults` | number | No | Number of adult passengers (1-9) [default: 1] |
| `children` | number | No | Number of children (2-11 years) |
| `cabin_class` | string | No | Cabin class preference (economy, premium_economy, business, first) |
| `max_connections` | number | No | Maximum number of stops (0 for direct only, 1-2 for connections) [default: 1] |
| `max_results` | number | No | Maximum number of offers to return [default: 10] |
| `airlines` | array | No | Restrict results to airline IATA codes (e.g. ['BA', 'AA']) |
| `departure_window` | string | No | Departure time window in HH-HH local time (e.g. "6-20") |
| `sort_by` | string | No | Sort results by price, duration, departure time, or arrival time (price, duration, departure_time, arrival_time) |

**Returns:** List of flight offers with airlines, departure/arrival times, duration, stops, prices, baggage, emissions, and booking deadlines

**Examples:**

*One-way flight from London to New York:*

```json
{
  "origin": "LHR",
  "destination": "JFK",
  "departure_date": "2026-04-15"
}
```

*Round-trip business class from Sydney to Tokyo for 2 adults:*

```json
{
  "origin": "SYD",
  "destination": "NRT",
  "departure_date": "2026-05-01",
  "return_date": "2026-05-10",
  "cabin_class": "business",
  "adults": 2
}
```

*Direct flights only from Los Angeles to Paris:*

```json
{
  "origin": "LAX",
  "destination": "CDG",
  "departure_date": "2026-06-15",
  "max_connections": 0,
  "max_results": 5
}
```

*Morning departures on a preferred airline sorted by duration:*

```json
{
  "origin": "JFK",
  "destination": "LHR",
  "departure_date": "2026-06-20",
  "airlines": [
    "BA"
  ],
  "departure_window": "6-12",
  "sort_by": "duration"
}
```

### Search Flexible Dates (`search_dates`)

Scan a bounded date window and return the cheapest departure dates for a route, using the same flight filters you would use for a normal search.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `origin` | string | Yes | Origin airport or city IATA code (e.g. 'LHR', 'NYC', 'SYD') |
| `destination` | string | Yes | Destination airport or city IATA code |
| `start_date` | string | Yes | Start of the search window in YYYY-MM-DD format |
| `end_date` | string | Yes | End of the search window in YYYY-MM-DD format (up to 21 days from start_date) |
| `trip_duration` | number | No | Trip length in days for round-trip searches (omit for one-way flexible date search) |
| `adults` | number | No | Number of adult passengers (1-9) [default: 1] |
| `children` | number | No | Number of children (2-11 years) |
| `cabin_class` | string | No | Cabin class preference (economy, premium_economy, business, first) |
| `max_connections` | number | No | Maximum number of stops (0 for direct only, 1-2 for connections) [default: 1] |
| `max_results` | number | No | Maximum number of date options to return [default: 10] |
| `airlines` | array | No | Restrict date search to airline IATA codes (e.g. ['BA', 'AA']) |
| `departure_window` | string | No | Departure time window in HH-HH local time (e.g. "6-20") |
| `sort_by_price` | boolean | No | Sort returned dates by price ascending. Set false to keep dates in chronological order. |

**Returns:** Cheapest departure dates within a bounded search window, plus a sample fare for each matching day

**Examples:**

*Cheapest one-way flights across a week:*

```json
{
  "origin": "JFK",
  "destination": "LHR",
  "start_date": "2026-06-01",
  "end_date": "2026-06-07"
}
```

*Cheapest 7-day round-trip over a flexible two-week window:*

```json
{
  "origin": "SFO",
  "destination": "NRT",
  "start_date": "2026-07-01",
  "end_date": "2026-07-14",
  "trip_duration": 7,
  "max_connections": 0
}
```

### Find Airport (`find_airport`)

Search for airport or city IATA codes by name. Useful when you know the city or airport name but need the IATA code for flight searches.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `query` | string | Yes | Airport name, city name, or IATA code to search for |

**Returns:** Matching airports and cities with IATA code, name, city, country, coordinates, and timezone

**Examples:**

*Find airports in London:*

```json
{
  "query": "London"
}
```

*Look up an airport by partial name:*

```json
{
  "query": "Charles de Gaulle"
}
```

### Get Offer Details (`get_offer`)

Get refreshed details for a specific flight offer by its ID. Returns updated pricing, baggage info, available services, and booking deadline. Use this after search_flights to check if an offer is still available.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `offer_id` | string | Yes | Offer ID from search_flights results (e.g. 'off_0000...') |

**Returns:** Refreshed offer details with updated pricing, baggage, emissions, and booking deadline

**Examples:**

*Get details for a specific offer:*

```json
{
  "offer_id": "off_0000AEdHh0OlkSORal"
}
```

*Check if an offer is still available:*

```json
{
  "offer_id": "off_0000AEdHh0OlkSORal"
}
```

## Quick Start

```bash
# Via CLI
TOOLROUTER_API_KEY=tr_live_xxx npx -y toolrouter-mcp call flight-search search_flights --origin LHR --destination JFK --departure_date 2026-04-15

# Via REST API
curl -H "Authorization: Bearer tr_live_xxx" \
     -d '{"tool":"flight-search","skill":"search_flights","input":{"origin":"LHR","destination":"JFK","departure_date":"2026-04-15"}}' \
     https://api.toolrouter.com/v1/tools/call
```

## Frequently Asked Questions

### Do I need airport codes before searching flights?

Not necessarily. Use `find_airport` if you only have a city or airport name, then pass the IATA codes into `search_flights`.

### What does a flight search return?

`search_flights` returns live offers with airlines, departure and arrival times, duration, stops, baggage, emissions, and booking deadlines.

### Can I look for direct flights or specific cabin classes?

Yes. Set `max_connections` to `0` for direct-only results, and choose the cabin class you want, from economy through first class.

### How do I get refreshed pricing before booking?

Use `get_offer` on a specific offer ID to refresh the price and confirm availability. The search response also includes the IDs needed for booking handoff.

---

## Get Started with ToolRouter

**Already connected?** Call any tool with `use_tool({ tool, skill, input })`. Browse tools with `discover` or visit https://toolrouter.com/llms-full.txt

**New to ToolRouter?** Connect with one command (no API key needed — auto-provisions on first use):

```bash
# MCP (Claude Code, Codex CLI)
claude mcp add toolrouter -- npx -y toolrouter-mcp

# MCP (Cursor, Windsurf, Cline, VS Code, Gemini CLI, Claude Desktop)
{"mcpServers":{"toolrouter":{"command":"npx","args":["-y","toolrouter-mcp"]}}}

# Claude Chat / Claude Cowork / Claude Mobile — add as a connector:
# Settings → Connectors → Add custom connector → URL: https://api.toolrouter.com/mcp

# ChatGPT — add as an app:
# Settings → Apps → Advanced settings → enable Developer mode → Create app → MCP Server URL: https://api.toolrouter.com/mcp

# CLI (works instantly, no restart needed)
npx -y toolrouter-mcp tools                    # browse all tools
npx -y toolrouter-mcp search "seo"             # search by keyword
npx -y toolrouter-mcp call seo analyze_page --url https://example.com
```

Free tools work immediately. For paid tools, visit https://toolrouter.com/claim to add credits.

All platforms: https://toolrouter.com/connect | Full catalog: https://toolrouter.com/llms-full.txt | Docs: https://toolrouter.com/docs