# Despegar Flight Search ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/despegar/flight/search` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 2 credits per call | | **Documentation** | https://www.piloterr.com/library/despegar-flight-search | ## Description Route fares from Despegar. query is BUE-MAD, Buenos Aires - Madrid, or a flights URL such as https://www.despegar.com.ar/vuelos/bue/mad/. Dates are checked but do not change the route page. A URL in query is fetched as-is. ## 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/despegar/flight/search' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Example ```json { "results": [ { "url": "https://www.despegar.com.ar/shop/flights/results/roundtrip/BUE/MAD/", "price": 893, "route": "AEP - MAD", "airline": "Avianca", "currency": "USD", "price_display": "US$ 893" } ], "pagination": { "next": null, "page": 1, "per_page": 21, "total_pages": null, "total_results": null } } ``` ## Documentation ## Overview Search Despegar Argentina for places, hotels and flights. ## Quickstart Copy one URL at a time. ``` https://api.piloterr.com/v2/despegar/location/search?query=Buenos%20Aires ``` ``` https://api.piloterr.com/v2/despegar/search?destination=Buenos%20Aires&check_in=2026-12-15&check_out=2026-12-18&adults=2 ``` ``` https://api.piloterr.com/v2/despegar/ad?url=https://www.despegar.com.ar/accommodations/detail/242503/2026-12-15/2026-12-18/2 ``` ``` https://api.piloterr.com/v2/despegar/flight/search?query=BUE-MAD ``` Hotel dates are required and must be today or later. Flight dates are optional: without them the route page returns published fares.