# Booking Flight Search ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/booking/flight/search` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 3 credits per call | | **Documentation** | https://www.piloterr.com/library/booking-flight-search | ## Description Flight offers for an IATA pair such as PAR-LON, or a Booking flights URL. On an IATA pair, dates are optional. A flights URL is fetched as-is and dates are not applied. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/booking/flight/search' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### PAR-LON cheapest route fares, EUR ```json { "results": [ { "url": "https://flights.booking.com/flights/PAR-LON/", "price": 83.84, "route": "PAR Paris LON London", "stops": "Aller-retour Classe économique 1 passager", "airline": null, "currency": "EUR", "duration": null, "arrive_at": null, "depart_at": "sam. 14 nov. - mer. 18 nov.", "price_display": "sam. 14 nov. - mer. 18 nov. € 83,84" }, { "url": "https://flights.booking.com/flights/PAR-LON/", "price": 84.74, "route": "PAR Paris LON London", "stops": "Aller-retour Classe économique 1 passager", "airline": null, "currency": "EUR", "duration": null, "arrive_at": null, "depart_at": "sam. 21 nov. - mer. 25 nov.", "price_display": "sam. 21 nov. - mer. 25 nov. € 84,74" } ], "pagination": { "next": null, "page": 1, "per_page": 25, "total_pages": 1, "total_results": 3 } } ``` ### PAR-LON next route fares, EUR ```json { "results": [ { "url": "https://flights.booking.com/flights/PAR-LON/", "price": 86.17, "route": "PAR Paris LON London", "stops": "Aller-retour Classe économique 1 passager", "airline": null, "currency": "EUR", "duration": null, "arrive_at": null, "depart_at": "sam. 19 déc. - mer. 23 déc.", "price_display": "sam. 19 déc. - mer. 23 déc. € 86,17" } ], "pagination": { "next": null, "page": 1, "per_page": 25, "total_pages": 1, "total_results": 3 } } ``` ## Documentation ## Overview Queries Booking.com through an unlocked browser session and returns structured JSON. `language` is the Booking locale suffix (`fr`, `en-gb`, `de`, …), not a country domain. `currency` is an ISO 4217 code sent as `selected_currency`. One call returns one page. Builds a round trip when return_date is set, otherwise a one-way search. Each offer includes airline, departure and arrival times, stops, duration, price and URL when those nodes are in the unlocked page. A blocked flights host returns 500; a page without offer cards returns 404. ## Quickstart ``` https://api.piloterr.com/v2/booking/flight/search?query=PAR-LON&depart=2026-06-15&return_date=2026-06-18&adults=1¤cy=EUR&language=fr ``` ``` https://api.piloterr.com/v2/booking/flight/search?query=LYS-NCE&depart=2026-07-02&adults=1¤cy=EUR&language=fr ``` ## Parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `query` | string | yes | IATA pair ORIG-DEST, for example PAR-LON, or a full Booking flights URL. | | `depart` | string | no | Departure date YYYY-MM-DD. Required for an IATA pair. | | `return_date` | string | no | Return date YYYY-MM-DD. Omit for one way. | | `adults` | integer | no | Adults. Default 1. | | `page` | integer | no | Page number. Listings use 25 items per page when the source is paginated. | | `language` | string | no | Booking locale: fr, en-gb, en-us, de, es, it, pt-pt, nl, … Aliases: en, uk, gb, pt, zh, br. | | `currency` | string | no | ISO 4217 code. Default USD. Example EUR. | ## Response fields | Field | Type | Description | | --- | --- | --- | | results[].airline | string|null | Carrier | | results[].depart_at | string|null | Departure time | | results[].arrive_at | string|null | Arrival time | | results[].stops | string|null | Stops label | | results[].duration | string|null | Duration | | results[].price | number|null | Price | | results[].price_display | string|null | Price as printed | | results[].url | string|null | Offer URL | ## Use cases - Search a round trip by two IATA codes. - List one-way offers by omitting return_date. - Open an offer URL returned on the card. ## Error codes | Code | Description | | --- | --- | | 400 | Missing query, unknown language, bad currency, or checkout not after check-in. | | 404 | The page was fetched but no matching records could be parsed. | | 500 | The unlocked fetch failed or the page was blocked. |