# TripAdvisor Scraper — Restaurants, Hotels & Reviews (`logiover/tripadvisor-scraper`) Actor

Unofficial TripAdvisor API — no key, no login. Scrape restaurants, hotels, attractions and reviews by city, geoId or URL. Export ratings, prices, cuisine, address, coordinates, amenities and review text to JSON, CSV or Excel.

- **URL**: https://apify.com/logiover/tripadvisor-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Travel, E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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/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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## TripAdvisor Scraper — Restaurants, Hotels, Attractions & Reviews API

Scrape **TripAdvisor** at scale without an API key, without logging in, and without maintaining a headless browser. Pull thousands of **restaurants, hotels and attractions** for any city, extract full **ratings, prices, cuisine, amenities, addresses, phone numbers and GPS coordinates**, and download **user reviews** in bulk — then export everything to JSON, CSV, Excel or Google Sheets.

This is the fast, structured **TripAdvisor API alternative** you reach for when the official Content API is too limited, too slow to get approved, or simply does not expose the fields you need.

### What does TripAdvisor Scraper do?

TripAdvisor Scraper turns any TripAdvisor location into clean, tabular data. Give it a **city name** (e.g. `New York City`), a **geoId** (e.g. `g60763`) or a **TripAdvisor URL**, pick a mode, and it paginates through the listings for you. Under the hood it reads TripAdvisor's own embedded structured data (schema.org **JSON-LD** blocks such as `ItemList`, `Restaurant` and `LodgingBusiness`) plus the public location autocomplete endpoint, so the output is accurate and matches what you see on the site.

Requests are sent with a realistic Chrome fingerprint over Apify **residential proxies**, rotating a fresh IP on every retry, which keeps the scraper flowing past TripAdvisor's Cloudflare protection. There is **no API key, no login and no cookie** to manage — you paste a place and press start. Because it walks real pagination (30 places or 10 reviews per page), a single run can save hundreds to tens of thousands of rows.

### Who is it for?

- **Market researchers & analysts** benchmarking hospitality, dining and tourism across cities or countries.
- **Data & ML teams** building recommendation engines, price models, sentiment datasets or POI databases.
- **Hotel, restaurant & travel brands** monitoring their own and competitors' ratings, reviews and rankings.
- **Lead-generation & sales teams** collecting business names, phone numbers, websites and addresses of venues in a target area.
- **Travel-tech, agencies & content creators** who need up-to-date destination data (top restaurants, must-see attractions, best hotels) to power apps, guides and dashboards.

### Use cases

- **Restaurant intelligence** — export every restaurant in a city with cuisine type, price band, rating, review count and coordinates to map the local dining scene.
- **Hotel competitor tracking** — pull all hotels in a destination with star-equivalent price levels, amenities and review volume, and re-run on a schedule to watch changes.
- **Review mining & sentiment** — download thousands of reviews for a specific hotel or attraction (title, full text, star rating, trip type, date, helpful votes, owner responses) for NLP and reputation analysis.
- **Attractions & itinerary building** — grab the top things to do for any city, ranked, with ratings and categories, to seed a travel app or content site.
- **Local business lead lists** — turn "coffee shops in Rome" or "hotels in Bali" into a spreadsheet of names, phones, websites and addresses for outreach.

### Why use TripAdvisor Scraper?

- **Keyless & login-free** — no TripAdvisor developer account, no OAuth, no cookies. Just a location and go.
- **35+ rich fields** — ratings and review counts as real numbers, prices, cuisine, dietary/amenity lists, GPS coordinates, phone, website, opening hours, ranking position and more.
- **Bulk pagination** — thousands of POIs per city and thousands of reviews per venue in one run, bounded by a simple `maxResults`.
- **Six modes in one actor** — restaurants, hotels, attractions, location search, reviews and batch details, all sharing one clean input.
- **Flexible targeting** — accept a plain city name (auto-resolved via TripAdvisor autocomplete), a geoId, or any TripAdvisor URL you already have.
- **Export anywhere** — results land in an Apify dataset you can download as JSON, CSV, Excel or feed straight into Google Sheets, Zapier, Make, or your own code via API.

### What data can you extract?

Each mode emits flat rows tagged with a `_mode` field so you can mix runs in one dataset and pivot on it. Points of interest (restaurants / hotels / attractions / details) share the POI fields below; reviews and locations have their own shapes.

#### Point-of-interest fields (restaurants, hotels, attractions, details)

| Field | Type | Description |
|---|---|---|
| `locationId` | string | TripAdvisor POI id (the digits after `-d` in a URL). |
| `name` | string | Venue name. |
| `type` | string | `RESTAURANT`, `HOTEL` or `ATTRACTION`. |
| `rating` | number | Average TripAdvisor bubble rating (e.g. `4.8`). |
| `numReviews` | number | Total number of reviews. |
| `priceLevel` | number | Price band as a number (count of `$`, 1–4). |
| `priceRange` | string | Raw price string (e.g. `$$ - $$$`). |
| `cuisine` | array | Cuisine tags (restaurants), e.g. `["Italian","Sicilian"]`. |
| `amenities` | array | Amenity list (hotels), e.g. `["Free WiFi","Pool"]`. |
| `rankingPosition` | number | Position within its city category (e.g. `1`). |
| `rankingString` | string | Full ranking text, e.g. `#1 of 13,663 Restaurants in New York City`. |
| `category` | string | Detected category (from the ranking line). |
| `address` / `addressStreet` | string | Street address. |
| `city` | string | City / locality. |
| `region` | string | State / region. |
| `country` | string | Country. |
| `postalCode` | string | Postal / ZIP code. |
| `latitude` | number | GPS latitude. |
| `longitude` | number | GPS longitude. |
| `phone` | string | Phone number. |
| `website` | string | Official website (when listed). |
| `email` | string | Contact email (details mode, when present). |
| `photoUrl` | string | Primary photo URL. |
| `photoCount` | number | Number of photos (details mode). |
| `acceptsReservations` | bool | Whether reservations are accepted (restaurants). |
| `travelerChoice` | bool | Travelers' Choice award flag. |
| `awards` | array | Award labels (details mode). |
| `hours` | array | Opening hours (`day`, `opens`, `closes`). |
| `menuUrl` | string | External menu link (restaurants). |
| `url` | string | Canonical TripAdvisor URL. |
| `scrapedAt` | string | ISO timestamp of the scrape. |

#### Review fields (reviews mode)

| Field | Type | Description |
|---|---|---|
| `reviewId` | string | TripAdvisor review id (e.g. `r1068526713`). |
| `locationName` | string | The venue the review belongs to. |
| `rating` | number | Reviewer's star rating (1–5). |
| `title` | string | Review title. |
| `text` | string | Full review body. |
| `publishedDate` | string | When the review was written. |
| `stayDate` | string | Date of stay / experience. |
| `tripType` | string | Business / Couples / Family / Friends / Solo. |
| `username` | string | Reviewer's profile handle. |
| `userContributions` | number | Reviewer's total contributions. |
| `helpfulVotes` | number | Helpful votes on the review. |
| `ownerResponse` | string | Business owner's reply (when present). |
| `url` | string | Direct link to the review. |

#### Location fields (search mode)

| Field | Type | Description |
|---|---|---|
| `name` | string | Full location name (e.g. `Paris, Ile-de-France, France`). |
| `geoId` | string | TripAdvisor geo id used by the list modes. |
| `type` | string | `GEO`, `LOCATION`, etc. |
| `parentName` | string | Parent region / country. |
| `latitude` / `longitude` | number | Location coordinates. |
| `restaurantsUrl` / `hotelsUrl` / `attractionsUrl` | string | Ready-made list URLs for that location. |
| `url` | string | Primary TripAdvisor URL. |

#### Real output example (restaurants)

```json
{
  "_mode": "restaurants",
  "geoId": "60763",
  "locationId": "12425739",
  "name": "Piccola Cucina Estiatorio",
  "type": "RESTAURANT",
  "rating": 4.8,
  "numReviews": 1260,
  "priceLevel": 5,
  "priceRange": "$$ - $$$",
  "cuisine": ["Italian", "Sicilian"],
  "address": "75 Thompson St, New York City, NY 10012-4345",
  "city": "New York City",
  "country": "United States",
  "postalCode": "10012-4345",
  "latitude": 40.724686,
  "longitude": -74.00318,
  "phone": "+1 646-781-9183",
  "photoUrl": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/2f/c1/dc/f9/let-s-eat-insieme.jpg",
  "acceptsReservations": true,
  "rankingPosition": 1,
  "url": "https://www.tripadvisor.com/Restaurant_Review-g60763-d12425739-Reviews-Piccola_Cucina_Estiatorio-New_York_City_New_York.html",
  "scrapedAt": "2026-07-23T08:07:35.784Z"
}
````

### How to use

#### Option A — by location name (easiest)

1. Set **Mode** to `restaurants`, `hotels` or `attractions`.
2. Put a city or place in **Location or search query** — e.g. `Barcelona`. The actor resolves it to a geoId automatically.
3. Set **Max results** (e.g. `500`).
4. Run. Results stream into the dataset as they are scraped.

```json
{
  "mode": "restaurants",
  "query": "New York City",
  "maxResults": 600
}
```

#### Option B — by URL or ID

Already have a TripAdvisor page open? Paste its URL and skip resolution.

- **List a location** — paste a list URL into **TripAdvisor URL**:

```json
{
  "mode": "hotels",
  "url": "https://www.tripadvisor.com/Hotels-g187791-Rome_Lazio-Hotels.html",
  "maxResults": 300
}
```

- **Reviews for one venue** — paste a detail URL (or a `d…` id):

```json
{
  "mode": "reviews",
  "url": "https://www.tripadvisor.com/Hotel_Review-g60763-d93589-Reviews-The_Michelangelo_New_York-New_York_City_New_York.html",
  "maxResults": 1000
}
```

- **Batch details** — fetch full info for many venues at once:

```json
{
  "mode": "details",
  "locationIds": [
    "https://www.tripadvisor.com/Restaurant_Review-g60763-d12425739-Reviews-Piccola_Cucina_Estiatorio-New_York_City_New_York.html",
    "d93589"
  ]
}
```

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `restaurants` | `restaurants`, `hotels`, `attractions`, `search`, `reviews` or `details`. |
| `query` | string | `New York City` | Location name or free-text search (also accepts a numeric geoId). |
| `locationId` | string | — | Geo id (`g60763`) for lists, or POI id (`d93589`) for reviews/details. |
| `url` | string | — | A full TripAdvisor list or detail URL. Highest priority. |
| `locationIds` | array | `[]` | Batch of POI ids / detail URLs for `details` mode. |
| `maxResults` | integer | `200` | Upper bound on rows; drives pagination. |
| `language` | select | `en-US` | Content locale (affects language and localized names/prices). |
| `proxyConfiguration` | object | RESIDENTIAL | Apify proxy config. Residential is default and recommended. |

Full input example:

```json
{
  "mode": "attractions",
  "query": "London",
  "maxResults": 500,
  "language": "en-US",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Output example (reviews)

```json
{
  "_mode": "reviews",
  "locationId": "93589",
  "locationName": "The Michelangelo New York",
  "reviewId": "r1068526713",
  "rating": 5,
  "title": "Great suite & staff",
  "text": "We stayed in a Grand Suite for our wedding trip to NYC last week. The staff were all very friendly, welcoming and accommodating...",
  "publishedDate": "July 15, 2026",
  "tripType": "Couples",
  "username": "explorer_48512",
  "userContributions": 12,
  "helpfulVotes": 3,
  "url": "https://www.tripadvisor.com/ShowUserReviews-g60763-d93589-r1068526713-The_Michelangelo_New_York-New_York_City_New_York.html",
  "scrapedAt": "2026-07-23T08:20:10.101Z"
}
```

### Tips for best results

- **Use a big city for high volume.** New York, London, Paris, Rome, Bangkok and Tokyo each have thousands of restaurants and attractions — perfect for a 500–5,000 row export.
- **Resolve first if unsure.** Run `search` on your place name to grab the exact `geoId`, then feed it to the list modes for precise targeting (helpful when a name is ambiguous, e.g. "Paris, Texas" vs "Paris, France").
- **Keep RESIDENTIAL proxy on.** TripAdvisor is behind Cloudflare; datacenter IPs are usually blocked. The default residential config is what keeps runs green.
- **Reviews scale by page.** Each review page adds ~10 reviews. Set `maxResults` to how many you actually need — 100 reviews ≈ 10 requests.
- **Batch details are parallelized.** Paste many `d…` ids or detail URLs in `locationIds` to enrich a whole list in one run.
- **Paste URLs to skip guessing.** If you already browsed to the right list or detail page, the URL is the most reliable target.
- **Numbers are numbers.** `rating`, `numReviews`, `latitude`, `longitude`, `helpfulVotes` etc. arrive typed, so you can sort and aggregate immediately in Sheets or pandas.
- **Schedule it.** Ratings, review counts and rankings move — use Apify Schedules to re-run daily/weekly and diff the results.
- **Localize.** Set `language` to pull reviews and names in a specific locale.
- **Mind the time budget.** Very large single runs stop paginating after a few minutes and save what they have; split enormous jobs across multiple runs or raise the run timeout.

### Integrations

Send TripAdvisor data wherever you work. From the Apify platform you can:

- Push results to **Google Sheets**, **Airtable** or a database.
- Trigger **Slack**, **email** or **webhook** notifications when a run finishes.
- Wire it into **Zapier** or **Make** for no-code automations.
- **Schedule** recurring runs and keep a fresh dataset.
- Chain it into larger pipelines with the Apify API and integrations.

### API usage

Run the actor programmatically with the Apify API or clients.

**cURL**

```bash
curl -X POST "https://api.apify.com/v2/acts/logiover~tripadvisor-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"restaurants","query":"New York City","maxResults":600}'
```

**Node.js**

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

const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('logiover/tripadvisor-scraper').call({
    mode: 'reviews',
    url: 'https://www.tripadvisor.com/Hotel_Review-g60763-d93589-Reviews-The_Michelangelo_New_York-New_York_City_New_York.html',
    maxResults: 1000,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("logiover/tripadvisor-scraper").call(run_input={
    "mode": "hotels",
    "query": "Rome",
    "maxResults": 500,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["name"], item.get("rating"), item.get("numReviews"))
```

### Use with AI agents (MCP)

This actor works great as a tool for LLM agents via the Apify MCP server. Expose it to your assistant and ask in plain language — for example: *"Get the 50 best-rated restaurants in Lisbon with their price range and coordinates, then the 200 most recent reviews for the top hotel."* The agent fills the input, runs the actor and reads the structured dataset back, so it can reason over real TripAdvisor data instead of guessing.

### FAQ

#### Do I need a TripAdvisor API key or account?

No. TripAdvisor Scraper is completely keyless and login-free. You never supply credentials, cookies or an API token — just a location, id or URL.

#### Which locations and countries are supported?

Any location TripAdvisor covers worldwide. Enter a city or place name in almost any market and the actor resolves it to the right geoId, or paste a TripAdvisor URL from any country.

#### How many results can I get in one run?

Large cities have thousands of restaurants and attractions, and popular hotels have thousands of reviews. A single run can comfortably return hundreds to tens of thousands of rows — you cap it with `maxResults`.

#### How do I get reviews for a specific hotel or restaurant?

Use `reviews` mode and paste the venue's detail URL (or its `d…` id). The actor paginates through the review pages and returns title, full text, star rating, trip type, dates, helpful votes and owner responses.

#### What is a geoId and where do I find it?

A geoId is TripAdvisor's location identifier — the number after `-g` in a URL (e.g. `g60763` for New York City). You usually don't need it: type the city name and the actor resolves it. To get it explicitly, run `search`.

#### Why do some fields come back empty?

TripAdvisor doesn't publish every field for every venue (a small café may have no website, a hotel may hide its phone). Empty means "not listed", not an error. The list modes populate the core fields (name, rating, reviews, price, address, coordinates); `details` mode adds ranking, awards and photo counts.

#### Can I export to CSV, Excel or Google Sheets?

Yes. Every run writes to an Apify dataset you can download as JSON, CSV, XLSX or HTML, or push directly to Google Sheets and other integrations.

#### Is the data real-time?

Each run scrapes TripAdvisor live at that moment, so it reflects current ratings, prices and reviews. Schedule the actor to keep a dataset continuously up to date.

#### Does it work behind Cloudflare?

Yes. Requests use a realistic browser fingerprint over Apify residential proxies with a fresh IP per retry, which is what reliably gets past TripAdvisor's bot protection. Keep the residential proxy setting enabled.

#### Why did I get fewer rows than `maxResults`?

Either the location genuinely has fewer listings than you asked for, or a very large run hit the internal time budget and saved what it had. Split big jobs into multiple runs, or increase the run's memory and timeout.

#### How is the scraping done technically?

The actor reads TripAdvisor's own embedded structured data (schema.org JSON-LD such as `ItemList`, `Restaurant` and `LodgingBusiness`) and the public location autocomplete endpoint, then paginates the listing/review pages. No headless browser is needed, which keeps runs fast and cheap.

#### Can I use it with automation and AI tools?

Absolutely — call it from the API, schedule it, connect it to Zapier/Make/Sheets, or plug it into an AI agent through the Apify MCP server.

### Is it legal?

This scraper collects **publicly available information** that TripAdvisor serves to any visitor — the same listings, ratings and reviews you can see in a browser. Public-data scraping is broadly lawful, but you are responsible for how you use it. Review TripAdvisor's Terms of Service, respect copyright in review text and photos, and handle any personal data (such as reviewer names) in line with applicable privacy laws like GDPR and CCPA. Do not use the data to spam, harass or re-identify individuals. For commercial redistribution of large datasets, consider TripAdvisor's official Content API and take independent legal advice. This tool is provided for legitimate research, analytics and business-intelligence purposes.

### Related scrapers

- **Google Maps / Places scrapers** — cross-reference venues with Google ratings, reviews and popular times.
- **Booking & hotel-price scrapers** — combine TripAdvisor ratings with live room rates.
- **Yelp scraper** — a second review source for restaurants and local businesses.
- **IMDb Scraper** — another keyless, JSON-first data API by the same author for the film and TV world.

# Actor input Schema

## `mode` (type: `string`):

Which TripAdvisor dataset to scrape.

• **restaurants** — list restaurants for a location (paginated, 30/page → thousands in a big city)
• **hotels** — list hotels for a location
• **attractions** — things to do / points of interest for a location
• **search** — resolve a free-text place or POI name into matching TripAdvisor locations (with geoIds)
• **reviews** — user reviews for a single hotel / restaurant / attraction (paginated, high volume)
• **details** — full details for one or more locations (batch), by locationId or detail URL

## `query` (type: `string`):

A city, region or place name — e.g. `New York City`, `Paris`, `Rome`. Used by **restaurants / hotels / attractions** (resolved to a geoId automatically) and by **search**. You can also paste a numeric geoId (e.g. `60763`) here.

## `locationId` (type: `string`):

A TripAdvisor id. For list modes use a geo id like `g60763` (or just `60763`). For **reviews** / **details** use a POI id like `d93589`. The digits after `-g`/`-d` in any TripAdvisor URL.

## `url` (type: `string`):

A full TripAdvisor URL. For **restaurants/hotels/attractions** paste a list URL (e.g. `.../Restaurants-g60763-New_York_City...html`). For **reviews/details** paste a detail URL (e.g. `.../Hotel_Review-g60763-d93589-Reviews-...html`). Takes priority over query / locationId.

## `locationIds` (type: `array`):

A list of TripAdvisor POI ids (`d…`) or full detail URLs for batch **details**. One per line.

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

Upper bound on rows returned. For list & reviews modes this drives pagination (each page adds ~30 POIs or ~10 reviews); for search it caps the number of matched locations. Use 500+ for a big export.

## `language` (type: `string`):

Content locale used for TripAdvisor pages (affects review language, localized names and prices).

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

TripAdvisor is protected by Cloudflare — RESIDENTIAL proxy is strongly recommended and is the default. You may override the group here, but datacenter IPs will usually be blocked.

## Actor input object example

```json
{
  "mode": "restaurants",
  "query": "New York City",
  "locationId": "d93589",
  "url": "https://www.tripadvisor.com/Hotel_Review-g60763-d93589-Reviews-The_Michelangelo_New_York-New_York_City_New_York.html",
  "locationIds": [],
  "maxResults": 300,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Full results dataset. Use the Places views for list/detail modes, Reviews for review runs, and Locations for search runs.

# 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 = {
    "mode": "restaurants",
    "query": "New York City",
    "locationIds": [],
    "maxResults": 300,
    "language": "en-US",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/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 = {
    "mode": "restaurants",
    "query": "New York City",
    "locationIds": [],
    "maxResults": 300,
    "language": "en-US",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/tripadvisor-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 '{
  "mode": "restaurants",
  "query": "New York City",
  "locationIds": [],
  "maxResults": 300,
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call logiover/tripadvisor-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TripAdvisor Scraper — Restaurants, Hotels & Reviews",
        "description": "Unofficial TripAdvisor API — no key, no login. Scrape restaurants, hotels, attractions and reviews by city, geoId or URL. Export ratings, prices, cuisine, address, coordinates, amenities and review text to JSON, CSV or Excel.",
        "version": "1.0",
        "x-build-id": "lheCay4rthCLs5Tme"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~tripadvisor-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-tripadvisor-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/logiover~tripadvisor-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-tripadvisor-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/logiover~tripadvisor-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-tripadvisor-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",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "restaurants",
                            "hotels",
                            "attractions",
                            "search",
                            "reviews",
                            "details"
                        ],
                        "type": "string",
                        "description": "Which TripAdvisor dataset to scrape.\n\n• **restaurants** — list restaurants for a location (paginated, 30/page → thousands in a big city)\n• **hotels** — list hotels for a location\n• **attractions** — things to do / points of interest for a location\n• **search** — resolve a free-text place or POI name into matching TripAdvisor locations (with geoIds)\n• **reviews** — user reviews for a single hotel / restaurant / attraction (paginated, high volume)\n• **details** — full details for one or more locations (batch), by locationId or detail URL",
                        "default": "restaurants"
                    },
                    "query": {
                        "title": "Location or search query",
                        "type": "string",
                        "description": "A city, region or place name — e.g. `New York City`, `Paris`, `Rome`. Used by **restaurants / hotels / attractions** (resolved to a geoId automatically) and by **search**. You can also paste a numeric geoId (e.g. `60763`) here."
                    },
                    "locationId": {
                        "title": "Location ID",
                        "type": "string",
                        "description": "A TripAdvisor id. For list modes use a geo id like `g60763` (or just `60763`). For **reviews** / **details** use a POI id like `d93589`. The digits after `-g`/`-d` in any TripAdvisor URL."
                    },
                    "url": {
                        "title": "TripAdvisor URL",
                        "type": "string",
                        "description": "A full TripAdvisor URL. For **restaurants/hotels/attractions** paste a list URL (e.g. `.../Restaurants-g60763-New_York_City...html`). For **reviews/details** paste a detail URL (e.g. `.../Hotel_Review-g60763-d93589-Reviews-...html`). Takes priority over query / locationId."
                    },
                    "locationIds": {
                        "title": "Location IDs (batch, details)",
                        "type": "array",
                        "description": "A list of TripAdvisor POI ids (`d…`) or full detail URLs for batch **details**. One per line.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Upper bound on rows returned. For list & reviews modes this drives pagination (each page adds ~30 POIs or ~10 reviews); for search it caps the number of matched locations. Use 500+ for a big export.",
                        "default": 200
                    },
                    "language": {
                        "title": "Language / locale",
                        "enum": [
                            "en-US",
                            "en-GB",
                            "de-DE",
                            "fr-FR",
                            "es-ES",
                            "es-MX",
                            "it-IT",
                            "pt-BR",
                            "pt-PT",
                            "nl-NL",
                            "sv-SE",
                            "da-DK",
                            "pl-PL",
                            "tr-TR",
                            "ru-RU",
                            "el-GR",
                            "ja-JP",
                            "ko-KR",
                            "zh-CN",
                            "th-TH",
                            "id-ID",
                            "ar-AE"
                        ],
                        "type": "string",
                        "description": "Content locale used for TripAdvisor pages (affects review language, localized names and prices).",
                        "default": "en-US"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "TripAdvisor is protected by Cloudflare — RESIDENTIAL proxy is strongly recommended and is the default. You may override the group here, but datacenter IPs will usually be blocked.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
