# 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:** 5 total users, 3 monthly users, 99.2% 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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 and Decolar 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 and Decolar 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. Decolar is its Brazilian counterpart, serving the same market under a different brand. This scraper gives you programmatic access to real traveler sentiment from both platforms.

***

### Why this scraper

- Built specifically for **Despegar and Decolar 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 URLs

Use standard Despegar or Decolar 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
```

```text
https://www.decolar.com/accommodations/detail/252075
```

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

***

### Input schema

| Field | Type | Required | Default | Description |
|---|---|---:|---:|---|
| `startUrls` | `array` | Yes | - | Despegar or Decolar 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 and Decolar.
- **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 or Decolar 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

Download the OpenAPI definition: https://api.apify.com/v2/acts/ATkdy3WvAebhIgl7N/builds/wR6M5H007kRyQNFh9/openapi.json
