# Tripadvisor Review Scraper (`mrdoe/tripadvisor-review-scraper`) Actor

- **URL**: https://apify.com/mrdoe/tripadvisor-review-scraper.md
- **Developed by:** [MrDoe](https://apify.com/mrdoe) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 results

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/actors/running/actors-in-store.md#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

### What does TripAdvisor Review Scraper do?

**TripAdvisor Review Scraper** extracts guest reviews from [TripAdvisor](https://www.tripadvisor.com) hotel pages - **anonymously, no login, no TripAdvisor account**. Give it a hotel name, a city, a full TripAdvisor hotel URL, or a numeric hotel ID, and it returns full review text, rating, sub-ratings, reviewer info, dates, and management responses.

### Why use this Actor?

- **Reputation monitoring** - pull a hotel's latest reviews on a schedule and track sentiment/rating trends over time.
- **Competitive research** - batch several competing hotels (`hotelQueries`) and compare review volume, rating, and guest sentiment in one dataset.
- **Voice-of-guest analysis** - full review text plus per-category sub-ratings (cleanliness, service, location...) feed straight into text analysis without extra parsing.

### How to use it

1. Set `hotelQuery` (a hotel name, a city name, a full TripAdvisor hotel URL, or a bare numeric hotel ID) or `hotelQueries` for a batch.
2. Set `maxItems` to cap the number of review rows per hotel (defaults to 20).
3. Click **Start**.

`hotelQueries` wins over `hotelQuery` when filled; duplicates and blanks are dropped automatically.

### Input

| Field                | Type    | Description                                                                                                                                                          |
| -------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hotelQuery`         | string  | A hotel name, a city name (see below for the supported city list), a full TripAdvisor hotel URL, or a bare numeric hotel ID. Defaults to a demo hotel if left blank. |
| `hotelQueries`       | array   | Many hotel names, city names, URLs, or hotel IDs in one run. Wins over `hotelQuery` when filled.                                                                     |
| `maxItems`           | integer | Caps the number of review rows returned per hotel. Default 20. The first 10 review rows in a run are always free.                                                    |
| `proxyConfiguration` | object  | A residential proxy is required - TripAdvisor is protected by DataDome and blocks datacenter IPs outright.                                                           |

#### Resolving a hotel: URL/ID vs. free text

A full `Hotel_Review-g<geoId>-d<hotelId>-...` URL (with or without the `https://www.tripadvisor.com` prefix) resolves directly, as does a bare numeric hotel ID (the "d" number). Free text is matched against a curated table of major city names (Amsterdam, Bangkok, Barcelona, Berlin, Boston, Chicago, Dubai, Hong Kong, Istanbul, Las Vegas, London, Los Angeles, Miami, New York/New York City, Orlando, Paris, Rome, San Francisco, Seoul, Singapore, Sydney, Tokyo, Toronto, Washington DC) - the city name is stripped out of your query text and whatever's left is matched against hotel names in that city's listing page. For best results with an obscure/ambiguous hotel name, pass a direct TripAdvisor `Hotel_Review` URL or numeric hotel ID instead.

### Output

One row per review, with a hotel-context row (`status: "error"` or `"no_reviews"`) if a hotel can't be resolved or has no reviews.

Review row:

```json
{
    "status": "success",
    "hotelQuery": "The Bryant Park Hotel, New York City",
    "geoId": "60763",
    "hotelId": "224214",
    "hotelName": "The Bryant Park Hotel",
    "hotelUrl": "https://www.tripadvisor.com/Hotel_Review-g60763-d224214-Reviews-The_Bryant_Park_Hotel-New_York_City_New_York.html",
    "totalReviewCount": 5077,
    "reviewId": "1012345678",
    "reviewerName": "Jane D",
    "reviewerUsername": "janed123",
    "rating": 5,
    "subratings": { "Service": 5, "Cleanliness": 5, "Location": 5 },
    "title": "Wonderful stay in Midtown",
    "reviewText": "The staff were incredibly helpful and the room was spotless...",
    "language": "en",
    "createdDate": "2026-08-01",
    "publishedDate": "2026-08-03",
    "mgmtResponseText": null
}
```

### How it works

TripAdvisor embeds a large hydration payload - offers, reviews, and more - as a URL-percent-encoded, backslash-escaped JSON blob inside a `<script src="data:text/javascript,...">` tag on every hotel review page. This Actor reads that embedded JSON directly (the `ReviewsProxy_getReviewListPageForLocation` GraphQL result) instead of scraping visible text, then follows TripAdvisor's own review pagination (an `-orN-` URL offset segment, 10 reviews per page) up to `maxItems`, 5 pages, or the hotel's own total review count - whichever comes first. Since TripAdvisor is protected by DataDome, requests run through Camoufox (a fingerprint-patched Firefox), with a warmed browser context reused across a run's requests and a fresh proxy exit IP retried on a blocked/failed fetch.

### Limitations

- **Only a curated list of major cities** resolves free-text city names (see [Resolving a hotel](#resolving-a-hotel-urlid-vs-free-text)) - for a city not in that list, pass a direct hotel URL or numeric ID instead.
- **Up to 50 reviews per hotel per run** (5 pages x 10 reviews) - re-run with pagination offset built into a later version if you need a hotel's full review history beyond that.
- Review order and content reflect TripAdvisor's own review platform at fetch time.
- No customer-review filtering (e.g. by language or traveler type) is exposed as an input in this version.

### Pricing

This Actor uses pay-per-event pricing - one small run-start charge, then a per-row charge for each review. See the **Pricing** tab for current rates. The first 10 review rows in a run are always free. Failed/no-review hotel lookups land as `status: "error"`/`"no_reviews"` rows and are never charged.

### FAQ

**Do I need a TripAdvisor account or API key?** No - it runs entirely against TripAdvisor's public, logged-out hydration data.

**Why did I get a `status: "no_reviews"` row?** The hotel was resolved successfully but TripAdvisor's own hydration payload didn't include any review data for it at fetch time.

**Why did I get a `status: "error"` row?** Either the free-text query couldn't be resolved to a known city/hotel (see [Resolving a hotel](#resolving-a-hotel-urlid-vs-free-text)), or TripAdvisor's DataDome protection blocked the fetch after retries - try again, or pass a direct hotel URL/ID.

### Disclaimer

This Actor is an independent tool, not affiliated with or endorsed by TripAdvisor. It only accesses data TripAdvisor serves publicly to anonymous visitors. Use it in compliance with TripAdvisor's terms of use and applicable law in your jurisdiction. Found a bug or have a feature request? Use the Issues tab on this Actor's page.

# Actor input Schema

## `hotelQuery` (type: `string`):

A hotel name, a city name (see README for the supported city list), a full TripAdvisor hotel URL (Hotel\_Review-...), or a bare numeric hotel ID (the "d" number in that URL). Defaults to a demo hotel if left blank.

## `hotelQueries` (type: `array`):

Many hotel names, city names, URLs, or hotel IDs in one run - e.g. to compare reviews for hotel X and hotel Y. Wins over "hotelQuery" when filled.

## `maxItems` (type: `integer`):

Caps the number of review rows returned per hotel. TripAdvisor paginates reviews anonymously in batches of 10 - this Actor follows that pagination up to this cap (or up to 5 pages/50 reviews, whichever is lower). The first 10 review rows in a run are always free.

## `proxyConfiguration` (type: `object`):

A residential proxy is required - TripAdvisor is protected by DataDome and blocks datacenter IPs outright.

## Actor input object example

```json
{
  "hotelQuery": "The Bryant Park Hotel, New York City",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "hotelQuery": "The Bryant Park Hotel, New York City",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrdoe/tripadvisor-review-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 = {
    "hotelQuery": "The Bryant Park Hotel, New York City",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("mrdoe/tripadvisor-review-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "hotelQuery": "The Bryant Park Hotel, New York City",
  "maxItems": 20
}' |
apify call mrdoe/tripadvisor-review-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrdoe/tripadvisor-review-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ey5JpbU9Ph5vBbaYU/builds/v0fcMHdZXPIOPP7pA/openapi.json
