← Back to marketplace

Despegar Latin America Hotels and Flights Data

Despegar hotel listings, flights, destination suggestions, activities and reviews across Latin America, one row per entity.

travel
by kaneliu101 endpoint100% uptime192ms avg

Endpoints

POST/v1/search
$0.0500/req

Search Despegar hotels, flights and destinations

Request schema

modestring

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.

querystring

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.

hotelIdstring

Hotel ID. Enter a Despegar hotel identifier to select hotelDetail automatically. Optional reviews count toward maxResults.

destinationGidstring

Destination GID. Enter a Despegar destination identifier, such as CIT_982, to select hotelsSearch without a place-name lookup.

originstring

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.

destinationstring

Destination. Arrival airport code or destination city slug for flights and packages, which are temporarily unavailable.

countrySitestring

Country site. Choose the Despegar country site. Availability and fields can differ between countries and collection modes.

maxResultsinteger

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).

checkinstring

Check-in. Enter the stay start in YYYY-MM-DD format, today or later. Leave empty for 21 days from today.

checkoutstring

Check-out. Hotel check-out date, YYYY-MM-DD. Leave empty for 7 nights after check-in.

departureDatestring

Departure date. Flight departure date, YYYY-MM-DD. Leave empty to use the check-in date.

returnDatestring

Return date. Flight return date, YYYY-MM-DD. Leave empty to use the check-out date.

tripTypestring

Trip type. Choose a round trip or one-way flight search.

adultsinteger

Adults. Number of adults for the search. Exact child-age and room-by-room allocation is not available.

childreninteger

Children. Number of children requested. Child ages are not represented, so returned prices are not exact child-inclusive booking quotes.

roomsinteger

Rooms. Number of rooms requested. Detailed allocation of travellers between rooms is not available.

currencystring

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.

maxPagesinteger

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.

enrichDetailsboolean

Enrich hotel details. Add available hotel details to hotelsSearch rows. Off by default; use enrichLimit to limit the number of hotels checked.

enrichLimitinteger

Hotels to enrich. Maximum hotels to check for additional details when enrichDetails is true, from 0 to 20.

maxReviewsinteger

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.

requestIdstring

Optional. Your id for this request: repeating it while the job runs returns the same job.

Response schema

{
  "allOf": [
    {
      "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"
        }
      }
    },
    {
      "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
        }
      }
    }
  ]
}

Quick start

Easiest way: the APIHub CLI. Credits cover x402, no wallet needed.

# install and set up once
npx @apihubio/cli register
npx @apihubio/cli topup 10

# call this service
npx @apihubio/cli call "https://proxy.apihub.io/despegar-com/v1/search" \
  -d '{"mode":"auto","query":"Argentina","hotelId":"example hotelId","destinationGid":"example destinationGid","origin":"example origin","destination":"example destination","countrySite":"despegar.com.ar","maxResults":3,"checkin":"example checkin","checkout":"example checkout","departureDate":"example departureDate","returnDate":"example returnDate","tripType":"roundtrip","adults":2,"children":0,"rooms":1,"currency":"example currency","maxPages":1,"enrichDetails":false,"enrichLimit":3,"maxReviews":0,"requestId":"example requestId"}'

Or call the proxy directly (curl / any HTTP client):

curl -X POST https://proxy.apihub.io/despegar-com/v1/search \
  -H "Authorization: Bearer ahk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"mode":"auto","query":"Argentina","hotelId":"example hotelId","destinationGid":"example destinationGid","origin":"example origin","destination":"example destination","countrySite":"despegar.com.ar","maxResults":3,"checkin":"example checkin","checkout":"example checkout","departureDate":"example departureDate","returnDate":"example returnDate","tripType":"roundtrip","adults":2,"children":0,"rooms":1,"currency":"example currency","maxPages":1,"enrichDetails":false,"enrichLimit":3,"maxReviews":0,"requestId":"example requestId"}'

# If credits available: charged automatically, returns 200
# Otherwise: returns 402 (pay via @x402/fetch or top up credits)

Pricing calculator

Estimate your monthly cost for Despegar Latin America Hotels and Flights Data.

POST /v1/search$0.0500/req
-