# Despegar Reviews Scraper (`knagymate/despegar-reviews-scraper`) Actor

Scrape hotel reviews and rating data from Despegar — Latin America's largest online travel platform. Collect guest reviews, per-review ratings, and hotel-level summaries across Argentina, Mexico, Brazil, Colombia, and more. Supports date filtering for incremental runs.

- **URL**: https://apify.com/knagymate/despegar-reviews-scraper.md
- **Developed by:** [knagymate](https://apify.com/knagymate) (community)
- **Categories:** Travel, Developer tools, Automation
- **Stats:** 6 total users, 5 monthly users, 99.5% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 1,000 reviews

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Despegar Reviews Scraper

Scrape structured **Despegar hotel reviews and rating data** with an Apify Actor built for travel analytics, hospitality intelligence, and competitive benchmarking.

This Actor collects guest review records from Despegar hotel pages and returns clean JSON with:
- review metadata (reviewer name, country, type, language, date)
- positive and negative guest comments in the original language
- per-review overall rating
- hotel-level aggregated rating summary (average, service, staff, location, cleanliness, value, internet)

Despegar is one of the largest online travel platforms in Latin America — used across Argentina, Mexico, Brazil, Colombia, Chile and more. This scraper gives you programmatic access to real traveler sentiment from those markets.

---

### Why this scraper

- Built specifically for **Despegar review scraping** with reliable hotel ID resolution from URLs.
- Supports multiple hotels in a single run via `startUrls`.
- Optional date filtering with `cutoffDate` for incremental / delta scraping.
- Configurable per-hotel cap using `maxReviewsPerHotel`.
- Can return a `summary` record even when no review passes the date filter (`alwaysReturnSummary`).
- Output is AI-ready and analytics-friendly for ETL pipelines, sentiment analysis, and NLP workflows.

---

### Supported Despegar URLs

Use standard Despegar hotel detail page URLs, for example:

```text
https://www.us.despegar.com/hotels/h-352691/bluebay-grand-esmeralda-all-inclusive-riviera+maya?from_source=site&rid=8934&clickedPrice=USD_undefined&search_id=497017e3-8793-48ca-b447-2d6b7eda7d12
````

Regional Despegar domains (`.com.ar`, `.com.mx`, `.com.co`, `.com.br`, `us.despegar.com`, etc.) are all supported. The Actor resolves the hotel ID and fetches review data from Despegar rating endpoints.

***

### Input schema

| Field | Type | Required | Default | Description |
|---|---|---:|---:|---|
| `startUrls` | `array` | Yes | - | Despegar hotel page URLs to process |
| `maxReviewsPerHotel` | `integer` | No | `100` | Maximum number of returned review records per hotel |
| `cutoffDate` | `string` (`YYYY-MM` or `YYYY-MM-DD`) | No | - | Keep only reviews from this month onwards. If a full date is provided, the day is ignored — Despegar stores review dates at month granularity only. |
| `enabledProviders` | `array` | No | `["DESPEGAR", "EXPEDIA"]` | Review providers to include. Accepted values: `DESPEGAR`, `EXPEDIA`. Defaults to both. |
| `alwaysReturnSummary` | `boolean` | No | `true` | Push a summary record even when no review record is returned |

***

### Example input

```json
{
  "startUrls": [
    { "url": "https://www.us.despegar.com/hotels/h-352691/bluebay-grand-esmeralda-all-inclusive-riviera+maya?from_source=site&rid=8934&clickedPrice=USD_undefined&search_id=497017e3-8793-48ca-b447-2d6b7eda7d12" }
  ],
  "maxReviewsPerHotel": 100,
  "cutoffDate": "2025-01",
  "enabledProviders": ["DESPEGAR", "EXPEDIA"],
  "alwaysReturnSummary": true
}
```

***

### Output format

Results are stored in the default Apify dataset. Each item is either a `review` record or a `summary` record, identified by the `recordType` field.

***

### Example output item (`recordType: review`)

```json
{
  "recordType": "review",
  "reviewId": "6a3ebc65d7756e001c718905",
  "reviewDate": "2026-06",
  "reviewerName": "Raquel",
  "reviewerCountry": "Mexico",
  "reviewerCountryCode": "MX",
  "reviewerType": "Couple",
  "language": "es",
  "reviewerCommentPositive": "Es un hotel grande, todo incluido",
  "reviewerCommentNegative": "Es un hotel muy grande, muy bonito, pero está demasiado descuidado...",
  "ratings": {
    "overall": 6.0
  },
  "hotelSummary": {
    "hotelId": "352691",
    "startUrl": "https://www.us.despegar.com/hotels/h-352691/bluebay-grand-esmeralda-all-inclusive-riviera+maya",
    "numberOfReviews": 198,
    "ratings": {
      "average": 6.8,
      "service": 6.9,
      "staff": 7.5,
      "location": 7.8,
      "cleanliness": 7.3,
      "value": 7.8,
      "internet": 6.7
    }
  }
}
```

### Example output item (`recordType: summary`)

```json
{
  "recordType": "summary",
  "hotelSummary": {
    "hotelId": "788634",
    "startUrl": "https://www.us.despegar.com/hoteles/h-788634/relais-du-silence-ti-al-lannec-hotel-restaurant-y-spa-trebeurden",
    "numberOfReviews": 5,
    "ratings": {
      "average": 9.0,
      "service": 9.1,
      "staff": 9.4,
      "location": 9.2,
      "cleanliness": 9.8,
      "value": 9.0,
      "internet": 9.0
    }
  }
}
```

***

### Use cases

- **Sentiment analysis** — feed Spanish and Portuguese hotel reviews into NLP models for Latin American travel markets.
- **Competitive intelligence** — benchmark hotels by rating category (service, cleanliness, location, value) across Despegar.
- **Review monitoring** — schedule periodic runs with `cutoffDate` to track new reviews incrementally.
- **Travel data aggregation** — combine with other OTA scrapers to get a full cross-platform review dataset.
- **Hospitality analytics** — identify trends in traveler feedback across regions, traveler types, and time periods.

***

### How to use on Apify

1. Open the Actor on Apify.
2. Add one or more Despegar hotel URLs to `startUrls`.
3. Optionally set `maxReviewsPerHotel` and `cutoffDate`.
4. Run the Actor and export results from the dataset as JSON, CSV, or Excel.

***

If this Actor helps your workflow, a rating on Apify is appreciated.

# Actor input Schema

## `startUrls` (type: `array`):

Hotel detail page URLs on Despegar to scrape reviews from.

## `maxReviewsPerHotel` (type: `integer`):

Maximum number of reviews to scrape per hotel

## `cutoffDate` (type: `string`):

Only scrape reviews from this month onwards. Accepts either YYYY-MM or YYYY-MM-DD format — if a full date is provided, the day is ignored and the entire month is used as the cutoff. This is because Despegar stores review dates at month granularity only. Leave empty to scrape all available reviews.

## `enabledProviders` (type: `array`):

Choose which review providers to include in the output. At least one provider must be selected.

## `alwaysReturnSummary` (type: `boolean`):

Whether to always return a summary of hotel reviews, even if no reviews were found.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.us.despegar.com/hotels/h-352691/bluebay-grand-esmeralda-all-inclusive-riviera+maya?from_source=site&rid=8934&clickedPrice=USD_undefined&search_id=497017e3-8793-48ca-b447-2d6b7eda7d12"
    }
  ],
  "maxReviewsPerHotel": 100,
  "cutoffDate": "2025-01",
  "enabledProviders": [
    "DESPEGAR",
    "EXPEDIA"
  ],
  "alwaysReturnSummary": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.us.despegar.com/hotels/h-352691/bluebay-grand-esmeralda-all-inclusive-riviera+maya?from_source=site&rid=8934&clickedPrice=USD_undefined&search_id=497017e3-8793-48ca-b447-2d6b7eda7d12"
        }
    ],
    "maxReviewsPerHotel": 100,
    "enabledProviders": [
        "DESPEGAR",
        "EXPEDIA"
    ],
    "alwaysReturnSummary": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("knagymate/despegar-reviews-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.us.despegar.com/hotels/h-352691/bluebay-grand-esmeralda-all-inclusive-riviera+maya?from_source=site&rid=8934&clickedPrice=USD_undefined&search_id=497017e3-8793-48ca-b447-2d6b7eda7d12" }],
    "maxReviewsPerHotel": 100,
    "enabledProviders": [
        "DESPEGAR",
        "EXPEDIA",
    ],
    "alwaysReturnSummary": True,
}

# Run the Actor and wait for it to finish
run = client.actor("knagymate/despegar-reviews-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.us.despegar.com/hotels/h-352691/bluebay-grand-esmeralda-all-inclusive-riviera+maya?from_source=site&rid=8934&clickedPrice=USD_undefined&search_id=497017e3-8793-48ca-b447-2d6b7eda7d12"
    }
  ],
  "maxReviewsPerHotel": 100,
  "enabledProviders": [
    "DESPEGAR",
    "EXPEDIA"
  ],
  "alwaysReturnSummary": true
}' |
apify call knagymate/despegar-reviews-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=knagymate/despegar-reviews-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Despegar Reviews Scraper",
        "description": "Scrape hotel reviews and rating data from Despegar — Latin America's largest online travel platform. Collect guest reviews, per-review ratings, and hotel-level summaries across Argentina, Mexico, Brazil, Colombia, and more. Supports date filtering for incremental runs.",
        "version": "0.0",
        "x-build-id": "44ZzVLh9oYpVJiXg4"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/knagymate~despegar-reviews-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-knagymate-despegar-reviews-scraper",
                "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/knagymate~despegar-reviews-scraper/runs": {
            "post": {
                "operationId": "runs-sync-knagymate-despegar-reviews-scraper",
                "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/knagymate~despegar-reviews-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-knagymate-despegar-reviews-scraper",
                "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",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Hotel URLs",
                        "type": "array",
                        "description": "Hotel detail page URLs on Despegar to scrape reviews from.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxReviewsPerHotel": {
                        "title": "Maximum number of reviews per hotel",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of reviews to scrape per hotel",
                        "default": 100
                    },
                    "cutoffDate": {
                        "title": "Cutoff date",
                        "pattern": "^\\d{4}-\\d{2}(-\\d{2})?$",
                        "type": "string",
                        "description": "Only scrape reviews from this month onwards. Accepts either YYYY-MM or YYYY-MM-DD format — if a full date is provided, the day is ignored and the entire month is used as the cutoff. This is because Despegar stores review dates at month granularity only. Leave empty to scrape all available reviews."
                    },
                    "enabledProviders": {
                        "title": "Enabled review providers",
                        "minItems": 1,
                        "type": "array",
                        "description": "Choose which review providers to include in the output. At least one provider must be selected.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "DESPEGAR",
                                "EXPEDIA"
                            ],
                            "enumTitles": [
                                "Despegar",
                                "Expedia"
                            ]
                        },
                        "default": [
                            "DESPEGAR",
                            "EXPEDIA"
                        ]
                    },
                    "alwaysReturnSummary": {
                        "title": "Always return a summary",
                        "type": "boolean",
                        "description": "Whether to always return a summary of hotel reviews, even if no reviews were found.",
                        "default": true
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
