> ## Documentation Index
> Fetch the complete documentation index at: https://developers.ttool.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Search flights

> Search every connected provider for priced offers.

A search takes **5 to 90 seconds** depending on the route. Set your client timeout to at least 120 seconds. Results come back once the search is complete. Limited to 3 per second and 600 per 15 minutes.

## Body

**adults** `integer` *required*

1 to 9.

**children** `integer` (default: 0)

0 to 4, aged 2 to 11.

**infants** `integer` (default: 0)

0 to 4, under 2. Never more than `adults`.

**cabinType** `string` (default: Economy)

`Economy`, `PremiumEconomy`, `Business` or `First`.

**flightType** `string` *required*

`OneWay` or `RoundTrip`.

**segments** `object[]` *required*

Exactly 1 for `OneWay`. Exactly 2 for `RoundTrip`: the outbound first, then the return with origin and destination swapped.

**properties**

**origin** `string` *required*

3-letter IATA airport code, or city code when `originType` is `CityCode`.

**destination** `string` *required*

3-letter IATA code. Must differ from `origin`.

**departureDate** `string` *required*

`yyyy-MM-dd`. Between today and one year ahead. The return can't be before the outbound.

**originType** `string` (default: AirportCode)

`AirportCode` or `CityCode`.

**destinationType** `string` (default: AirportCode)

`AirportCode` or `CityCode`.

## Response

**requestId** `string (uuid)`

Identifies this search. Every later call for offers in `offers` needs it. Searches expire: if an offer comes back not found or expired, search again.

**offers** `Offer[]`

Offers in the platform's default order, cheapest first. For a round trip these are normally complete outbound plus return combinations. See [the offer object](https://developers.ttool.travel/reference/offer-object.md).

**returningRequestId** `string | null`

Only set for a split round trip.

**returningOffers** `Offer[]`

Only filled for a split round trip.

**dictionaries** `object`

Names for every carrier and airport code used in this response's offers. See [Dictionaries](https://developers.ttool.travel/reference/offer-object.md#dictionaries).

> [!NOTE]
>
> Round trips come back combined or split. Your code must handle both. See [Round trips](https://developers.ttool.travel/guides/round-trips.md). An empty `offers` with HTTP 200 means no availability, not an error.

```bash One way theme={null}
curl -X POST "https://api.staging.ttool.travel/hub/api/v1/flights/search" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "adults": 1,
    "cabinType": "Economy",
    "flightType": "OneWay",
    "segments": [
      { "origin": "BGW", "destination": "DXB", "departureDate": "2026-12-07" }
    ]
  }'
```

```bash Round trip theme={null}
curl -X POST "https://api.staging.ttool.travel/hub/api/v1/flights/search" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "adults": 1,
    "children": 0,
    "infants": 0,
    "cabinType": "Economy",
    "flightType": "RoundTrip",
    "segments": [
      { "origin": "BGW", "destination": "DXB", "departureDate": "2026-12-07", "originType": "AirportCode", "destinationType": "AirportCode" },
      { "origin": "DXB", "destination": "BGW", "departureDate": "2026-12-14", "originType": "AirportCode", "destinationType": "AirportCode" }
    ]
  }'
```

```json 200 theme={null}
{
  "requestId": "3f1a1c9e-7b2d-4c7e-9a1f-2b3c4d5e6f70",
  "returningRequestId": null,
  "offers": [
    {
      "offerId": "8d0e3b6a-2f41-4b8e-b1c9-5d6e7f8a9b0c",
      "tripType": "RoundTrip",
      "cabinClass": "Economy",
      "hasFareBrands": true,
      "supportsOnHold": false,
      "price": { "currency": "USD", "total": 436.00, "baseFare": 360.00, "taxes": 76.00, "commission": 12.00 },
      "journeys": [ { "...": "outbound" }, { "...": "inbound" } ]
    }
  ],
  "returningOffers": [],
  "dictionaries": {
    "carriers": { "FZ": "flydubai", "IA": "Iraqi Airways" },
    "airports": {
      "BGW": { "name": "Baghdad International", "city": "Baghdad", "country": "IQ" },
      "DXB": { "name": "Dubai International", "city": "Dubai", "country": "AE" }
    }
  }
}
```

```json 400 theme={null}
{
  "success": false,
  "error": {
    "errorCode": "INVALID_REQUEST_FORMAT",
    "httpStatusCode": 400,
    "errorDetails": {
      "segments": ["RoundTrip searches take exactly two segments: the outbound and the return."]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.