# Tripadvisor Hotels Scraper (`cirkit/tripadvisor-hotels-scraper`) Actor

Fast Tripadvisor hotel search scraper. Give it a destination name or a Tripadvisor Hotels URL and get every hotel with rating, review count, ranking, coordinates, full address, phone, amenities, price range, and live per-provider room offers.

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

## Pricing

$2.00 / 1,000 hotels

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/platform/actors/running/actors-in-store#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 Scraper

Search Tripadvisor for hotels in any destination and get a clean row per property: rating, review count, ranking, coordinates, full address, phone, amenities, price range, and live per-provider room offers.

Give it a destination name — `Barcelona`, `Austin, Texas`, `Kyoto` — or paste a Tripadvisor Hotels URL. No login, no browser, no API key.

### What you get

One record per hotel:

| Field | Example |
| --- | --- |
| `name`, `url`, `locationId` | `Hotel Astoria`, `.../Hotel_Review-g187497-d228590-...`, `228590` |
| `rating`, `reviewCount` | `4.3`, `2039` |
| `rankingPosition`, `rankingOutOf`, `rankingString` | `80`, `534`, `#80 of 534 hotels in Barcelona` |
| `hotelClass`, `propertyType`, `category` | `3.0`, `Hotel`, `HOTEL` |
| `latitude`, `longitude` | `41.393997`, `2.153488` |
| `street`, `city`, `state`, `postalCode`, `country`, `addressString` | `Carrer De Paris, 203` … `08036 Barcelona Spain` |
| `neighborhoods` | `["L'Antiga Esquerra de l'Eixample", "Eixample"]` |
| `phone` | `+34 932 09 83 11` |
| `amenities` | `["Pool", "Restaurant", "Bar/Lounge", "Fitness center"]` |
| `priceRangeMin`, `priceRangeMax` | `158`, `299` |
| `lowestPrice`, `lowestPriceValue`, `currency` | `$137`, `136.87`, `USD` |
| `offers` | per-provider rates with numeric price, currency, availability, free-cancellation date |
| `aiReviewSummary` | Tripadvisor's generated summary of what reviewers say |
| `featuredReview` | highlighted review snippet with author, rating, date, link |
| `image`, `thumbnail` | full-size and 300×200 photo URLs |

### Input

```json
{
  "locationQueries": ["Barcelona"],
  "maxItems": 100,
  "includeSponsored": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

- **`locationQueries`** — destination names. Each is resolved to a Tripadvisor destination, and the match is reported back on every row as `searchGeoId` / `searchGeoName` so you can confirm what was searched. Tripadvisor's lookup is fuzzy and will happily match *something* for a nonsense query, so check `searchGeoName` if a result set looks wrong.
- **`startUrls`** — Tripadvisor Hotels list URLs, e.g. `https://www.tripadvisor.com/Hotels-g187497-Barcelona_Catalonia-Hotels.html`. Use these when you want a specific filtered or sorted list. Non-Hotels URLs are skipped with a warning.
- **`maxItems`** — cap per destination, default `100`, hard ceiling `10000`. `0` means zero hotels; it never means unlimited.
- **`includeSponsored`** — Tripadvisor injects the same ~7 paid placements at the top of every page of a destination. They are dropped by default so you are not charged for duplicated ads. Set `true` to keep them, flagged as `isSponsored`.

### Notes and limits

- **Residential proxies are required.** Tripadvisor is behind DataDome. Apify datacenter proxies are blocked outright (HTTP 403 + captcha on every attempt); `RESIDENTIAL` works.
- **Prices are for Tripadvisor's default one-night stay window.** Every row carries `checkInDate`, `checkOutDate`, and `pricesAreDefaultDates` so the quoted rates are never ambiguous. Custom date ranges are not supported yet.
- **Some fields are genuinely absent for unreviewed properties.** Tripadvisor does not rank a property with zero reviews, publishes no curated amenity list for small ones, and sometimes has no photo. Measured on reviewed properties, `rankingString` is 100% populated and `image` 98.8%.
- **A search that returns nothing still writes one row** explaining why, rather than finishing with an empty dataset.

### How it works

Every Tripadvisor `/Hotels-g<geoId>-...` page is server-rendered with an inline `urqlSsrData` blob holding the same GraphQL results the page's JavaScript would otherwise fetch. One HTML GET yields 30 hotels fully populated — no browser, no XHR round-trips. Pagination walks the `-oa<offset>-` slug, deduping on `locationId` because paid placements repeat on every page.

Requests use `curl_cffi` with Safari TLS impersonation; Chrome profiles are rejected at the JA3 stage. Sessions rotate automatically on 403.

# Actor input Schema

## `locationQueries` (type: `array`):

Destination names to search, e.g. "Barcelona" or "Austin, Texas". Each is resolved to a Tripadvisor destination automatically. Use the most specific name you can — "Barcelona" resolves to the city, "Province of Barcelona" to the region.

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

Tripadvisor hotel list URLs, e.g. https://www.tripadvisor.com/Hotels-g187497-Barcelona\_Catalonia-Hotels.html. Use these instead of (or alongside) destinations when you want a specific filtered or sorted list. Non-Hotels URLs are skipped.

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

Upper bound on hotels returned for each destination. Set to 0 to scrape nothing (it never means unlimited). Hard ceiling is 10000.

## `includeSponsored` (type: `boolean`):

Tripadvisor injects the same ~7 sponsored hotels at the top of every page of a destination. They are dropped by default so you are not charged for duplicated ads.

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

Tripadvisor is protected by DataDome. Apify datacenter proxies are blocked outright; RESIDENTIAL is required.

## Actor input object example

```json
{
  "locationQueries": [
    "Barcelona"
  ],
  "startUrls": [],
  "maxItems": 100,
  "includeSponsored": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset of Tripadvisor hotel records.

## `datasetCsv` (type: `string`):

Same dataset rendered as CSV.

## `datasetXlsx` (type: `string`):

Same dataset rendered as XLSX.

# 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 = {
    "locationQueries": [
        "Barcelona"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("cirkit/tripadvisor-hotels-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 = {
    "locationQueries": ["Barcelona"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("cirkit/tripadvisor-hotels-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 '{
  "locationQueries": [
    "Barcelona"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call cirkit/tripadvisor-hotels-scraper --silent --output-dataset

```

## MCP server setup

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