# Tripadvisor Scraper — Hotels, Restaurants & Reviews API (`nexgendata/tripadvisor-scraper`) Actor

Scrape TripAdvisor for hotel reviews, restaurant ratings, attraction data, and traveler photos. Extract pricing, availability, and sentiment data for hospitality market intelligence.

- **URL**: https://apify.com/nexgendata/tripadvisor-scraper.md
- **Developed by:** [NexGenData](https://apify.com/nexgendata) (community)
- **Categories:** Travel, Real estate
- **Stats:** 22 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 listing records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Scraper — Hotels, Restaurants & Attractions

Search Tripadvisor and get structured listing rows — name, rating, review count, price range,
category, location and the listing URL.

> Public marketplace data, assembled for competitive research.

### 📊 What you get

One record per listing. Fields returned:

| Field | Description |
|---|---|
| `name` | Listing name |
| `url` | Tripadvisor listing URL |
| `category` | Hotel / Restaurant / Attraction (or the schema.org type when structured data is available) |
| `rating` | Average rating, when published on the results page |
| `reviewCount` | Number of reviews, when published on the results page |
| `priceRange` | Price band, when published in the listing's structured data |
| `location` | Location line from the result card, when present |
| `searchQuery` | The query that produced the row |

Fields are populated on a best-effort basis from what the results page publishes — `rating`,
`reviewCount`, `priceRange` and `location` come back empty when Tripadvisor does not show them for a
given listing. This actor does not return addresses, coordinates, rankings or review text.

### ▶️ Example input

```json
{
  "searchQuery": "hotels new york",
  "maxResults": 5
}
```

`searchQuery` is required. Put the listing type in the query itself ("restaurants paris",
"attractions rome").

### ⏰ Schedule it

Schedule a daily sweep (`0 7 * * *`) to track listings and ratings over time.

### 🛡️ Reliability

Tripadvisor uses aggressive anti-bot protection. Every run loads the page through an Apify
**residential** session and retries with a fresh session up to three times. If Tripadvisor serves a
bot check instead of results, the run **fails with an explanatory message and delivers no rows** —
you are never charged for a challenge page, and a failed run never lands an error row in your
dataset.

### 💵 Pricing

Pay-per-event:

- **$0.020 per listing** delivered to the dataset — about **50 listings per $1**.
- **$0.005 per actor-start GB-event** — one-time per run.

You pay for delivered listings only. Blocked runs and no-match runs deliver no rows and charge no
result events.

### 🤖 Use with AI agents

Point Claude, the OpenAI Agents SDK, an n8n flow or any MCP-aware client at it and pull data on
demand.

**Agentic payments (x402):** supports agentic payment via x402 — agents can call this actor with
USDC, no API key required.

### 🔗 Related actors

**Travel data family:** [Airbnb](https://apify.com/nexgendata/airbnb-scraper) ·
[Booking.com](https://apify.com/nexgendata/booking-com-scraper) ·
[Travel MCP](https://apify.com/nexgendata/travel-mcp-server)

***

*Public web data, assembled for research and monitoring.*

# Actor input Schema

## `searchQuery` (type: `string`):

Destination and listing type to search, e.g. 'hotels new york', 'restaurants paris', 'attractions rome'. Required — the run returns 0 rows and charges nothing if it is left empty.

## `searchType` (type: `string`):

Optional label. TripAdvisor's search page is not filtered by this value — put the listing type in the search query itself (e.g. 'restaurants paris'). Kept for backwards compatibility with existing runs and integrations.

## `maxResults` (type: `integer`):

Maximum number of listings to return (1-100). Each listing is one dataset row and one billable result event.

## Actor input object example

```json
{
  "searchQuery": "hotels new york",
  "maxResults": 5
}
```

# 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 = {
    "searchQuery": "hotels new york",
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/tripadvisor-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 = {
    "searchQuery": "hotels new york",
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/tripadvisor-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 '{
  "searchQuery": "hotels new york",
  "maxResults": 5
}' |
apify call nexgendata/tripadvisor-scraper --silent --output-dataset

```

## MCP server setup

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