# Tripadvisor Hotels Extractor (`kawsar/tripadvisor-hotels-extractor`) Actor

Tripadvisor hotels scraper that pulls hotel names, ratings, review counts, prices, and locations from any destination page, so you can run price tracking, market research, and travel SEO without copying anything by hand.

- **URL**: https://apify.com/kawsar/tripadvisor-hotels-extractor.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Stats:** 2 total users, 1 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. 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/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 Hotels Extractor

Turn any hotel search or Tripadvisor link into a clean, structured dataset. Give the actor a list of search terms or Tripadvisor URLs, and it returns the matching hotels with names, ratings, review counts, locations, descriptions, photos, and links, ready to export to JSON, CSV, or Excel.

Built for travel market research, price and reputation monitoring, hotel databases, travel SEO, and lead generation.

### Features

- Search by keyword or by Tripadvisor URL, several at once in a single run
- Full pagination, so one search can return hundreds of hotels instead of the first page
- Ratings, review counts, and review mention counts for every hotel
- Location, region, description, main photo, and a direct link to each hotel
- Records the requested stay (dates, rooms, guests) on every row
- Multiple languages and regions through a single locale setting
- Runs on Apify Residential proxies by default for reliable results

### What you get for each hotel

| Field | Description |
|-------|-------------|
| `name` | Hotel name |
| `locationId` | Tripadvisor location ID |
| `hotelId` | Numeric hotel ID from the hotel page |
| `rating` | Average review rating (0 to 5) |
| `reviewCount` | Number of reviews |
| `mentionCount` | How often the hotel is mentioned in reviews |
| `region` | City and region, for example "London, England" |
| `summary` | Hotel description |
| `snippet` | A short review snippet |
| `thumbnail` | Main photo URL |
| `url` | Link to the hotel on Tripadvisor |
| `locationType` | Location type (ACCOMMODATION) |
| `searchQuery` | The search term that produced the result |
| `sourceUrl` | The input URL, when the result came from a URL |
| `checkIn`, `checkOut`, `rooms`, `adults` | The requested stay, when provided |
| `scrapedAt` | Timestamp of the run (UTC) |

### Input

| Field | Type | Description |
|-------|------|-------------|
| Search queries | list | Hotel names or destinations, for example "hotels in London". |
| Tripadvisor URLs | list | Hotel or destination page URLs. The destination is read from each URL. |
| Check-in date | date | Requested check-in date, recorded on each result. |
| Check-out date | date | Requested check-out date, recorded on each result. |
| Rooms | integer | Number of rooms for the stay. Default 1. |
| Guests (adults) | integer | Number of adult guests. Default 2. |
| Language | text | Locale code such as `en-US`. |
| Max hotels per search | integer | Cap per query or URL. Default 30, up to 2000. |
| Request timeout (seconds) | integer | Per-request timeout. |
| Search query ID | text | Advanced. Leave empty unless a run reports the site changed. |
| Proxy | object | Proxy settings. Residential is recommended. |

Provide search queries, URLs, or both. Each one is processed independently, up to the max you set.

### Example input

```json
{
    "searchQueries": ["hotels in London", "Universal Orlando Resort"],
    "startUrls": [
        { "url": "https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html" }
    ],
    "checkIn": "2026-10-01",
    "checkOut": "2026-10-03",
    "rooms": 1,
    "adults": 2,
    "maxItems": 30,
    "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Example output

```json
{
    "name": "The Tower Hotel",
    "locationId": 193097,
    "hotelId": "193097",
    "rating": 4,
    "reviewCount": 15201,
    "mentionCount": 3542,
    "region": "London, England",
    "summary": "A landmark hotel next to Tower Bridge with river views...",
    "snippet": "We recently had the pleasure of staying at the Tower Hotel in London for",
    "thumbnail": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/33/53/11/b4/vicinity-firepit.jpg?w=1200&h=-1&s=1",
    "url": "https://www.tripadvisor.com/Hotel_Review-g186338-d193097-Reviews-The_Tower_Hotel-London_England.html",
    "locationType": "ACCOMMODATION",
    "searchQuery": "hotels in London",
    "sourceUrl": null,
    "checkIn": "2026-10-01",
    "checkOut": "2026-10-03",
    "rooms": 1,
    "adults": 2,
    "scrapedAt": "2026-09-13T06:40:00Z"
}
```

### How to use it

1. Open the actor and add one or more terms under **Search queries**, such as `hotels in Paris`.
2. To target a specific place from Tripadvisor, paste its page link under **Tripadvisor URLs**.
3. Set your stay dates, rooms, and guests if you want them recorded on each result.
4. Set **Max hotels per search**.
5. Run the actor and export the dataset as JSON, CSV, Excel, or XML, or read it through the Apify API.

For the most precise targeting, prefer **Search queries**. URLs are matched by the destination read from the link, which works well for city pages and specific hotels.

### Common use cases

- Compare hotels in a city by rating and review volume
- Build and refresh a hotel database for a booking or travel site
- Monitor how often specific hotels are mentioned in reviews
- Research a market before listing a new property
- Feed hotel data into travel SEO, content, and lead lists

### Good to know

- The actor returns hotel listings with ratings, reviews, and details. Check-in, check-out, rooms, and guests are recorded on each row as the requested stay so you can pair the data with your own booking links.
- Tripadvisor uses bot protection that blocks plain datacenter traffic, so the actor runs on residential proxies by default for consistent results. Residential proxy usage is billed by Apify.
- If a run reports that the search could not be completed because Tripadvisor changed its site, open a hotel search in a browser, check the network request to `graphql/ids`, copy the `preRegisteredQueryId`, and paste it into the **Search query ID** field.

### FAQ

**Can I extract hotels for a whole city?**
Yes. Use a term like `hotels in Rome`, or paste the city's Tripadvisor hotels URL. Set **Max hotels per search** as high as you need, up to 2000.

**Do I need any credentials or setup?**
No. Set your input and run. The default proxy setting works out of the box.

**Which fields can be empty?**
A few, such as `summary` or `snippet`, may be missing for some hotels. Every row still includes the hotel name, ID, rating, reviews, and link when Tripadvisor provides them.

# Actor input Schema

## `searchQueries` (type: `array`):

Hotel names or destinations to search, for example 'hotels in London', 'New York City', or 'Universal Orlando Resort'. Add as many as you need.

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

Tripadvisor hotel or destination page URLs. The destination is read from each URL and its hotels are collected.

## `checkIn` (type: `string`):

Requested check-in date (YYYY-MM-DD). Recorded on each result to mark the intended stay.

## `checkOut` (type: `string`):

Requested check-out date (YYYY-MM-DD). Recorded on each result to mark the intended stay.

## `rooms` (type: `integer`):

Number of rooms for the stay.

## `adults` (type: `integer`):

Number of adult guests for the stay.

## `locale` (type: `string`):

Language and region code for the results.

## `maxItems` (type: `integer`):

Maximum number of hotels to collect for each search query or URL.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `queryId` (type: `string`):

Advanced. Tripadvisor's internal search query ID. Leave empty to use the built-in default. Only change this if runs start failing because Tripadvisor updated its site.

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

Proxy settings. Residential proxies are recommended for the most reliable results.

## Actor input object example

```json
{
  "searchQueries": [
    "hotels in London",
    "hotels in Paris"
  ],
  "startUrls": [
    {
      "url": "https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html"
    }
  ],
  "rooms": 1,
  "adults": 2,
  "locale": "en-US",
  "maxItems": 30,
  "requestTimeoutSecs": 45,
  "queryId": "",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `properties` (type: `string`):

Extracted Tripadvisor hotel listings with ratings, prices, and locations.

# 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 = {
    "searchQueries": [
        "hotels in London"
    ],
    "startUrls": [],
    "locale": "en-US",
    "queryId": "",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/tripadvisor-hotels-extractor").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 = {
    "searchQueries": ["hotels in London"],
    "startUrls": [],
    "locale": "en-US",
    "queryId": "",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/tripadvisor-hotels-extractor").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 '{
  "searchQueries": [
    "hotels in London"
  ],
  "startUrls": [],
  "locale": "en-US",
  "queryId": "",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call kawsar/tripadvisor-hotels-extractor --silent --output-dataset

```

## MCP server setup

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

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/vZbryUvNlZqz7XDEJ/builds/noChhwYulyqhICJLR/openapi.json
