{"openapi":"3.1.0","info":{"title":"Despegar Latin America Hotels and Flights Data (x402 & MCP)","version":"0.1.0","description":"Despegar hotel listings, flights, destination suggestions, activities and reviews across Latin America, one row per entity.","x-guidance":"Structured real-time web intelligence APIs paid per delivered row in USDC via x402. All endpoints are synchronous at POST /s/<site>/v1/<endpoint> and also exposed over stateless MCP at POST /mcp. Supports x402 v2 'upto' (Permit2, charged strictly for delivered rows) and 'exact' (EIP-3009). Empty/0-row (404), invalid input (422), timeout (504), and upstream failures (502) are never charged.","contact":{"email":"ops@opendata.best"}},"servers":[{"url":"https://x402.opendata.best"}],"paths":{"/s/despegar-com/v1/search":{"post":{"operationId":"despegar_com_search","summary":"Despegar Latin America Hotels and Flights Data: Search Despegar hotels, flights and destinations","description":"Query Despegar hotels, flights, destination suggestions, cars and activities across Latin American sites. Unit price: $0.005000/row USDC (default quote 5 rows, max 10 rows). Unsettled / 0-row / error responses are never charged.","tags":["despegar-com","Travel"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.025000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","description":"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","enum":["auto","suggestions","hotelsSearch","hotelDetail","flightsSearch","packagesSeo","bffConfig","cars","transfers","activities"]},"query":{"type":"string","description":"Enter a city or place name, such as Buenos Aires. With mode auto this returns destination suggestions; choose hotelsSearch to request hotels instead."},"hotelId":{"type":"string","description":"Enter a Despegar hotel identifier to select hotelDetail automatically. Optional reviews count toward maxResults."},"destinationGid":{"type":"string","description":"Enter a Despegar destination identifier, such as CIT_982, to select hotelsSearch without a place-name lookup."},"origin":{"type":"string","description":"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":"Arrival airport code or destination city slug for flights and packages, which are temporarily unavailable."},"countrySite":{"type":"string","description":"Choose the Despegar country site. Availability and fields can differ between countries and collection modes.","default":"despegar.com.ar","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"]},"maxResults":{"type":"integer","description":"Maximum delivered rows for the supplied query, hotel or route, including optional reviews. Default 70; larger requests are collected in parts of 70, subject to your maximum run cost and the Free-plan limits of 200 rows per run and 10 runs.","default":5,"minimum":1,"maximum":10},"checkin":{"type":"string","description":"Enter the stay start in YYYY-MM-DD format, today or later. Leave empty for 21 days from today.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"checkout":{"type":"string","description":"Hotel check-out date, YYYY-MM-DD. Leave empty for 7 nights after check-in.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"departureDate":{"type":"string","description":"Flight departure date, YYYY-MM-DD. Leave empty to use the check-in date.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"returnDate":{"type":"string","description":"Flight return date, YYYY-MM-DD. Leave empty to use the check-out date.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"tripType":{"type":"string","description":"Choose a round trip or one-way flight search.","default":"roundtrip","enum":["roundtrip","oneway"]},"adults":{"type":"integer","description":"Number of adults for the search. Exact child-age and room-by-room allocation is not available.","default":2,"minimum":1},"children":{"type":"integer","description":"Number of children requested. Child ages are not represented, so returned prices are not exact child-inclusive booking quotes.","default":0,"minimum":0},"rooms":{"type":"integer","description":"Number of rooms requested. Detailed allocation of travellers between rooms is not available.","default":1,"minimum":1},"currency":{"type":"string","description":"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","description":"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,"minimum":1,"maximum":20},"enrichDetails":{"type":"boolean","description":"Add available hotel details to hotelsSearch rows. Off by default; use enrichLimit to limit the number of hotels checked.","default":false},"enrichLimit":{"type":"integer","description":"Maximum hotels to check for additional details when enrichDetails is true, from 0 to 20.","default":3,"minimum":0,"maximum":20},"maxReviews":{"type":"integer","description":"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,"minimum":0,"maximum":50}},"additionalProperties":false},"example":{"mode":"hotelsSearch","query":"Buenos Aires","maxResults":5}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_despegar_com"},"example":{"jobId":"job_despegar_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"mode":"example_mode","countrySite":"example_countrySite","name":"example_name","hotelId":"example_hotelId","priceText":"example_priceText","score":"example_score"}],"meta":{"site":"despegar-com","endpoint":"search","maxResults":5,"payment":{"scheme":"upto","network":"eip155:84532","quotedMicrousd":25000,"settledMicrousd":5000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/despegar-com/v1/health":{"get":{"operationId":"despegar_com_health","summary":"Despegar Latin America Hotels and Flights Data: health check","description":"Free readiness check (never returns 402 and never starts a collection).","tags":["despegar-com","health"],"responses":{"200":{"description":"Operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"charged":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"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"}}},"Row_despegar_com":{"type":"object","properties":{"mode":{"type":["string","null"],"title":"Mode"},"countrySite":{"type":["string","null"],"title":"Site"},"name":{"type":["string","null"],"title":"Name"},"hotelId":{"type":["string","null"],"title":"Hotel ID"},"priceText":{"type":["string","null"],"title":"Price"},"score":{"type":["string","null"],"title":"Score"},"currency":{"type":["string","null"],"title":"Currency"},"origin":{"type":["string","null"],"title":"Origin"},"destination":{"type":["string","null"],"title":"Destination"},"productUrl":{"type":["string","null"],"format":"uri","title":"URL"},"phones":{"type":["string","null"],"title":"Phones"},"emails":{"type":["string","null"],"title":"Emails"},"address":{"type":["string","null"],"title":"Address"},"geo":{"type":["string","null"],"title":"Geo"},"person":{"type":["string","null"],"title":"Person"},"org":{"type":["string","null"],"title":"Organization"},"web":{"type":["string","null"],"title":"Web"},"leadSource":{"type":["string","null"],"title":"Lead source"},"leadReveal":{"type":["string","null"],"title":"Lead reveal"},"leadAbsences":{"type":["string","null"],"title":"Lead absences"},"capturedAt":{"type":["string","null"],"title":"Captured"}},"additionalProperties":true},"Response_despegar_com":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"done":{"type":"boolean"},"rowCount":{"type":"integer","minimum":1},"rowsBilled":{"type":"integer","minimum":1},"rowsDelivered":{"type":"integer","minimum":1},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row_despegar_com"}},"meta":{"type":"object","properties":{"site":{"type":"string"},"endpoint":{"type":"string"},"maxResults":{"type":"integer"},"payment":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"quotedMicrousd":{"type":"integer"},"settledMicrousd":{"type":"integer"},"transaction":{"type":"string"},"payer":{"type":"string"}}}}}},"required":["jobId","status","done","rowCount","rows"]}}},"x-discovery":{"ownershipProofs":["0xdb7c562a3ef6f9f29da4672abdab1489e82e910a91b863e3c22b905df6522b7223798a84245e0452cab689483b6cbb7cd8c13141319df982b213dea31ee7e4311c"]}}