{
  "openapi": "3.0.1",
  "info": {
    "title": "Despegar Hotel Ratings Scraper — Guest Scores & Summary",
    "description": "Despegar hotel guest ratings for Latin America: the 0-10 rating, the review count behind it, six category scores, Despegar's own AI-written summary of what guests say, and the up to four comments the page publishes. Give hotel URLs or ids, pick a country site. Pay per hotel.",
    "version": "1.0",
    "x-build-id": "s5NL08UITRR8tonVd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kestrel~despegar-hotel-ratings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kestrel-despegar-hotel-ratings",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/kestrel~despegar-hotel-ratings/runs": {
      "post": {
        "operationId": "runs-sync-kestrel-despegar-hotel-ratings",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/kestrel~despegar-hotel-ratings/run-sync": {
      "post": {
        "operationId": "run-sync-kestrel-despegar-hotel-ratings",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "startUrls": {
            "title": "Despegar hotel URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "Despegar hotel pages, e.g. https://www.despegar.com.ar/hoteles/h-265543/riu-cancun — any country domain works (.com, .com.ar, .com.mx, .com.co, .cl, .com.pe, us.despegar.com/hotels/…) and each URL is fetched on the domain you give it, so you can mix countries in one run. The slug does not matter: Despegar redirects any slug to the canonical one.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "hotelIds": {
            "title": "Despegar hotel ids",
            "uniqueItems": true,
            "type": "array",
            "description": "Despegar's numeric hotel ids, e.g. 265543 — the number in /h-<id>/ and what an earlier run's hotel_id gives you. Ids are fetched on the country domain chosen below. This is the cheapest input: no lookup, one request per hotel.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Despegar country site",
            "enum": [
              "com",
              "us",
              "ar",
              "mx",
              "co",
              "cl",
              "pe",
              "uy",
              "ec",
              "bo",
              "py",
              "pa",
              "cr",
              "gt",
              "br"
            ],
            "type": "string",
            "description": "Which Despegar domain to read hotel ids from. Every domain publishes the same hotel, the same 0-10 rating, the same review count and the same comments — the domain decides the language of the AI summary, the category labels and the review dates, and the currency of the page. \"com\" lets Despegar pick by the proxy's exit country. Brazil (decolar.com) is listed for completeness but refused every request we made, so avoid it.",
            "default": "com"
          },
          "locale": {
            "title": "Language",
            "enum": [
              "auto",
              "es",
              "en"
            ],
            "type": "string",
            "description": "Which language you want the AI summary, the category labels and the review dates in. Despegar has no language switch of its own — Accept-Language and ?language= are both ignored — so the language is the domain: \"en\" reads us.despegar.com, \"es\" reads despegar.com.ar. Only used when the country above is left at \"com\"; an explicit country always wins.",
            "default": "auto"
          },
          "includeComments": {
            "title": "Include the published comments",
            "type": "boolean",
            "description": "Also emit the individual guest comments the hotel page publishes — at most four per hotel, whatever the review count says. They are free rows: a hotel costs the same with or without them. Each comment carries its 0-10 score, the good half, the bad half, the month it was written, the traveller type and the reviewer's country.",
            "default": true
          },
          "minRating": {
            "title": "Only hotels rated at or above",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Despegar scores hotels 0-10 (every row also carries the same score on the 0-5 scale as rating_5). 0 = no floor. 8 keeps only the well-rated ones. Hotels below the floor are dropped before billing and never charged; hotels with no rating at all are reported as no_reviews and are always free.",
            "default": 0
          },
          "sessions": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many proxy sessions (egress IPs) run in parallel. More is faster; each is paced separately and each keeps its own DataDome cookie, which is what makes a session work at all.",
            "default": 2
          },
          "perIp": {
            "title": "Requests per second per session",
            "minimum": 0.1,
            "maximum": 3,
            "type": "number",
            "description": "Pace for each session. Measured on Despegar: one session served four hotel pages at 1 req/s and was then refused for the rest of the minute, so the default is deliberately slow. 0.3-0.5 is comfortable; above 1 expect blocks and retries, which cost residential traffic without going faster.",
            "default": 0.5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy with the RESIDENTIAL group is required and is the default: Despegar's DataDome gate refuses every datacenter range outright (403 on every attempt, both TLS profiles), and only residential IPs with a Chrome TLS fingerprint are served. Keep the default.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}