# 🦉 Tripadvisor Reviews Extractor (`jupri/tripadvisor-reviews`) Actor

💫 Scrape 📝 Reviews from Tripadvisor.com

- **URL**: https://apify.com/jupri/tripadvisor-reviews.md
- **Developed by:** [cat](https://apify.com/jupri) (community)
- **Categories:** Travel
- **Stats:** 37 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 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.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 💫 Welcome to TripAdvisor Reviews Scraper

<img src="https://static5.depositphotos.com/1001046/514/v/450/depositphotos_5148743-stock-illustration-outline-illustration-of-sitting-cat.jpg" width="260">

### 🦉 About Tripadvisor.com

<img align="right" width="30%" src="https://apify-uploads-prod.s3.us-east-1.amazonaws.com/sTEmmw6b7t7WJuMwe-issue-KtNRoQ9Q4B6viShNF-tm9ECNs1qO-tripadvidor-cat-logo.jpg">

**Tripadvisor, Inc.**  is an American company that operates online  [travel agencies](https://en.wikipedia.org/wiki/Travel_agency "Travel agency"),  [comparison shopping websites](https://en.wikipedia.org/wiki/Comparison_shopping_website "Comparison shopping website"), and  [mobile apps](https://en.wikipedia.org/wiki/Mobile_app "Mobile app")  with  [user-generated content](https://en.wikipedia.org/wiki/User-generated_content "User-generated content").[\[1\]](https://en.wikipedia.org/wiki/Tripadvisor#cite_note-10K-1)

Its namesake brand, Tripadvisor.com, operates in 40 countries and 20 languages, and features approximately 1 billion reviews and opinions on roughly 8 million establishments.[\[1\]](https://en.wikipedia.org/wiki/Tripadvisor#cite_note-10K-1)  The company's other brands include Bokun.io,  [Cruise Critic](https://en.wikipedia.org/wiki/Cruise_Critic "Cruise Critic"),  [FlipKey](https://en.wikipedia.org/wiki/FlipKey "FlipKey"),  [TheFork](https://en.wikipedia.org/wiki/TheFork "TheFork"), Holiday Lettings, Housetrip, Jetsetter, Singleplatform,[Niumba](https://en.wikipedia.org/wiki/Niumba "Niumba"),  [SeatGuru](https://en.wikipedia.org/wiki/SeatGuru "SeatGuru"), and Viator.[\[1\]](https://en.wikipedia.org/wiki/Tripadvisor#cite_note-10K-1)  The company is headquartered in  [Needham, Massachusetts](https://en.wikipedia.org/wiki/Needham,_Massachusetts "Needham, Massachusetts").

### 🦉About This Actor

**All-in-One TripAdvisor Reviews Scraper**

- 📝 Reviews
- ❓ F.A.Q's
- 💡 Tips
- 🖼️ Photos

### 🦉Tutorials

#### About `Location-ID`

Every place in TripAdvisor Universe have a unique identifier associated with specific locations. This identifier helps TripAdvisor organize and retrieve information about different destinations efficiently. It allows users to find accurate and relevant information about specific places, hotels, restaurants, or attractions.

When you browse different pages on TripAdvisor, you may notice that the **URLs** contain identifiers for locations. These identifiers are not explicitly labeled as "location-IDs," but they serve a similar purpose. For example:

`https://www.tripadvisor.com/Hotel_Review-g187147-d497189-Reviews-Hotel_du_Triangle_d_Or-Paris_Ile_de_France.html`

An URL for a hotel in Paris might include "g187147" and "d497189" in the address, where "g" likely stands for `geographical` and "187147" represents the `location-ID` or code for `Paris` and "497189" represent `location-ID / Hotel-ID` for the Hotel.

### ✏️ Support

⚡️ Feel free to [reach out](https://console.apify.com/actors/cghS3ZQ9NXZfaqB3t/issues) to the developer for any [issues](https://console.apify.com/actors/cghS3ZQ9NXZfaqB3t/issues) or suggestions for improvement.

<img src="https://apify-uploads-prod.s3.us-east-1.amazonaws.com/5SxZhwYwpknFk8ek9-cat.gif" width="240">

# Actor input Schema

## `query` (type: `array`):

💡 Where to?

## `resource` (type: `string`):

💡 Reviews Type

## `portal` (type: `string`):

No description

## `limit` (type: `integer`):

💡 Number of results

## `filters:search` (type: `string`):

No description

## `filters:sort` (type: `string`):

No description

## `filters:rating` (type: `array`):

No description

## `filters:month` (type: `array`):

No description

## `filters:segment` (type: `array`):

No description

## `filters:language` (type: `array`):

No description

## `dev_proxy_config` (type: `object`):

<b>Supported protocol:</b><br><br><b>HTTP(S), SOCKS5</b><br><code>{http|socks5}://{user:pass}@{hostname|ip-address}:port</code><br><br><b>\<a href=https://scrapeops.io/app/register/main target=\_blank>ScrapeOps.IO</a></b><br><code>scrapeops://{api-key}</code><br><br><b>Example</b>: <code>socks5://example.com:9000</code>

## `dev_custom_headers` (type: `array`):

💡 Additional HTTP Headers

## `dev_custom_cookies` (type: `array`):

💡 Additional HTTP Cookies

## `dev_no_strip` (type: `boolean`):

💡 Keep/Save empty values <i><code>(NULL, FALSE, empty ARRAY, empty OBJECT, empty STRING)</code></i>

## `dev_transform_enable` (type: `boolean`):

No description

## `dev_transform_fields` (type: `array`):

No description

## `dev_dataset_enable` (type: `boolean`):

No description

## `dev_dataset_clear` (type: `boolean`):

Clear Dataset before insert/update.

## `dev_dataset_name` (type: `string`):

💡 <b>Use mask to customize dataset name</b><br><br><code>{ACTOR} = actor name<br>{DATE} = date (YYYYMMDD)<br>{TIME} = time (HHMMSS)</code><br><br>This masks can be used to autogenerate Dataset Name.<br><br>example: <i><code>data-{DATE}</code></i><br>Depending on today date the dataset name will be: <code>data-20230603</code><i><br><br>default: <code>data-{ACTOR}-{DATE}-{TIME}</code></i>

## Actor input object example

```json
{
  "query": [
    "New York City"
  ],
  "limit": 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 = {
    "query": [
        "New York City"
    ],
    "limit": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("jupri/tripadvisor-reviews").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 = {
    "query": ["New York City"],
    "limit": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("jupri/tripadvisor-reviews").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 '{
  "query": [
    "New York City"
  ],
  "limit": 5
}' |
apify call jupri/tripadvisor-reviews --silent --output-dataset

```

## MCP server setup

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

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/cghS3ZQ9NXZfaqB3t/builds/0zbDvWbgoVSqun5qD/openapi.json
