{
  "openapi": "3.0.1",
  "info": {
    "title": "Despegar Hotel Ratings Scraper - Guest Scores, AI Summary",
    "description": "Despegar hotel ratings for Latin America by hotel URL or id. One row per hotel: 0-10 guest rating, review count, six category scores, AI review summary, stars, city. Free: up to four published comments per hotel (no full review list). No start fee. Opiniones y calificaciones de hoteles, puntuación.",
    "version": "1.0",
    "x-build-id": "O7otCp6gQttGMmiGb"
  },
  "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, so countries can be mixed in one run; the slug does not matter. Use for \"the guest rating of this hotel\". A URL from another site ends the run with the reason on the run card and nothing charged. One of startUrls or hotelIds is required.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "hotelIds": {
            "title": "Despegar hotel ids",
            "uniqueItems": true,
            "type": "array",
            "description": "Despegar's numeric hotel ids, e.g. [\"265543\", \"123456\"]: the number in /h-<id>/ and the hotel_id on an earlier run's rows; the id is the same on every country site. Fetched on the country site chosen below, one request per hotel: the cheapest input. An id Despegar does not have costs nothing and is reported as a status row with status \"not_found\". One of startUrls or hotelIds is required.",
            "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": "\"com\" (default) = Despegar picks the site by the proxy's exit country. Or one country site: \"us\" (English), \"ar\", \"mx\", \"co\", \"cl\", \"pe\", \"uy\", \"ec\", \"bo\", \"py\", \"pa\", \"cr\", \"gt\" (Spanish). Every site publishes the same hotel, 0-10 rating, review count and comments; the site decides the language of the AI summary, category labels and dates, and the page currency. Use \"mx\" for \"ratings as seen from Mexico\". \"br\" (decolar.com) refused every request in testing: expect blocked status rows.",
            "default": "com"
          },
          "locale": {
            "title": "Language",
            "enum": [
              "auto",
              "es",
              "en"
            ],
            "type": "string",
            "description": "\"auto\" (default), \"es\" or \"en\": the language of the AI summary, category labels and dates when country is left at \"com\" (\"en\" reads us.despegar.com, \"es\" reads despegar.com.ar). Despegar has no language switch of its own, so the site is the language; an explicit country always wins over locale. Pass \"en\" for \"the summary in English\".",
            "default": "auto"
          },
          "includeComments": {
            "title": "Include the published comments",
            "type": "boolean",
            "description": "true (DEFAULT) = also emit the guest comments the hotel page publishes, at most four per hotel whatever the review count says, as free rows (type \"review\") with 0-10 score, the good half, the bad half, month, traveller type, reviewer country and helpful votes. A hotel costs the same with or without them. false = hotel and status rows only. Despegar has no full review list: for hundreds of reviews per property use a Booking or TripAdvisor reviews scraper.",
            "default": true
          },
          "minRating": {
            "title": "Only hotels rated at or above",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "0 (default) = no floor. 1-10 = keep only hotels whose 0-10 guest rating is at or above it, e.g. 8 for \"well-rated hotels only\" (rating_5 = rating / 2). 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": "Proxy sessions (egress IPs) run in parallel, 1-16, e.g. 2 (default 2). Each keeps its own DataDome cookie, which is what makes a session work at all; each is paced separately.",
            "default": 2
          },
          "perIp": {
            "title": "Requests per second per session",
            "minimum": 0.1,
            "maximum": 3,
            "type": "number",
            "description": "Requests per second per session, 0.1-3, e.g. 0.5 (default 0.5). Measured on Despegar: one session served four hotel pages at 1/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 that cost residential traffic without going faster.",
            "default": 0.5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy RESIDENTIAL is required and is the default: Despegar's DataDome gate refuses every datacenter range (403 on every attempt); 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}