# Tripadvisor Review Scraper With Keyword Search (`scrapapi/tripadvisor-review-scraper`) Actor

Tripadvisor Review Scraper: Search reviews by keyword and extract ratings, reviewer names, review text, dates, hotel or business details, and review URLs. Analyze customer sentiment, feedback trends, recurring topics, and competitor reputation for travel and market research.

- **URL**: https://apify.com/scrapapi/tripadvisor-review-scraper.md
- **Developed by:** [ScrapAPI](https://apify.com/scrapapi) (community)
- **Categories:** Automation, Lead generation, Travel
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Tripadvisor Review Scraper With Keyword Search

Extract TripAdvisor hotel reviews **and** run TripAdvisor's own review-text search: hand this Apify actor a hotel URL/name plus a list of concern keywords ("bed bugs", "noisy", "rude", "smell", "broken", "dirty" by default) and it returns only the reviews that match — with TripAdvisor's own match count per keyword, the guest's original (non-machine-translated) wording, a traveler-type filter, and the hotel's property-level aspect scorecard and live ranking. No login, no API key, no code required.

This is a TripAdvisor review scraper built for reputation monitoring, hotel due-diligence, and competitor benchmarking where you need to know **whether a specific problem shows up in the reviews** — not just the newest N reviews in English.

***

### What does this TripAdvisor review scraper do?

Given one or more hotel URLs, hotel names, or search terms, the actor:

1. Resolves each input to a real TripAdvisor hotel page (direct URL is fastest; a name or search term is auto-resolved via Google Search).
2. Pulls the hotel's own metadata — name, address, geo-coordinates, overall rating, rating histogram, property-level aspect scorecard, and current live ranking — from the hotel page.
3. Fetches reviews through TripAdvisor's internal review-list API, with full auto-pagination up to your requested count (no manual "next page" clicking, no scrolling).
4. **Optionally** runs a site-side keyword search: each keyword you supply is sent to TripAdvisor's own review-search index (not a local text grep), in every language you specify, and the actor reports TripAdvisor's own match count per keyword alongside the matching reviews.
5. Exports everything as structured JSON/CSV/Excel/XML/HTML, ready to plug into a spreadsheet, BI dashboard, or downstream NLP/sentiment pipeline.

### Why keyword search matters for TripAdvisor reviews

Most TripAdvisor review scrapers hand back the newest (or highest-rated) N reviews and machine-translate everything to English by default — which hides two things a reputation-monitoring or due-diligence use case actually needs:

- **Whether a specific complaint exists at all**, and how often — without you reading thousands of rows yourself.
- **What guests who wrote in their own language actually said**, since an English-only keyword search misses reviews originally written in Spanish, Indonesian, Portuguese, etc.

This actor asks TripAdvisor's own search index directly, across the language(s) you choose, and surfaces the real match count TripAdvisor itself reports — instead of guessing from a sample of the newest reviews.

### Key features

- 🔎 **Keyword-in-review search** — run your own list of concern words/phrases as site-side searches against TripAdvisor's review index, not a local grep over already-fetched reviews.
- 🌐 **Keyword × language cross-product** — pair each keyword with the ISO language code(s) it should be searched in, so a local-language complaint isn't invisible to an English-only sweep.
- 📊 **TripAdvisor's own match count** — `keywordMatchCounts` reports the site's real per-keyword, per-language hit count (not an estimate), so you know how common a concern is before pulling every matching row.
- 📝 **Original wording, not silent auto-translation** — toggle off machine translation to get the guest's real text and language, plus flags (`originalLanguage`, `translationType`, `isMachineTranslated`) so every row tells you whether it was translated.
- 🧳 **Traveler-type filter** — narrow results to Business, Couples, Family, Friends, or Solo trips.
- 🏅 **Hotel aspect scorecard** — the property-level Location / Rooms / Value / Cleanliness / Service / Sleep Quality scores TripAdvisor shows on the hotel page itself (not an average of the sampled reviews).
- 🏆 **Live hotel ranking** — the hotel's current position/out-of/category/area ranking as TripAdvisor displays it right now.
- ⭐ Star-rating filter, sort order (newest/oldest/most relevant/highest rating), and a display-language filter for the plain (non-keyword) feed.
- 👤 Optional full reviewer profile (name, username, location, avatar, contribution counts) per review.
- 📥 Bulk input — multiple hotel URLs/names in one run; auto-pagination up to 10,000 reviews per hotel.
- 📦 Standard Apify export formats: JSON, CSV, Excel, XML, HTML.

### How to use it

1. Open the actor and paste one or more TripAdvisor hotel URLs into **Hotel URLs, Names, or Search Terms** (a hotel name or loose search term also works — it's auto-resolved).
2. Leave **Concern Keywords to Search For** at its default list, or replace it with your own words/phrases — or clear it entirely to turn keyword search off and get the plain newest/oldest/relevant/rating feed instead.
3. Add the ISO language code(s) you want each keyword searched in under **Languages to Search In**.
4. Set **Max Reviews to Return per Hotel**, pick a **Result Order**, and optionally narrow by **Star Rating Filter** or **Traveler Type Filter**.
5. Click **Start**. Results stream into the dataset as they're found — export as JSON, CSV, Excel, XML, or HTML when the run finishes.

### Input

| Field | Type | Description |
|---|---|---|
| `startUrls` | array (required) | TripAdvisor hotel URLs, hotel names, or search terms. |
| `reviewKeywords` | array | Words/phrases to search for inside reviews via TripAdvisor's own search index. Empty = keyword search off (default: `["dirty","noisy","rude","smell","broken","bed bugs"]`). |
| `keywordSearchLanguages` | array | ISO language codes each keyword is searched in (default: `["en"]`). Runs the full keyword × language cross-product. |
| `keepOriginalReviewText` | boolean | ON (default) = guest's real wording/language, no machine translation. OFF = TripAdvisor machine-translates every review to English. |
| `maxComments` | integer (1–10,000) | Reviews to return per hotel (or unique keyword-matching reviews, when keyword search is on). Default `10`. |
| `sortOrder` | enum | `newest` (default) / `oldest` / `relevant` / `rating` — order for the plain feed; keyword-search results are ordered by which sweep found them. |
| `reviewsLanguages` | enum | Display-language filter for the plain feed (default `English`; `ALL_REVIEW_LANGUAGES` keeps every locale). |
| `reviewRatings` | enum | `ALL_REVIEW_RATINGS` (default) / `POSITIVE` / `NEGATIVE` / `AVERAGE` / a specific star count 1–5. |
| `travelerTypes` | array | Keep only `BUSINESS`/`COUPLES`/`FAMILY`/`FRIENDS`/`SOLO` reviews. Empty (default) = keep all. |
| `scrapeReviewerInfo` | boolean | Include the full reviewer profile per review (default `true`). |
| `proxyConfiguration` | object | Apify Proxy config. Defaults to Residential — TripAdvisor is protected by DataDome and datacenter IPs get blocked quickly. |

#### Example input

```json
{
  "startUrls": [
    "https://www.tripadvisor.com/Hotel_Review-g60763-d208453-Reviews-Hilton_New_York_Times_Square-New_York_City_New_York.html"
  ],
  "reviewKeywords": ["bed bugs", "noisy", "rude"],
  "keywordSearchLanguages": ["en", "es"],
  "keepOriginalReviewText": true,
  "maxComments": 50,
  "travelerTypes": ["FAMILY", "COUPLES"],
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Output

Every dataset row is a single review. Base review/hotel fields are always present (whether or not keyword search is used); the keyword-search and analytics fields below are added on top.

#### Example output row

```json
{
  "id": "1040504451",
  "url": "https://www.tripadvisor.com/ShowUserReviews-g60763-d208453-r1040504451-Hilton_New_York_Times_Square-New_York_City_New_York.html",
  "title": "Perfect Holidays at Hilton Times Square !!!!!",
  "lang": "en",
  "locationId": "208453",
  "publishedDate": "2025-11-27",
  "publishedPlatform": "OTHER",
  "rating": 5,
  "helpfulVotes": 0,
  "text": "We were for 2 weeks holidays in New York!! ...",
  "roomTip": null,
  "travelDate": "2025-11",
  "tripType": "FAMILY",
  "user": {
    "userId": "4381D233A5C57ADAF67693B272BEFE70",
    "name": "Dimitris T",
    "contributions": { "totalContributions": 2, "helpfulVotes": 0 },
    "username": "margaretmN8866NJ",
    "userLocation": "Thessaloniki, Greece",
    "avatar": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/1a/f6/de/5a/default-avatar-2020-36.jpg?w=100&h=100&s=1",
    "link": "www.tripadvisor.com/Profile/margaretmN8866NJ"
  },
  "ownerResponse": null,
  "subratings": [
    { "name": "Value", "value": 5 },
    { "name": "Rooms", "value": 5 },
    { "name": "Location", "value": 5 },
    { "name": "Cleanliness", "value": 5 },
    { "name": "Service", "value": 5 },
    { "name": "Sleep Quality", "value": 5 }
  ],
  "photos": [],
  "placeInfo": {
    "id": "208453",
    "name": "Hilton New York Times Square",
    "rating": 4.3,
    "numberOfReviews": 7879,
    "locationString": "New York City, New York",
    "latitude": 40.75665,
    "longitude": -73.988815,
    "webUrl": "https://www.tripadvisor.com/Hotel_Review-g60763-d208453-Reviews-Hilton_New_York_Times_Square-New_York_City_New_York.html",
    "website": "https://www.hilton.com/en/hotels/nyctshh-hilton-times-square/",
    "address": "234 West 42nd Street, New York City, NY 10036",
    "addressObj": { "street1": "234 West 42nd Street", "street2": "", "city": "New York City", "state": "NY", "country": "United States", "postalcode": "10036" },
    "ratingHistogram": { "count1": 267, "count2": 290, "count3": 704, "count4": 2568, "count5": 5064 }
  },
  "originalLanguage": "en",
  "translationType": null,
  "isMachineTranslated": false,
  "matchedKeywords": ["bed bugs"],
  "matchedKeywordLanguage": "en",
  "keywordMatchCounts": { "bed bugs": { "en": "20" } },
  "reviewsInSearchLanguage": { "en": 7970 },
  "matchedTravelerTypeFilter": true,
  "placeSubratings": { "location": 4.8, "rooms": 4.5, "value": 4.1, "cleanliness": 4.6, "service": 4.4, "sleepQuality": 4.6 },
  "placeRanking": { "position": 285, "outOf": 525, "category": "hotels", "area": "New York City" }
}
```

#### Output fields

**Base review & hotel fields** (present on every row, keyword search on or off): `id`, `url`, `title`, `lang`, `locationId`, `publishedDate`, `publishedPlatform`, `rating`, `helpfulVotes`, `text`, `roomTip`, `travelDate`, `tripType`, `user` (profile object, `null` if `scrapeReviewerInfo` is off), `ownerResponse` (management reply, `null` if none), `subratings` (per-review category scores), `photos`, `placeInfo` (hotel name/address/geo/rating/rating histogram).

**Keyword search & analytics fields** (new in this variant, added alongside the base fields):

| Field | Description |
|---|---|
| `matchedKeywords` | Which keyword(s) from `reviewKeywords` produced this row. Empty array when keyword search is off. |
| `matchedKeywordLanguage` | Which `keywordSearchLanguages` value the matching sweep used. |
| `keywordMatchCounts` | TripAdvisor's own per-keyword, per-language match count for the run, e.g. `{"bed bugs": {"en": "20"}}`. Reported as the string `">=1000"` once a count hits the endpoint's reporting ceiling. |
| `reviewsInSearchLanguage` | Approximate pool size of reviews available in each requested search language — an availability figure, not a precise market-size count. |
| `originalLanguage` | The language the review was actually written in (before any translation). |
| `translationType` | `"MACHINE"` if TripAdvisor machine-translated the review, otherwise `null`. |
| `isMachineTranslated` | Convenience boolean, `true` when `translationType == "MACHINE"`. |
| `matchedTravelerTypeFilter` | Whether the row matches the `travelerTypes` filter. Always `true` when the filter is left empty. |
| `placeSubratings` | The hotel's own property-level aspect scorecard: `location`, `rooms`, `value`, `cleanliness`, `service`, `sleepQuality`. |
| `placeRanking` | The hotel's current live ranking: `position`, `outOf`, `category`, `area`. |

### Known limitations & honest caveats

- **`placeSubratings`/`placeRanking` are parsed from the hotel page's minified CSS class structure**, not from a stable API. They will silently return `null` for every field if TripAdvisor next redesigns that page — unlike the GraphQL-based review fields, which re-derive their query ID every run and are more resilient to change.
- **`travelerTypes` is applied client-side**, not via a server-side filter — TripAdvisor's own traveler-segment filter axis does not currently filter results server-side. A narrow traveler-type filter combined with a high `maxComments` may need to page well past your requested count before enough matching reviews are found, which adds run time.
- **More keywords × more languages = more requests.** Each keyword/language pair is its own search sweep against TripAdvisor; a long `reviewKeywords` list combined with several `keywordSearchLanguages` will materially increase run duration and usage compared to the plain feed.
- **`keywordMatchCounts` caps out at `">=1000"`** for very common words — the endpoint TripAdvisor exposes does not report an exact count above that ceiling.
- **`publishedPlatform` currently reports the constant `"OTHER"`, and `user.contributions.helpfulVotes` currently reports `0`** on every row — these come directly from TripAdvisor's own response fields being empty/absent for this endpoint, not from this actor. They're preserved as-is for compatibility with the plain review feed.
- **Anti-bot exposure on Apify's own proxy pool is not independently guaranteed.** TripAdvisor runs DataDome; a residential proxy is used by default and is strongly recommended, but bot-detection behavior can vary by IP and over time.
- **`oldest`/`newest` sort order reflects TripAdvisor's own sort key**, which on a small fraction of reviews can differ slightly from the displayed `publishedDate` column (TripAdvisor's internal date-of-stay vs. publish-date can diverge on some rows) — worth a spot-check if strict chronological order matters for your use case.

### Use cases

- **Reputation & complaint monitoring** — find out fast whether "bed bugs", "mold", "rude staff", or any concern you define shows up in a property's reviews, and how often, without reading every review yourself.
- **Hotel due diligence / acquisition research** — pull a property's aspect scorecard, live ranking, and rating histogram alongside the raw review text.
- **Multi-language brand monitoring** — search the same keyword across several languages to catch complaints that an English-only sweep would miss.
- **Competitor benchmarking** — compare match counts and aspect scores for the same concern across several hotels.
- **Sentiment/NLP pipelines** — export original (non-machine-translated) review text and language flags into a downstream analysis tool.
- **Segment-specific research** — filter to Business, Family, Couples, Friends, or Solo travelers before analyzing complaint patterns.

### Is it legal to scrape TripAdvisor reviews?

This actor accesses only publicly available TripAdvisor pages and endpoints — the same review data any visitor to the site can see. Use the collected data responsibly: for research, analytics, and reputation-monitoring purposes, respecting TripAdvisor's terms of service and applicable data-protection regulations (GDPR, CCPA) for any personal data in reviewer profiles.

### FAQ

**Does this replace the plain TripAdvisor review scraper?**
Yes — every base input and output field (URLs, review count, sort order, ratings, reviewer profiles, hotel info) still works exactly as before. Leave `reviewKeywords` empty to get the plain newest/oldest/relevant/rating feed with no keyword search involved.

**Does keyword search grep the reviews locally, or search TripAdvisor's own index?**
It sends each keyword to TripAdvisor's own review-search index and reports TripAdvisor's own match count — it is not a local text search over already-downloaded reviews. Matching is stemmed/token-based (e.g. "bedbugs" can also match "bug bites"), which is why `matchedKeywords` tells you which sweep produced each row rather than asserting a literal substring match.

**What happens if I turn off machine translation?**
`text` becomes the guest's original wording and `lang` reflects the language they actually wrote in, instead of TripAdvisor's default English machine-translation. `originalLanguage`, `translationType`, and `isMachineTranslated` are populated either way, so you always know whether a row was translated.

**What export formats are supported?**
JSON, CSV, Excel, XML, and HTML — Apify's standard dataset export formats.

**Do I need a proxy or login?**
No login is required. A residential proxy is used by default and strongly recommended — TripAdvisor blocks datacenter IPs quickly.

# Actor input Schema

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

📌 Drop one or more of the following — mix & match freely:

🌐 **Direct URLs** — best results, fastest extraction
↳ e.g. `https://www.tripadvisor.com/Hotel_Review-g60763-d208453-Reviews-Hilton_New_York_Times_Square-New_York_City_New_York.html`

🏨 **Hotel names** — auto-resolved via Google Search
↳ e.g. `Hilton New York Times Square`

🔍 **Keywords** — broader matches, may pick the most relevant hotel
↳ e.g. `luxury hotel New York`

💡 **Tip:** Direct URLs always give the most accurate results.

## `reviewKeywords` (type: `array`):

🕵️ Words or short phrases to look for INSIDE the reviews — TripAdvisor's own review-search index does the matching, the actor does not grep every review itself. Each entry runs as its own site-side search (e.g. `"bed bugs"`, `"noisy"`, `"rude"`).

📊 TripAdvisor's own match count for each keyword comes back in `keywordMatchCounts` (capped at `>=1000` for very common words).

🧹 Leave this **empty** to turn keyword search off — the actor then behaves exactly like the base newest/oldest/relevant/rating feed.

⚠️ Matching is TripAdvisor's stemmed index, not a literal substring — see `matchedKeywords` in the output.

## `keywordSearchLanguages` (type: `array`):

🗺️ Which language(s) each keyword search runs in — as ISO codes (`en`, `es`, `id`, `pt`, ...). This matters more than it looks: TripAdvisor's TEXT search only matches reviews ORIGINALLY WRITTEN in the request's language — an English keyword never reaches a review written in Indonesian, even though TripAdvisor can machine-translate it into English elsewhere.

📈 The actor runs the full cross-product of Keywords × Languages and de-duplicates by review ID, so add the local word (e.g. "bau" for "smell") plus its language code to reach reviews an English-only sweep would miss.

💰 Cost note: more keywords × more languages = more requests. Default is English only.

## `keepOriginalReviewText` (type: `boolean`):

🗣️ When ON, `text` is exactly what the guest typed and `lang` is the language they really wrote in — no silent machine translation. When OFF, every review is machine-translated to English on TripAdvisor's side (reproduces the classic scraper behaviour).

🧾 Either way, the actor also exposes `originalLanguage`, `translationType` and `isMachineTranslated` so you always know which rows are translations.

## `maxComments` (type: `integer`):

🎯 How many reviews to extract from each hotel (or, when keyword search is on, how many unique keyword-matching reviews to return).

⚡ Small runs (1–100) → seconds
🚀 Large runs (1000+) → minutes
💎 Enterprise (up to 10,000) → fully supported

📥 The scraper auto-paginates — no need to click 'Next Page'.

## `sortOrder` (type: `string`):

🗂️ Choose the order reviews are fetched in (applies to the plain feed; keyword-search results are ordered by which sweep found them).

🆕 **newest** — most recent first (default)
📜 **oldest** — earliest reviews first
⭐ **relevant** — TripAdvisor's relevance ranking
🏆 **rating** — highest rating first

## `reviewsLanguages` (type: `string`):

🗣️ Pick which language to extract reviews in (the plain feed, not the keyword search — that has its own `keywordSearchLanguages` above).

🌐 Choose **All Languages** to keep every locale, or pick a specific language for a focused dataset.

## `reviewRatings` (type: `string`):

🎯 Choose which star ratings to extract — applied server-side via TripAdvisor's own RATING axis (cheaper) with a client-side safety check.

🌟 **All Ratings** — keep every review (default)
👍 **Positive** — combine 4 + 5 star reviews
👎 **Negative** — combine 1 + 2 star reviews
😐 **Average** — only 3 star reviews

Or pick a specific star count for a single-tier dataset.

## `travelerTypes` (type: `array`):

👥 Keep only reviews left by a given kind of guest (applied over the already-scraped `tripInfo.tripType` — TripAdvisor's own SEGMENT filter axis is silently broken server-side and does not actually filter). Leave empty to keep every traveler type (default).

💸 Cost note: a narrow filter combined with a high 'Max Reviews' may need to keep paging past the requested count to find enough survivors.

## `scrapeReviewerInfo` (type: `boolean`):

🪪 When enabled, each review row includes the full reviewer profile (name, username, location, avatar, contribution counts, profile link).

🔒 Disable for privacy-sensitive runs or when you only need review text + ratings — the `user` field becomes `null` in the output.

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

🔒 TripAdvisor is protected by **DataDome** anti-bot. Datacenter IPs get blocked within seconds — so this scraper defaults to **🏘️ Apify Residential Proxy** if you leave this blank.

✅ **Residential** (recommended) — bypasses DataDome reliably
⚠️ **Datacenter** — works briefly, then gets challenged
❌ **No proxy** — almost always blocked

🧠 The scraper uses sticky sessions automatically, so cookies stay valid across page → bundle → GraphQL calls.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.tripadvisor.com/Hotel_Review-g60763-d208453-Reviews-Hilton_New_York_Times_Square-New_York_City_New_York.html"
  ],
  "reviewKeywords": [
    "dirty",
    "noisy",
    "rude",
    "smell",
    "broken",
    "bed bugs"
  ],
  "keywordSearchLanguages": [
    "en"
  ],
  "keepOriginalReviewText": true,
  "maxComments": 10,
  "sortOrder": "newest",
  "reviewsLanguages": "English",
  "reviewRatings": "ALL_REVIEW_RATINGS",
  "travelerTypes": [],
  "scrapeReviewerInfo": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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": [
        "https://www.tripadvisor.com/Hotel_Review-g60763-d208453-Reviews-Hilton_New_York_Times_Square-New_York_City_New_York.html"
    ],
    "reviewKeywords": [
        "dirty",
        "noisy",
        "rude",
        "smell",
        "broken",
        "bed bugs"
    ],
    "keywordSearchLanguages": [
        "en"
    ],
    "reviewsLanguages": "English",
    "reviewRatings": "ALL_REVIEW_RATINGS",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapapi/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 = {
    "startUrls": ["https://www.tripadvisor.com/Hotel_Review-g60763-d208453-Reviews-Hilton_New_York_Times_Square-New_York_City_New_York.html"],
    "reviewKeywords": [
        "dirty",
        "noisy",
        "rude",
        "smell",
        "broken",
        "bed bugs",
    ],
    "keywordSearchLanguages": ["en"],
    "reviewsLanguages": "English",
    "reviewRatings": "ALL_REVIEW_RATINGS",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapapi/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 '{
  "startUrls": [
    "https://www.tripadvisor.com/Hotel_Review-g60763-d208453-Reviews-Hilton_New_York_Times_Square-New_York_City_New_York.html"
  ],
  "reviewKeywords": [
    "dirty",
    "noisy",
    "rude",
    "smell",
    "broken",
    "bed bugs"
  ],
  "keywordSearchLanguages": [
    "en"
  ],
  "reviewsLanguages": "English",
  "reviewRatings": "ALL_REVIEW_RATINGS",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scrapapi/tripadvisor-review-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapapi/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/vHPCdLoOGvDt8WUTE/builds/W7lqLhCn9LMkkax4T/openapi.json
