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

Tripadvisor hotel lists as clean data: rating, reviews, price level, address, phone, coordinates and photo.

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

## Pricing

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

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

## Tripadvisor Hotels Scraper

Collect every hotel from any Tripadvisor hotel list (a city, region or neighbourhood). Get name, rating, number of reviews, price level, address, phone, coordinates, photo and the hotel page link.

### What you get

- Paste one or more Tripadvisor hotel list links
- Rating, review count, price level, address, phone
- Latitude and longitude for mapping
- Main photo first, hotel page link on every row
- Automatic pagination through all result pages

### How to use

1. Open the Input tab. The form is already filled with a working example.
2. Change the fields to your own search, or keep the example to see the output format.
3. Click **Start** and download the results as JSON, CSV, Excel or HTML from the Output tab, or read them through the Apify API.

### Input

| Field | What it does |
|---|---|
| Hotel list links | Tripadvisor hotel list pages, for example https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html. Open Tripadvisor, search Hotels for a place and paste the page link. |
| Maximum results | Stop after this many hotels. |

Example input:

```json
{
  "startUrls": [
    "https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html"
  ],
  "maxItems": 60
}
```

### Output

Each result is one row. Main fields:

| Field | Description |
|---|---|
| image | Main photo |
| name | Hotel name |
| position | Position in the list |
| url | Hotel page |
| rating | Traveller rating out of 5 |
| reviewCount | Number of reviews |
| priceRange | Price level (symbols) |
| streetAddress | Street address |
| city | City |
| region | Region or state |
| postalCode | Postal code |
| country | Country |
| phone | Phone number |
| latitude | Latitude |
| longitude | Longitude |
| listUrl | List page it came from |
| page | Result page number |

Example output (shortened):

```json
{
  "image": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/2b/d7/b1/2e/the-roof.jpg?w=1200&h=-1&s=1",
  "name": "PUBLIC Hotel",
  "position": 1,
  "url": "https://www.tripadvisor.com/Hotel_Review-g60763-d12533513-Reviews-PUBLIC_Hotel-New_York_City_New_York.html",
  "rating": 4.6,
  "reviewCount": 2649,
  "priceRange": "€€",
  "streetAddress": "215 Chrystie Street",
  "city": "New York City",
  "region": "New York",
  "postalCode": "10002",
  "country": "United States",
  "phone": "+1 212-735-6000",
  "latitude": 40.723003,
  "longitude": -73.99175,
  "listUrl": "https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html",
  "page": 1
}
```

### Good to know

- Each page holds 30 hotels and the Actor reads page after page until it reaches your maximum.
- Tripadvisor limits how deep a list goes; use a more specific area to collect more.
- The Actor never fails on a bad or empty input. It finishes with a clear message in the run status explaining what to change.
- Results are saved while the run is going, so you can open the dataset before it finishes.

### Support

Found a field that is missing or a result that looks wrong? Open an issue from the Actor page and include the run link.

# Actor input Schema

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

Tripadvisor hotel list pages, for example https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html. Open Tripadvisor, search Hotels for a place and paste the page link.

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

Stop after this many hotels.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html"
  ],
  "maxItems": 60
}
```

# Actor output Schema

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

No description

# 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": [
        "https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html"
    ],
    "maxItems": 60
};

// Run the Actor and wait for it to finish
const run = await client.actor("apt_marble/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 = {
    "startUrls": ["https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html"],
    "maxItems": 60,
}

# Run the Actor and wait for it to finish
run = client.actor("apt_marble/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 '{
  "startUrls": [
    "https://www.tripadvisor.com/Hotels-g60763-New_York_City_New_York-Hotels.html"
  ],
  "maxItems": 60
}' |
apify call apt_marble/tripadvisor-hotels-scraper --silent --output-dataset

```

## MCP server setup

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