Despegar Flight Search
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.
Credit cost: 2 credits per call
ApiKeyAuthx-api-key<token>Your API key. Include it in the x-api-key header for every request.
query*stringIATA pair, city pair, or a Despegar flights URL. The value sent is the code or the page URL.
BUE-MADBuenos Aires - Madridhttps://www.despegar.com.ar/vuelos/bue/mad/depart?stringOptional. YYYY-MM-DD, today or later. Checked only. The fares still come from the route page. A past date returns 400.
2026-12-15return_date?stringOptional. Send it only together with depart. It must be after depart. It does not switch the page to a dated shop search.
2026-12-18adults?numberOptional. Must be at least 1. The route page does not filter by passenger count.
language?stringOptional. Default es-AR. Aliases: es, en, pt, ar.
es-ARcurrency?stringOptional. Three letters. Used when a fare card does not show a currency. Fallback USD.
country?stringOptional. Two-letter site code. The value sent is the code, for example ar. It does not change the proxy. It selects the site and sends the x-locale header. If language is set, language wins for the locale. A full URL in query is left unchanged. Any other code returns 400.
armxar despegar.com.ar, mx despegar.com.mx, co despegar.com.co, cl despegar.cl, pe despegar.com.pe, uy despegar.com.uy, br decolar.com, us despegar.com.
return_page_source?booleanOptional. Default false. true returns {"result": html} instead of JSON. A Chrome, Brave, or Internet Explorer proxy error is still HTTP 500, and that error page is not returned.
falsefalsefields?stringComma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).
is_async?booleanRun the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.
falsesoft_fail?booleanReturn HTTP 200 even when the request fails; the error is in the error field of the body.
falseSuccessful response
application/json- response
results?array<>pagination?curl -X GET 'https://api.piloterr.com/v2/despegar/flight/search?query=string'{ "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 }}