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

# Duffel

> Flight search across airlines: offer requests return priced offers for a journey, plus offer details and airport and place lookup.

![](https://mintcdn.com/webrouter/gPu3tCeozwRcDBjt/logo/data-apis/duffel.webp?fit=max\&auto=format\&n=gPu3tCeozwRcDBjt\&q=85\&s=9039f18da255f2eb207401df761cd9c8)

[Web Catalog · Commerce](https://docs.webrouter.net/data-apis.md?category=commerce)

Needs&#x20;

`DUFFEL_API_KEY`

Endpoints

6

Auth

Key in header

[Vendor docs](https://duffel.com/docs/api/overview/welcome)

&#x20;·&#x20;

[Pricing](https://duffel.com/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `DUFFEL_API_KEY` | required | A Duffel access token, created in the Duffel dashboard with read-only or read-write access (read-only is enough here); test-mode tokens use Duffel's test mode. Sent as a Bearer token. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Every request must carry the Duffel-Version header; this entry pins v2.
* Search = create an offer request (offer\_requests.create); it answers with the airlines' offers. Offers expire, typically within 30 minutes (expires\_at); fetch offers.get for current details before booking.
* Lists page by cursor: limit (1-200, default 50) and after=meta.after from the previous answer until it is null.
* Booking (creating orders, which pays the airline) is deliberately not in this entry.

## Endpoints

POST

Search flights

Create an offer request for one or more slices and passengers; the answer carries the airlines' priced offers.

[Open](#duffel-offer-requests-create)

GET

Get an offer request

An earlier search with its offers.

[Open](#duffel-offer-requests-get)

GET

List offer requests

Earlier searches, newest pages by cursor.

[Open](#duffel-offer-requests-list)

GET

Get an offer

Up-to-date price, slices, conditions and expiry of one offer.

[Open](#duffel-offers-get)

GET

Suggest airports and cities

Airports and cities matching a name or IATA code, or near a coordinate.

[Open](#duffel-places-suggestions)

GET

List airports

Airports with IATA codes and locations, optionally for one country.

[Open](#duffel-airports-list)

### Search flights

POST

`/air/offer_requests`

`duffel.offer_requests.create`

Create an offer request for one or more slices and passengers; the answer carries the airlines' priced offers.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`data` required</td><td>object</td><td>body</td><td>\{slices, passengers, cabin\_class, max\_connections, ...}. slices: one per leg (one for one-way, two for a return), each \{origin, destination (IATA codes), departure\_date (YYYY-MM-DD)}, optional departure\_time/arrival\_time \{from, to}. passengers: one object per traveller with either type (e.g. adult) or age, not both. cabin\_class: first, business, premium\_economy or economy. max\_connections: per slice, default 1, 0 for direct only. Example `{"slices": [{"origin": "LHR", "destination": "JFK", "departure_date": "2020-04-24"}], "passengers": [{"type": "adult"}], "cabin_class": "economy"}`</td></tr>

    <tr>
      <td>
        `return_offers`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Default true; false omits offers (then page them with the list offers call).
      </td>
    </tr>

    <tr>
      <td>
        `supplier_timeout`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Milliseconds to wait for each airline, 2000 to 60000, default 20000; keep it under your own HTTP timeout.
      </td>
    </tr>

    <tr><td>`view`</td><td>string</td><td>query</td><td>offers (default) a flat list; itineraries grouped by slice, itinerary and brand. One of `offers`, `itineraries`</td></tr>
  </tbody>
</table>

[Vendor docs](https://duffel.com/docs/api/v2/offer-requests/create-offer-request) · Same job: [FlightAware AeroAPI](https://docs.webrouter.net/data-apis/flightaware.md#flightaware-flights-search)

```python Python theme={null}
router.call_data_api("duffel.offer_requests.create", {'data': {'slices': [{'origin': 'LHR', 'destination': 'JFK', 'departure_date': '2020-04-24'}], 'passengers': [{'type': 'adult'}], 'cabin_class': 'economy'}})
```

```text MCP theme={null}
call_data_api(endpoint="duffel.offer_requests.create", params={"data": {"slices": [{"origin": "LHR", "destination": "JFK", "departure_date": "2020-04-24"}], "passengers": [{"type": "adult"}], "cabin_class": "economy"}})
```

> [!NOTE]
>
> * A read over POST: it stores an offer request (orq\_...) you can fetch again, but books and pays nothing.
> * Can take as long as the slowest airline, up to supplier\_timeout.
> * Duffel bills searches beyond a 1500:1 search-to-book ratio as excess searches.

### Get an offer request

GET

`/air/offer_requests/{id}`

`duffel.offer_requests.get`

An earlier search with its offers.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        Offer request id (orq\_...).
      </td>
    </tr>

    <tr>
      <td>
        `view`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        &#x20;One of&#x20;

        `offers`

        ,&#x20;

        `itineraries`
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://duffel.com/docs/api/v2/offer-requests) · Same job: [FlightAware AeroAPI](https://docs.webrouter.net/data-apis/flightaware.md#flightaware-flights-search)

### List offer requests

GET

`/air/offer_requests`

`duffel.offer_requests.list`

Earlier searches, newest pages by cursor.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        1 to 200, default 50.
      </td>
    </tr>

    <tr>
      <td>
        `after`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        meta.after from the previous page.
      </td>
    </tr>

    <tr>
      <td>
        `before`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Cursor for the previous page.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://duffel.com/docs/api/v2/offer-requests) · Same job: [FlightAware AeroAPI](https://docs.webrouter.net/data-apis/flightaware.md#flightaware-flights-search)

```python Python theme={null}
router.call_data_api("duffel.offer_requests.list")
```

```text MCP theme={null}
call_data_api(endpoint="duffel.offer_requests.list")
```

### Get an offer

GET

`/air/offers/{id}`

`duffel.offers.get`

Up-to-date price, slices, conditions and expiry of one offer.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        The offer id, from an offer request's offers.
      </td>
    </tr>

    <tr>
      <td>
        `return_available_services`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        true to include the available\_services the airline returns. Default false.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://duffel.com/docs/api/v2/offers)

> [!NOTE]
>
> * Still not a guarantee of availability at booking time.

### Suggest airports and cities

GET

`/places/suggestions`

`duffel.places.suggestions`

Airports and cities matching a name or IATA code, or near a coordinate.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `query`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Airport, city or country name, or IATA code.
      </td>
    </tr>

    <tr>
      <td>
        `lat`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Latitude, with lng and rad.
      </td>
    </tr>

    <tr>
      <td>
        `lng`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Longitude.
      </td>
    </tr>

    <tr>
      <td>
        `rad`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Radius in metres.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://duffel.com/docs/api/v2/places) · Same job: [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-geocoder-search), [CNPJá](https://docs.webrouter.net/data-apis/cnpja.md#cnpja-zip-get), [CompanyEnrich](https://docs.webrouter.net/data-apis/companyenrich.md#companyenrich-geo-regions), [Forager](https://docs.webrouter.net/data-apis/forager.md#forager-reference-locations), [IBGE](https://docs.webrouter.net/data-apis/ibge.md#ibge-aggregates-places), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-locations-search)

```python Python theme={null}
router.call_data_api("duffel.places.suggestions")
```

```text MCP theme={null}
call_data_api(endpoint="duffel.places.suggestions")
```

### List airports

GET

`/air/airports`

`duffel.airports.list`

Airports with IATA codes and locations, optionally for one country.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `iata_country_code`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Country code, e.g. GB.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        1 to 200, default 50.
      </td>
    </tr>

    <tr>
      <td>
        `after`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        meta.after from the previous page.
      </td>
    </tr>

    <tr>
      <td>
        `before`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td />
    </tr>
  </tbody>
</table>

[Vendor docs](https://duffel.com/docs/api/v2/airports) · Same job: [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-geocoder-search), [CNPJá](https://docs.webrouter.net/data-apis/cnpja.md#cnpja-zip-get), [CompanyEnrich](https://docs.webrouter.net/data-apis/companyenrich.md#companyenrich-geo-regions), [Forager](https://docs.webrouter.net/data-apis/forager.md#forager-reference-locations), [IBGE](https://docs.webrouter.net/data-apis/ibge.md#ibge-aggregates-places), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-locations-search)

```python Python theme={null}
router.call_data_api("duffel.airports.list")
```

```text MCP theme={null}
call_data_api(endpoint="duffel.airports.list")
```


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