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

The TripAdvisor Review Scraper extracts detailed reviews from TripAdvisor. Input the URL of hotels or locations, click "Save & Start," and gain insights. Export data in JSON, CSV, and Excel for analysis. Ideal for travel planning, market research, and customer feedback. 🚀📊📝

- **URL**: https://apify.com/caprolok/tripadvisor-review-scraper.md
- **Developed by:** [Caprolok](https://apify.com/caprolok) (community)
- **Categories:** Lead generation, Travel
- **Security:** Full permissions
- **Stats:** 36 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

### 🌐 TripAdvisor Review Scraper

The TripAdvisor Review Scraper is a powerful tool designed to extract detailed reviews from TripAdvisor. Simply input the URL of the hotels or locations you're interested in, click the "Save & Start" button, and unleash the power of data-driven insights. This scraper provides comprehensive data to help you analyze reviews based on your unique requirements.

### 🚀 Introduction

The TripAdvisor Review Scraper is a custom web scraping solution designed to extract review data from TripAdvisor efficiently. With a user-friendly input schema, the scraper allows users to specify the URLs of the hotels or locations they are interested in. By configuring the scraper according to their needs, users can quickly gather essential information on various reviews available, empowering them to make informed decisions for their travel or business needs. Whether it's for personal use or market research, the TripAdvisor Review Scraper provides accurate, up-to-date data to help identify the best hotels and locations, exporting it in easily manageable formats like JSON, CSV, and Excel.

### 🛠 Features and Capabilities

Explore a comprehensive suite of features designed to offer deep insights into TripAdvisor reviews:

- 📝 **Detailed Review Data Extraction::** Captures a comprehensive set of review data, including review IDs, titles, texts, and details. Offers information about ratings, user profiles, and review dates.
- 🌐 **Structured and Validated Output::** Outputs data in a consistent JSON structure for easy consumption and integration into various workflows. Ensures the presence of essential information with the "required" property validation.
- ⭐ **Rating and Review Analytics::** Collects overall ratings and additional rating attributes such as cleanliness, service, and value, providing detailed insight into the quality of the hotel or location.
- 📍 **User and Location Details::** Supplies reviewer usernames, profile URLs, and avatar URLs, helping users understand the context of the reviews. Provides URLs to individual review pages, allowing easy navigation to source details.
- 📊 **Customizable Data Export::** Effortlessly export the gathered data in user-friendly formats like JSON, CSV, and Excel for further analysis or integration into your existing systems.

### 🎯 Ideal Use Cases

This tool is indispensable for various strategic applications:

- 🛒 **Travel Planning and Hotel Booking::** Travelers can identify suitable hotels based on ratings and reviews to match their specific requirements. Enables comparisons of hotels to find the best deals and quality.
- 🔍 **Market Research and Competitive Analysis::** Businesses can use the scraped data to understand market trends, hotel popularity, and service quality in different regions. Competitors can analyze hotel offerings to refine their marketing or service models.
- 📈 **Review Aggregation and Content Creation::** Aggregators and review sites can use the data to curate lists of recommended hotels for their audience. Bloggers or influencers focused on travel can generate content or recommendations based on review features.
- 🏢 **Customer Satisfaction and Feedback Analysis::** Businesses can analyze data to understand customer sentiments and improve their offerings. Hotels can assess feedback to enhance their services or facilities.
- 🛠 **Integration with Analytics Tools::** Companies can incorporate review data into their analytics platforms to derive insights or build predictive models for customer satisfaction.
- 📡 **Marketing and Lead Generation::** Marketing teams in the travel industry can identify potential hotels and tailor their outreach based on the extracted data. Lead generation teams can identify hotels that align with their services for targeted marketing campaigns.

### 📋 Getting Started

Kickstart your data extraction journey with these easy steps:

1. Open the TripAdvisor Review Scraper.
2. Enter the URL of the hotel or location you wish to analyze.
3. Click "Save & Start" to begin the extraction process.
4. After completion, download your data in your chosen format and dive into analysis.

### 🌟 Elevate Your Data Collection

Embrace the TripAdvisor Review Scraper to transform your review analysis and travel planning endeavors. Start leveraging comprehensive insights from TripAdvisor reviews to enhance your projects, strategies, and decision-making.

# Actor input Schema

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

Insert a URL of a valid Trip Advisor.

## `max_results` (type: `integer`):

Select the number of trip advisor review pages you want to scrape.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.tripadvisor.in/Hotel_Review-g34420-d209411-Reviews-or20-JW_Marriott_Marco_Island_Beach_Resort-Marco_Island_Florida.html"
    }
  ],
  "max_results": 100
}
```

# 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": [
        {
            "url": "https://www.tripadvisor.in/Hotel_Review-g34420-d209411-Reviews-or20-JW_Marriott_Marco_Island_Beach_Resort-Marco_Island_Florida.html"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("caprolok/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": [{ "url": "https://www.tripadvisor.in/Hotel_Review-g34420-d209411-Reviews-or20-JW_Marriott_Marco_Island_Beach_Resort-Marco_Island_Florida.html" }] }

# Run the Actor and wait for it to finish
run = client.actor("caprolok/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": [
    {
      "url": "https://www.tripadvisor.in/Hotel_Review-g34420-d209411-Reviews-or20-JW_Marriott_Marco_Island_Beach_Resort-Marco_Island_Florida.html"
    }
  ]
}' |
apify call caprolok/tripadvisor-review-scraper --silent --output-dataset

```

## MCP server setup

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