Despegar Hotel Search
Search Despegar hotels by city name or by an accommodations URL. Dates are optional. If both are omitted, the stay is 3 nights starting 21 days from today. One date without the other, or a past date, returns 400. One call is one page of up to 21 hotels.
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*stringRequired. City name, or a Despegar accommodations URL. The value sent is the city or the page URL, not an API URL.
Buenos Aireshttps://www.despegar.com.ar/accommodations/results/CIT_982/2026-12-15/2026-12-18/2check_in?stringOptional. YYYY-MM-DD, today or later. Send it only together with check_out.
2026-12-15check_out?stringOptional. Must be after check_in when both are set.
2026-12-18adults?numberOptional. Default 2. Must be at least 1.
"2"children?numberOptional. Default 0.
"0"children_ages?stringOptional. Comma-separated ages, one per child. If children is set and this is empty, each child is 8.
8,11stars?stringOptional. Keep hotels whose star count is exactly this value: 1, 2, 3, 4 or 5. Empty keeps every hotel on the page.
currency?stringOptional. Three letters, for example ARS. Used only when the card does not show a currency. It is not added to the URL. Prices on despegar.com.ar are usually ARS.
sort_by?stringOptional. price, review_score, or rating. Empty keeps the page order. Other values are ignored.
max_results?numberOptional. Keep only the first N hotels of this page. Empty returns the full page, up to 21. There is no default of 20.
page?numberOptional. Page number. Despegar returns up to 21 hotels per page. Default 1.
"1"language?stringOptional. Default es-AR. Aliases: es, en, pt, ar. Unknown code returns 400. If set, it wins over the locale implied by country.
es-ARen-UScountry?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
[index: integer]?curl -X GET 'https://api.piloterr.com/v2/despegar/search?query=string'[ { "id": "hotel-bsas-22741", "url": "https://www.despegar.com/hoteles/argentina/buenos-aires/alvear-palace-hotel/hotel/22741?adults=2&rooms=1&checkin=2026-08-10&checkout=2026-08-15", "name": "Alvear Palace Hotel", "stars": 5, "taxes": 110520, "rating": 9.3, "address": { "city": "Buenos Aires", "full": "Av. Alvear 1891, Recoleta, Buenos Aires, Argentina", "country": "Argentina", "neighborhood": "Recoleta" }, "currency": "ARS", "location": { "lat": -34.5874, "lng": -58.3932, "distance_to_center": "2.1 km del centro" }, "amenities": [ "Wi-Fi gratis", "Restaurante", "Spa", "Gimnasio", "Piscina cubierta", "Concierge 24h" ], "thumbnail": "https://photos.despegar.com/hotels/22741/main.jpg", "total_price": 921000, "rating_label": "Excelente", "reviews_count": 1874, "price_per_night": 184200, "free_cancellation": false, "breakfast_included": true }]