Skip to content

// docs

Decolar: Search flights

Extracts air ticket results from Decolar by origin/destination airport, dates and occupancy. The backend queries the required internal endpoint, but the response only exposes the public URL of Decolar results.

decolar.com:plp · 5 credits per request

Standard credit cost. Your account pricing is shown in the sandbox.

Try this operation in the sandbox

Source-specific limitations

Some requests can take up to 1 minute to respond. This is expected for this operation; wait for the request to complete.

HTTP request

cURL
curl -X POST https://api.geckoapi.com.br/v1/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "target": "decolar.com",
  "type": "plp",
  "from": "CAC",
  "to": "GRU",
  "departureDate": "2026-04-25",
  "returnDate": "2026-04-30",
  "numAdults": 1,
  "numChildren": 0
}'

Keep your API key on your server. See the quickstart for authentication and response handling.

MCP request

The hosted MCP tool fixes target and type for this operation. Its remaining arguments use the same input rules as Extract.

POST /v1/mcp · Bearer or X-API-Key authentication

decolar_com_plp · tools/call
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "decolar_com_plp",
    "arguments": {
      "from": "CAC",
      "to": "GRU",
      "departureDate": "2026-04-25",
      "returnDate": "2026-04-30",
      "numAdults": 1,
      "numChildren": 0,
      "executionId": "exec_example_123"
    }
  }
}

Supported inputs

Conditional fields depend on the alternatives and constraints in the rule column. Fields marked unsupported are omitted.

FieldTypeRequirementRuleDefaultExample
url
URL extraction target. For some PLPs it can be omitted when API assembles URL from other fields.
string (URL) Optional Optional. When entered, it must be a URL of Decolar in decolar.com. The backend normalizes URL to the supported stable endpoint. - https://www.mercadolivre.com.br/p/MLB123456
from
Code IATA of the airport of origin for searching PLP of Decolar, GOL, Azul, LATAM, Trip.com, KAYAK, MaxMilhas and 123Milhas.
string (IATA 3 letters) Required Code IATA of the airport of origin with letters 3 (ex: CAC). Mandatory when url is not sent. - CAC
to
Destination airport code IATA for search PLP of Decolar, GOL, Azul, LATAM, Trip.com, KAYAK, MaxMilhas and 123Milhas.
string (IATA 3 letters) Required Code IATA of the destination airport with letters 3 (ex: GRU). Mandatory when url is not sent. - GRU
departureDate
Departure date for searching PLP from ClickBus, Decolar, GOL, Azul, LATAM, Trip.com, KAYAK, MaxMilhas and 123Milhas.
string (YYYY-MM-DD) Required Departure date in YYYY-MM-DD format. Mandatory when url is not sent. - 2026-04-25
returnDate
Optional return date for PLP search of ClickBus, Decolar, GOL, Azul, LATAM, Trip.com, KAYAK, MaxMilhas, and 123Milhas.
string (YYYY-MM-DD) Optional Return date in YYYY-MM-DD format. Must be >= departureDate. - 2026-04-30
target
Target source for extraction.
enum Required Always mandatory and must be decolar.com. - decolar.com
type
Extraction type: pdp, idp, plp, ilp, quote, review or places.
enum Required Always mandatory and must be plp. - plp
numAdults
Quantity of adults for Booking, Airbnb, Hoteis.com, Trivago, Decolar, GOL, Azul, LATAM and Trip.com.
integer (1-30) Required Number of adults. Mandatory when url is not sent. 1 1
numChildren
Number of children for Booking, Hoteis.com, Trivago, Decolar, GOL, Azul, LATAM and Trip.com.
integer (0-30) Optional Number of children. 0 0

Request examples

Search Decolar - round trip

Round-trip search for IATA airports with adults and children.

Search Decolar - round trip
{
  "target": "decolar.com",
  "type": "plp",
  "from": "CAC",
  "to": "GRU",
  "departureDate": "2026-04-25",
  "returnDate": "2026-04-30",
  "numAdults": 1,
  "numChildren": 0
}

Search Decolar - one way

One-way search for airports IATA without return data.

Search Decolar - one way
{
  "target": "decolar.com",
  "type": "plp",
  "from": "CAC",
  "to": "SAO",
  "departureDate": "2026-05-02",
  "numAdults": 2,
  "numChildren": 1
}

Response schema

Leaf paths and expected types. Field names and enum values are part of the API contract.

responseSchema
{
  "requestId": "string (uuid)",
  "executionId": "string (uuid)",
  "notFound": "boolean (optional; true when the upstream entity was not found and data is null)",
  "data.source": "string",
  "data.type": "string",
  "data.parser": "\"1.0.0\"",
  "data.url": "string",
  "data.requestUrl": "string",
  "data.extractedAt": "string (iso datetime)",
  "data.searchType": "string (ONE_WAY | ROUND_TRIP)",
  "data.from": "string",
  "data.to": "string",
  "data.departureDate": "string (YYYY-MM-DD)",
  "data.returnDate": "string | null (YYYY-MM-DD)",
  "data.numAdults": "number",
  "data.numChildren": "number",
  "data.searchId": "string | null",
  "data.initialCurrency": "string | null",
  "data.totalResults": "number",
  "data.primaryResults": "number",
  "data.page": "number",
  "data.pageCount": "number",
  "data.resultsPerPage": "number",
  "data.directFlightsCount": "number | null",
  "data.flightsWithStopsCount": "number | null",
  "data.additionalServices[]": "string",
  "data.items[].position": "number",
  "data.items[].id": "string | null",
  "data.items[].validatingCarrier": "string | null",
  "data.items[].nonStop": "boolean | null",
  "data.items[].price.totalAmount": "number | null",
  "data.items[].routeChoices[].type": "string | null",
  "data.items[].routeChoices[].routes[].stopsCount": "number | null",
  "data.items[].routeChoices[].routes[].segments[].flightId": "string | null"
}

Example response

Illustrative response. Product names, reviews and other source content retain their original language. Missing and null values do not imply zero stock, free shipping or zero reviews.

responseExample
{
  "requestId": "99999999-1111-4111-8111-999999999999",
  "executionId": "99999999-2222-4222-8222-999999999999",
  "data": {
    "source": "decolar.com",
    "type": "plp",
    "parser": "1.0.0",
    "url": "https://www.decolar.com/shop/flights/results/multioneway/CAC/GRU/2026-04-25/2026-04-30/1/0/0",
    "requestUrl": "https://www.decolar.com/shop/flights/results/multioneway/CAC/GRU/2026-04-25/2026-04-30/1/0/0",
    "extractedAt": "2026-04-13T12:00:00.000Z",
    "searchType": "ROUND_TRIP",
    "from": "CAC",
    "to": "GRU",
    "departureDate": "2026-04-25",
    "returnDate": "2026-04-30",
    "numAdults": 1,
    "numChildren": 0,
    "searchId": "search-123",
    "initialCurrency": "BRL",
    "totalResults": 1,
    "primaryResults": 1,
    "page": 1,
    "pageCount": 1,
    "resultsPerPage": 10,
    "directFlightsCount": 1,
    "flightsWithStopsCount": 0,
    "additionalServices": [
      "refund_protection"
    ],
    "items": [
      {
        "position": 1,
        "id": "itinerary-1",
        "validatingCarrier": "G3",
        "nonStop": true,
        "price": {
          "totalAmount": 531
        },
        "routeChoices": [
          {
            "type": "OUTBOUND",
            "routes": [
              {
                "stopsCount": 0,
                "segments": [
                  {
                    "flightId": "G31234"
                  }
                ]
              }
            ]
          },
          {
            "type": "INBOUND",
            "routes": [
              {
                "stopsCount": 0,
                "segments": [
                  {
                    "flightId": "G31235"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}

Complete field reference

PathTypeDescriptionExample
data.additionalServices[] string Field data.additionalServices[] returned in the response payload. refund_protection
data.departureDate string (YYYY-MM-DD) Field data.departureDate returned in the response payload. 2026-04-25
data.directFlightsCount number | null data.directFlightsCount field returned in the response payload. 1
data.extractedAt string (iso datetime) data.extractedAt field returned in the response payload. 2026-04-13T12:00:00.000Z
data.flightsWithStopsCount number | null Field data.flightsWithStopsCount returned in the response payload. 0
data.from string data.from field returned in the response payload. CAC
data.initialCurrency string | null data.initialCurrency field returned in the response payload. BRL
data.items[].id string | null Field data.items[].id returned in the response payload. itinerary-1
data.items[].nonStop boolean | null Field data.items[].nonStop returned in the response payload. true
data.items[].position number data.items[].position field returned in the response payload. 1
data.items[].price.totalAmount number | null Field data.items[].price.totalAmount returned in the response payload. 531
data.items[].routeChoices[].routes[].segments[].flightId string | null Field data.items[].routeChoices[].routes[].segments[].flightId returned in the response payload. G31234
data.items[].routeChoices[].routes[].stopsCount number | null Field data.items[].routeChoices[].routes[].stopsCount returned in the response payload. 0
data.items[].routeChoices[].type string | null Field data.items[].routeChoices[].type returned in the response payload. OUTBOUND
data.items[].validatingCarrier string | null Field data.items[].validatingCarrier returned in the response payload. G3
data.numAdults number data.numAdults field returned in the response payload. 1
data.numChildren number Field data.numChildren returned in the response payload. 0
data.page number Field data.page returned in the response payload. 1
data.pageCount number Field data.pageCount returned in the response payload. 1
data.parser "1.0.0" Stable version of the API response format. 1.0.0
data.primaryResults number Field data.primaryResults returned in the response payload. 1
data.requestUrl string Same value as `data.url`; never exposes the queried internal endpoint. https://www.decolar.com/shop/flights/results/multioneway/CAC/GRU/2026-04-25/2026-04-30/1/0/0
data.resultsPerPage number Field data.resultsPerPage returned in the response payload. 10
data.returnDate string | null (YYYY-MM-DD) Field data.returnDate returned in the response payload. 2026-04-30
data.searchId string | null Field data.searchId returned in the response payload. search-123
data.searchType string (ONE_WAY | ROUND_TRIP) Field data.searchType returned in the response payload. ROUND_TRIP
data.source string Field data.source returned in the response payload. decolar.com
data.to string Field data.to returned in the response payload. GRU
data.totalResults number Field data.totalResults returned in the response payload. 1
data.type string Field data.type returned in the response payload. plp
data.url string URL publishes results from Decolar, without exposing the internal endpoint queried by the backend. https://www.decolar.com/shop/flights/results/multioneway/CAC/GRU/2026-04-25/2026-04-30/1/0/0
executionId string (uuid) Field executionId returned in the response payload. 99999999-2222-4222-8222-999999999999
notFound boolean (optional; true when the upstream entity was not found and data is null) Present and true when the upstream entity was not found. In this case data is null and the request still completes successfully. N/A
requestId string (uuid) Field requestId returned in the response payload. 99999999-1111-4111-8111-999999999999

Errors and missing data

When supported by this operation, an entity not found upstream can return HTTP 200 with data: null and notFound: true. Check the documented response fields before interpreting an empty result. Source-specific behavior and exceptions are described above.

HTTP statusError codeMeaning
400INVALID_PAYLOADInvalid JSON or a request that violates the documented validation rules.
401UNAUTHORIZEDMissing authorization or an invalid API key or token.
402INSUFFICIENT_CREDITSThe account has insufficient credits for this operation.
403FORBIDDENThe account does not have access, or the API is temporarily disabled.
409EXECUTION_CONFLICTThe execution identifier conflicts with an incompatible execution state.
429RATE_LIMIT_EXCEEDED / TOO_MANY_INFLIGHT_REQUESTSA rate limit or simultaneous request limit was exceeded.
5xxUPSTREAM_TIMEOUT / UPSTREAM_HTTP_ERROR / WORKER_FUNCTION_ERRORAn upstream, worker or gateway failure. Failed requests follow the platform refund policy.