{"openapi":"3.0.0","info":{"title":"Despegar Latin America Hotels and Flights Data","version":"1.0.0","description":"Despegar hotel listings, flights, destination suggestions, activities and reviews across Latin America, one row per entity."},"servers":[{"url":"https://ah-despegar-com.opendata.best/s/despegar-com"}],"paths":{"/v1/search":{"post":{"operationId":"search","summary":"Search Despegar hotels, flights and destinations","description":"Query Despegar hotels, flights, destination suggestions, cars and activities across Latin American sites.","tags":["search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["auto","suggestions","hotelsSearch","hotelDetail","flightsSearch","packagesSeo","bffConfig","cars","transfers","activities"],"description":"Mode. Leave on Auto to choose from the target fields you fill. Select hotelsSearch for a place-name hotel search. flightsSearch and packagesSeo are temporarily unavailable and stop with INVALID_INPUT without charging rows; cars, transfers and activities are not available.","default":"auto"},"query":{"type":"string","description":"Place name. Enter a city or place name, such as Buenos Aires. With mode auto this returns destination suggestions; choose hotelsSearch to request hotels instead.","example":"Argentina"},"hotelId":{"type":"string","description":"Hotel ID. Enter a Despegar hotel identifier to select hotelDetail automatically. Optional reviews count toward maxResults."},"destinationGid":{"type":"string","description":"Destination GID. Enter a Despegar destination identifier, such as CIT_982, to select hotelsSearch without a place-name lookup."},"origin":{"type":"string","description":"Origin. Departure airport code or origin city slug for flights and packages, which are temporarily unavailable. A route alone selects flightsSearch and stops with INVALID_INPUT."},"destination":{"type":"string","description":"Destination. Arrival airport code or destination city slug for flights and packages, which are temporarily unavailable."},"countrySite":{"type":"string","enum":["despegar.com.ar","despegar.com.mx","despegar.com.co","despegar.com.cl","despegar.com.br","despegar.com.pe","despegar.com.ec","despegar.com.uy"],"description":"Country site. Choose the Despegar country site. Availability and fields can differ between countries and collection modes.","default":"despegar.com.ar"},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).","default":10,"example":3},"checkin":{"type":"string","description":"Check-in. Enter the stay start in YYYY-MM-DD format, today or later. Leave empty for 21 days from today."},"checkout":{"type":"string","description":"Check-out. Hotel check-out date, YYYY-MM-DD. Leave empty for 7 nights after check-in."},"departureDate":{"type":"string","description":"Departure date. Flight departure date, YYYY-MM-DD. Leave empty to use the check-in date."},"returnDate":{"type":"string","description":"Return date. Flight return date, YYYY-MM-DD. Leave empty to use the check-out date."},"tripType":{"type":"string","enum":["roundtrip","oneway"],"description":"Trip type. Choose a round trip or one-way flight search.","default":"roundtrip"},"adults":{"type":"integer","minimum":1,"description":"Adults. Number of adults for the search. Exact child-age and room-by-room allocation is not available.","default":2},"children":{"type":"integer","minimum":0,"description":"Children. Number of children requested. Child ages are not represented, so returned prices are not exact child-inclusive booking quotes.","default":0},"rooms":{"type":"integer","minimum":1,"description":"Rooms. Number of rooms requested. Detailed allocation of travellers between rooms is not available.","default":1},"currency":{"type":"string","description":"Currency. Leave empty to use the selected country's currency, such as ARS for Argentina or MXN for Mexico. A different currency is rejected rather than converted."},"maxPages":{"type":"integer","minimum":1,"maximum":20,"description":"Maximum hotel search pages. Maximum hotel search pages to read, from 1 to 20. Collection can stop earlier when maxResults is reached or no more matching hotels are available.","default":1},"enrichDetails":{"type":"boolean","description":"Enrich hotel details. Add available hotel details to hotelsSearch rows. Off by default; use enrichLimit to limit the number of hotels checked.","default":false},"enrichLimit":{"type":"integer","minimum":0,"maximum":20,"description":"Hotels to enrich. Maximum hotels to check for additional details when enrichDetails is true, from 0 to 20.","default":3},"maxReviews":{"type":"integer","minimum":0,"maximum":50,"description":"Max reviews per hotel. Maximum reviews per hotel for hotelDetail or enriched hotelsSearch rows, from 0 to 50. Each review is billed as a separate row; hotel rows come first and reviews share the remaining maxResults allowance.","default":0},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"mode":"hotelsSearch","query":"Buenos Aires","maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/health":{"get":{"operationId":"health","summary":"API health check","description":"Lightweight readiness check for this API. Never starts a collection and always bills 0 rows.","tags":["health"],"responses":{"200":{"description":"API is operational (0 rows).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"API is temporarily unavailable (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"Row":{"type":"object","properties":{"source":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"mode":{"nullable":true,"type":"string"},"countrySite":{"nullable":true,"type":"string"},"hotelId":{"nullable":true,"type":"string"},"gid":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"display":{"nullable":true,"type":"string"},"priceText":{"nullable":true,"type":"string"},"score":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"productUrl":{"nullable":true,"type":"string"},"origin":{"nullable":true,"type":"string"},"destination":{"nullable":true,"type":"string"},"checkin":{"nullable":true,"type":"string"},"checkout":{"nullable":true,"type":"string"},"capturedAt":{"nullable":true,"type":"string"},"rowType":{"nullable":true,"type":"string","description":"Hotel and review rows use hotel and review respectively. Reviews are separate billed rows linked by hotelId."},"reviewId":{"nullable":true,"type":"string","description":"Review identifier from the source. When absent, an identifier is derived from hotelId and review content; reviewIdDerived marks this case."},"reviewIdDerived":{"nullable":true,"type":"boolean"},"reviewPosition":{"nullable":true,"type":"integer"},"rating":{"nullable":true},"reviewTitle":{"nullable":true,"type":"string"},"text":{"nullable":true,"type":"string"},"date":{"nullable":true,"type":"string"},"reviewer":{"nullable":true,"type":"string"},"language":{"nullable":true,"type":"string"},"goodComment":{"nullable":true,"type":"string","description":"Positive review text when supplied separately by the source."},"badComment":{"nullable":true,"type":"string","description":"Negative review text when supplied separately by the source."},"travelType":{"nullable":true,"type":"string","description":"Travel-party label, such as family, couple or business, when available."},"roomType":{"nullable":true,"type":"string","description":"Room label associated with the review, when available."},"hotelResponse":{"nullable":true,"type":"object","description":"The property reply to a review, when available.","additionalProperties":true},"helpfulVotes":{"nullable":true},"verified":{"nullable":true},"languageDetails":{"nullable":true,"type":"object","additionalProperties":true},"reviewerCountry":{"nullable":true,"type":"string"},"reviewerLevel":{"nullable":true,"type":"string"},"reviewerContributions":{"nullable":true},"starRating":{"nullable":true,"description":"Hotel star rating when shown with the hotel availability information."},"amenities":{"nullable":true,"type":"array","items":{"type":"string"}},"images":{"nullable":true,"type":"array","items":{}},"descriptions":{"nullable":true,"type":"array","items":{}},"accommodation":{"nullable":true,"type":"object","description":"Accommodation information supplied with a hotel availability result, when available.","additionalProperties":true},"prices":{"nullable":true,"type":"object","description":"Available price details, including displayed amounts, discounts, fees and taxes.","additionalProperties":true},"priceValue":{"nullable":true,"description":"Numeric total price when the source supplies one."},"availability":{"nullable":true,"type":"object","description":"Hotel availability information, which may include rates, rooms, meal plans and cancellation terms.","additionalProperties":true},"bookable":{"nullable":true},"rates":{"nullable":true,"type":"array","items":{}},"rooms":{"nullable":true,"type":"array","description":"Room information available on a hotel search row. Hotel detail rows use roomGroups for grouped room options.","items":{}},"roomGroups":{"nullable":true,"type":"array","description":"Room groups on a hotel detail row, with available names, prices, availability, meal plans, cancellation terms and rates.","items":{}},"mealPlans":{"nullable":true,"type":"array","items":{}},"cancellation":{"nullable":true,"type":"object","additionalProperties":true},"position":{"nullable":true,"type":"integer","description":"Hotel position in the returned search results."},"highlight":{"nullable":true,"additionalProperties":true},"promotions":{"nullable":true,"type":"array","items":{}},"badges":{"nullable":true,"type":"array","items":{}},"reviewScore":{"nullable":true,"description":"Aggregate guest review rating, when available."},"continent":{"nullable":true,"type":"string","description":"Continent label supplied with a destination suggestion."},"refinements":{"nullable":true,"type":"array","description":"More specific suggestions, such as airports within a city, with available identifiers, labels and destination types.","items":{"type":"object","properties":{"id":{"nullable":true,"type":"string"},"display":{"nullable":true,"type":"string"},"target":{"nullable":true,"type":"object","additionalProperties":true},"type":{"nullable":true,"type":"string"}},"additionalProperties":true}},"filterDetails":{"nullable":true,"type":"array","description":"Available destination filters: city, star rating, property type, zone, point of interest, amenity or chain.","items":{"type":"object","properties":{"code":{"nullable":true,"type":"string"},"filterType":{"nullable":true,"type":"string"},"filterValue":{"nullable":true,"type":"string"}},"additionalProperties":true}},"days":{"nullable":true,"type":"integer","description":"Package duration in days, only when explicitly stated in the offer."},"nights":{"nullable":true,"type":"integer","description":"Package duration in nights, only when explicitly stated in the offer."},"phones":{"type":"array","items":{"type":"object","properties":{"value":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"e164":{"nullable":true,"type":"string"}},"additionalProperties":true}},"emails":{"type":"array","items":{"type":"object","properties":{"value":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"}},"additionalProperties":true}},"address":{"nullable":true,"type":"object","description":"Structured address; unit is the street or door number. Suggestions may contain only parent locality, region or country information.","properties":{"street":{"nullable":true,"type":"string"},"unit":{"nullable":true,"type":"string"},"locality":{"nullable":true,"type":"string"},"region":{"nullable":true,"type":"string"},"postalCode":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"full":{"nullable":true,"type":"string"}},"additionalProperties":true},"geo":{"nullable":true,"type":"object","description":"Coordinates when both latitude and longitude are available. Coordinates do not establish a street address or door number.","properties":{"lat":{"nullable":true,"type":"number"},"lng":{"nullable":true,"type":"number"}},"additionalProperties":true},"person":{"nullable":true,"type":"object","description":"An individual contact, such as a host or representative, when available. Lodging businesses appear in org instead.","properties":{"name":{"nullable":true,"type":"string"},"role":{"nullable":true,"type":"string"}},"additionalProperties":true},"org":{"nullable":true,"type":"object","description":"Lodging or travel business identity. Suggestions use the visible label and available Despegar identifier.","properties":{"name":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"string"}},"additionalProperties":true},"web":{"nullable":true,"type":"object","description":"Entity-owned website and social links, when available. Platform support links are not treated as business contacts.","properties":{"website":{"nullable":true,"type":"string"},"socials":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"leadSource":{"nullable":true,"type":"string","description":"Where contact information or business identity was found. Lodging suggestions use entity; other suggestions use search.","enum":["search","detail","entity","contact","reveal-xhr"]},"leadReveal":{"nullable":true,"type":"string","description":"How the contact information or business identity was presented. Suggestions use visible for directly available information.","enum":["visible","click","xhr","gated","image","absent"]},"leadAbsences":{"type":"object","description":"Reasons for missing contact fields, distinguishing unavailable, inaccessible and unverified values.","additionalProperties":{"type":"string"}}},"additionalProperties":true,"description":"One collected entity. Field availability depends on rowType and the source. Fields always present (a|b = at least one of them): every row: hotelId|gid|id|productUrl."},"Error":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string"},"retryable":{"type":"boolean"}}},"JobStatus":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","partial","failed","cancelled"]},"done":{"type":"boolean"},"rowsAvailable":{"type":"integer"},"rowsDelivered":{"type":"integer","description":"Rows already delivered (and billed) to you for this job."},"rowsLimit":{"type":"integer","description":"Most rows this job can deliver."},"estimatedFinishSec":{"type":"integer","description":"While running: estimated seconds until done."},"statusUrl":{"type":"string"},"resultsUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"retentionHours":{"type":"integer"},"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"RowsPage":{"allOf":[{"$ref":"#/components/schemas/JobStatus"},{"type":"object","properties":{"offset":{"type":"integer"},"nextOffset":{"type":"integer"},"hasMore":{"type":"boolean"},"rowCount":{"type":"integer"},"rowsBilled":{"type":"integer","description":"Rows delivered by this response."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"meta":{"type":"object","additionalProperties":true}}}]},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}}}}}