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

Scrape every hotel Tripadvisor lists for a city, with nightly prices for your dates and guests. Just add a city and get name, rating, review count, star class, ranking, cheapest price and provider, amenities, address, phone and coordinates. Filter by class, type, amenity, rating and price.

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

## Pricing

from $1.00 / 1,000 hotel-listeds

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?

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

### What is Tripadvisor Hotels Scraper?

What does a night cost at each hotel in Paris on your dates? Tripadvisor Hotels Scraper answers that for a whole city in one run. Name the city and the stay, and you get the hotels Tripadvisor lists for it, each with the nightly price its booking partners quote for your dates and guests, who sells that rate, and the rating, star class, ranking, amenities, address, phone and coordinates.

It's the city-wide list. For one hotel's full record use Tripadvisor Place Details, and for what guests wrote use Tripadvisor Reviews. The hotel ids here join with both.

What you get that a plain hotel list doesn't give you:

- **Your stay, priced.** Dates, adults, rooms and children's ages go to Tripadvisor, and the price comes back in the currency you choose. A dated run over the first 1,000 Paris hotels returned 874 with a price and 96 with no offer for those nights.
- **The whole city.** Paris has 3,067 hotels on Tripadvisor, New York City 1,042, Rome 9,972. Set the per-city maximum to zero and the list runs to the end.
- **Each hotel once, where it really ranks.** Sponsored placements are removed.
- **The filters on Tripadvisor's own page.** Star class, property type, amenity, neighbourhood, style, rating, award, nightly price, and 44 hotel brands we checked one by one.
- **Hotels near a point.** Give a latitude, a longitude and a radius, and each row has its distance in kilometres.
- **$1.60 per 1,000 hotels** on the Free plan, $1.00 on Business, price lookups included.

**BonCross Verified** means we tested this actor against the live site before release and kept the record:

- 43 of 43 live checks on its inputs and filters passed on 7 October 2026
- 12 cities run the same day by name, id and link: 300 hotels, none empty
- Charges checked against the 300 rows
- A name that matches the wrong city gets an uncharged row saying so

### How to scrape Tripadvisor hotels

1. [Create a free Apify account](https://console.apify.com/sign-up), then open [Tripadvisor Hotels Scraper](https://apify.com/boncross/tripadvisor-hotels-scraper).
2. Type a city into "Cities". A name works, and so does a Tripadvisor link or an id such as g187147.
3. Set check-in and check-out if you want prices for particular nights, plus adults, rooms and children's ages.
4. Choose a sort and any filters, and how many hotels you want per city.
5. Press Start, then download the list as Excel, CSV or JSON.

### What data can you extract?

| Field | Description |
|---|---|
| 🏷️ Name | The hotel's name on Tripadvisor |
| ⭐ Rating | The overall score out of five |
| Reviews | How many reviews it has |
| 🛎️ Star class | One to five stars |
| 🥇 Ranking | Its place in the city's ranking, as a number and as Tripadvisor words it |
| 💵 Price per night | The nightly rate of the offer Tripadvisor shows, before taxes |
| 🏪 Provider | Who sells that rate (Booking.com, Expedia, the hotel itself…) |
| Offers | How many partners priced the stay |
| ✅ Availability | Whether the stay is available |
| Free cancellation | Whether the rate can be cancelled free, and until when |
| Price range | The hotel's typical nightly range |
| 🏊 Amenities | The highlighted amenities |
| Neighbourhoods | The neighbourhoods it sits in |
| 🏠 Address and phone | As published |
| 📍 Coordinates and distance | Latitude, longitude, and kilometres from your point or the city centre |
| 🏆 Award | Travelers' Choice or Best of the Best, and the year |
| 📝 Summary | Tripadvisor's short summary of the hotel |
| 🖼️ Photo | The lead photo |

### ⬇️ Input

You need a city, or a point on the map. The rest narrows the list.

**Cities.** Paste a Tripadvisor link for the city (any page of it), its id (`g187147`) or its name. Names work in English or in the city's own script (`Barcelona`, `京都`, `Αθήνα`), and small misspellings such as `Pari` still find the city. The row tells you which city each name resolved to. If the name is in a third language, or many places share it, use the link or the id. "Start URLs (bulk upload)" takes the same links from a file or a sheet.

**Dates and guests.** Check-in, check-out, adults, rooms and children's ages. If you leave the dates out, Tripadvisor prices its default stay (two weeks ahead, one night, two adults) and each row says which dates those were.

**Near a point.** A latitude, a longitude and a radius in kilometres. A city is optional here.

**Limits.** "Maximum hotels per city" (default 100) sets how many hotels each city returns, and zero means all of them. "Maximum hotels for the whole run" caps the run.

#### The cheapest 4 and 5 star hotels in Paris for two nights

```json
{
  "locations": ["https://www.tripadvisor.com/Hotels-g187147-Paris_Ile_de_France-Hotels.html"],
  "checkIn": "2026-11-10",
  "checkOut": "2026-11-12",
  "adults": 2,
  "stars": ["4", "5"],
  "sortBy": "priceLowToHigh",
  "maxItemsPerLocation": 50
}
```

#### A family stay in two cities, rated 4.5 and up, under 300 a night in euros

```json
{
  "locations": ["Rome", "g187497"],
  "checkIn": "2026-12-20",
  "checkOut": "2026-12-27",
  "adults": 2,
  "childrenAges": ["7", "10"],
  "minRating": "4.5",
  "maxPrice": 300,
  "currency": "EUR"
}
```

#### The full list for a city, by traveler ranking

```json
{
  "locations": ["g60763"],
  "maxItemsPerLocation": 0
}
```

#### Filters

Filters take the labels on the city's Tripadvisor Hotels page, or their ids.

| Input | What it keeps |
|---|---|
| `stars` | Hotels of these star classes |
| `minRating` | Hotels rated at least this out of 5: `"3"`, `"3.5"`, `"4"` or `"4.5"` |
| `propertyTypes` | For example Hotels, B\&Bs & Inns, Hostels, Condos, Resorts, Specialty lodgings |
| `amenities` | For example Pool, Free Wifi, Free parking, Spa, Fitness center, Pets Allowed |
| `neighborhoods` | Neighbourhood names as the city's Hotels page lists them, for example Le Marais |
| `styles` | For example Budget, Luxury, Family, Romantic, Boutique, Business |
| `brands` | Hotel brands, for example ibis or Mercure |
| `travelersChoice` (default false) | Hotels with a Travelers' Choice award |
| `bestOfTheBest` (default false) | Hotels with a Travelers' Choice Best of the Best award |
| `minPrice` / `maxPrice` | Nightly price limits in the chosen `currency` (default USD). Hotels with no price for the stay are left out when a limit is set |

Brands are offered for 44 chains whose filter we checked to return that chain's hotels, among them ibis, Mercure, Novotel, Best Western, Holiday Inn, Hilton Hotels & Resorts, Marriott Hotels and Hyatt. Any other brand is refused, and the refusal lists the 44.

You can sort by traveler ranking (the default), best value, price or distance to the city centre.

#### For developers

- `maxItemsPerLocation` (default 100, 0 for all) is the per-city limit. `maxItems` (default 0, no cap) is the run-wide one.
- A name Tripadvisor answers with a different place that only shares a word with it (`Asdfgh City`) is refused with an error row, and nothing is charged for it.
- Two inputs that are the same city are listed once, under the first.
- With `minPrice`, `maxPrice` or a radius around a point, a city that keeps nothing stops early: after 5 pages in a row with no hotel kept, or after about three times the pages `maxItemsPerLocation` needs.
- `minPrice` and `maxPrice` apply to the nightly price.
- A dated search waits until Tripadvisor's partners have all answered before it reads the prices, usually 3 to 6 seconds a page. A page that never receives prices is returned unpriced with `isPriceComplete: false`.

### ⬆️ Output

One row per hotel, in the order of the sort you picked.

```json
{
  "id": "229968",
  "hotelId": "229968",
  "locationId": 229968,
  "name": "Hôtel Astra Opéra - Astotel",
  "url": "https://www.tripadvisor.com/Hotel_Review-g187147-d229968-Reviews-Hotel_Astra_Opera_Astotel-Paris_Ile_de_France.html",
  "rating": 5,
  "ratingScale": 5,
  "totalReviews": 1007,
  "stars": 4,
  "accommodationType": "Hotel",
  "rankingPosition": 2,
  "rankingText": "#2 of 1,891 hotels in Paris",
  "pricePerNight": 461.93,
  "pricePerNightText": "$462",
  "currency": "USD",
  "pricesIncludeTax": false,
  "provider": "Booking.com",
  "offerCount": 12,
  "isAvailable": true,
  "availabilityStatus": "AVAILABLE",
  "isFreeCancellation": null,
  "freeCancellationUntil": null,
  "priceRangeMin": 329,
  "priceRangeMax": 749,
  "amenities": ["Pool", "Fitness center", "Air conditioning", "Family Friendly"],
  "neighborhoods": ["Chaussée-d'Antin La Fayette", "9th Arr. - Opéra", "Opéra / Bourse"],
  "address": "29 Rue De Caumartin, 75009 Paris France",
  "phone": "+33 1 42 65 15 15",
  "lat": 48.87178,
  "lng": 2.328087,
  "distanceKm": 2.262,
  "award": "bestOfTheBest",
  "awardYear": 2026,
  "summary": "Modern hotel with a central location near major attractions, featuring a standout pool, spa with sauna, gym, and AC. …",
  "photoUrl": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/…jpg?w=1200&h=800&s=1",
  "checkIn": "2026-10-25",
  "checkOut": "2026-10-27",
  "adults": 2,
  "rooms": 1,
  "childrenAges": [],
  "isDefaultDates": false,
  "isPriceComplete": true,
  "totalResults": 3067,
  "searchGeoId": 187147,
  "searchGeoName": "Paris",
  "input": "g187147",
  "position": 1,
  "scrapedAt": "2026-10-04T20:04:36.628Z"
}
```

| Column | Meaning |
|---|---|
| `id`, `hotelId`, `locationId` | Tripadvisor's id for the hotel. It joins with the Tripadvisor reviews and place details scrapers |
| `totalReviews` | The hotel's review count |
| `rankingPosition`, `rankingText` | Its rank in the city, and Tripadvisor's sentence for it |
| `pricePerNight`, `pricePerNightText` | The nightly rate of the offer Tripadvisor shows for the stay, including mandatory fees and before taxes, and the price as shown where Tripadvisor shows it per night |
| `pricesIncludeTax` | `false`: Tripadvisor's nightly rates exclude taxes |
| `provider`, `offerCount` | Who sells that rate, and how many partners priced the stay |
| `isAvailable`, `availabilityStatus` | Availability for the stay, and Tripadvisor's status |
| `isFreeCancellation`, `freeCancellationUntil` | Free cancellation and its deadline, where the offer has one. Empty otherwise |
| `priceRangeMin`, `priceRangeMax` | The hotel's typical nightly range on Tripadvisor |
| `distanceKm` | Kilometres from your point in a point search, otherwise from the city centre |
| `checkIn`, `checkOut`, `adults`, `rooms`, `childrenAges` | The stay that was priced |
| `isDefaultDates` | `true` when no dates were given and Tripadvisor picked them |
| `isPriceComplete` | `true` when all the partners had answered. Prices are only filled from a complete search |
| `totalResults` | How many hotels matched the search |
| `searchGeoId`, `searchGeoName`, `position` | The city searched, and the hotel's order in its list |
| `input`, `error` | What you asked for and, on a row for a city that could not be listed, why |

### How many hotels come back with a price?

It depends on the stay, and we'd rather you knew the numbers before you run it.

On 4 October 2026 we took the first 30 hotels in each of 14 cities on five continents, 420 in all, priced for a two-night stay three weeks ahead:

| Column | Filled |
|---|---|
| Name, link, rating, reviews, ranking, offers, address, phone, coordinates, distance | 100% |
| Price, provider, availability | 100% |
| Amenities | 99% |
| Star class | 96% |
| Summary | 95% |
| Neighbourhoods | 80% |
| Award | 61% |
| Free cancellation | 39% |

That's a big-city stay booked well ahead. A second check on 7 October 2026 took the first 25 hotels of 16 cities, among them small towns where most places are full weeks ahead:

| Search | Hotels | Price | Provider | Availability |
|---|---|---|---|---|
| With dates (a weekend and a midweek stay, 5 cities each) | 250 | 64% | 64%, each priced hotel | 64% |
| Without dates (12 cities) | 300 | 85% | 22%, 12% of priced hotels | 97% |

A hotel with no rate left for the stay has no price, as on the site. Without dates, Tripadvisor prices a night two weeks ahead and names the seller on about one hotel in five (22% of the 300 above, 12% of the priced ones). `provider` is empty on the rest. If you need to know who sells the rate, give check-in and check-out. Free cancellation was stated on 17% of those 300 undated rows.

Hotels far down a city's list, past the ones partners price, have no price, rank or award. That's how the site shows them too.

### How long does a city take?

| Run | Hotels | Time |
|---|---|---|
| 14 cities, 30 each, dated | 420 | 30 s of scraping |
| One city, first 1,000, dated, traveler ranked | 1,000 | 68 s of scraping, 70 s in all |

In the 1,000-hotel run, 874 hotels came back priced, 96 had no offer for the dates, and one page of 30 never received prices from Tripadvisor and came back unpriced, marked `isPriceComplete: false`.

### How much does it cost to scrape Tripadvisor hotels?

| Event | Free plan | Starter | Scale | Business |
|---|---|---|---|---|
| `actor-start`, per run | $0.001 | $0.001 | $0.001 | $0.001 |
| `city-checked`, per city that returns no hotel (all of them filtered out) | $0.0005 | $0.0005 | $0.0005 | $0.0005 |
| `hotel-listed`, per hotel, price included | $0.0016 | $0.00144 | $0.00125 | $0.001 |

Enterprise plans pay the Business price.

**$1.60 per 1,000 hotels** on the Free plan, $1.00 on Business. Platform usage and proxy usage are in that price, and a dated price costs the same as an undated one.

- 14 cities, 30 hotels each: $0.001 + 420 × $0.0016 = **$0.673** ($0.42 on Business).
- One city, first 1,000 hotels with prices for your dates: $0.001 + 1,000 × $0.0016 = **$1.601** ($1.00 on Business).

You're never charged for a city that couldn't be listed or a name that was refused. A city that was listed but returns no hotel, because your filters removed them all, is billed the $0.0005 `city-checked` fee once.

The $5 of credits in Apify's Free plan each month buys about 3,100 hotels with this actor, enough for the whole of Paris.

### Track prices, or feed them into something else

A hotel price is worth most when you have yesterday's to compare it with. Put the same city and dates on an Apify Schedule and you have a daily price series per hotel, keyed on `hotelId`. That's how you'd watch a city's prices move ahead of an event. The same rows feed a travel app with prices, providers and coordinates.

The API call is `POST https://api.apify.com/v2/acts/boncross~tripadvisor-hotels-scraper/run-sync-get-dataset-items` with your input as the JSON body. It answers with the rows when the run is short. A dated city of 1,000 takes about 70 seconds, and for anything longer you'd start the run and fetch the dataset afterwards. On the Apify MCP server (`mcp.apify.com`) the actor is the tool `tripadvisor-hotels-scraper`, which lets an AI agent price a city for a set of dates on request.

### FAQ

#### Are the prices live?

They're what Tripadvisor's partners quote at the moment of the run, for the stay you set.

#### Why does a hotel have no price?

Either no partner has a rate left for your nights, or the hotel sits so far down a long list that partners don't price it. Both show the same way on Tripadvisor. Partners price roughly the first several hundred hotels of a long list.

#### Is the price the total for my stay?

It's the nightly rate, with mandatory fees and before taxes. Tripadvisor publishes no stay total on the list, and you get one price per hotel: the rate the list shows. A hotel's full room list is a job for a room-rates scraper.

#### I typed a city name and got an error row. Why?

Tripadvisor answered the name with a different place that only shares a word with it, and we refuse that match so you don't pay for the wrong city. The row names your input and the place it would have been. Close misspellings still resolve, and the link or the id always works.

#### Which sort should I use for a complete list?

Traveler ranked, the default. "Best value" is Tripadvisor's blend, and it's re-ranked while partners' prices arrive. On a long list some hotels shift between pages. We remove the repeats, but a few hotels can be missed and deep pages can come back unpriced. The price sort can have small steps out of order, as on the site.

#### Do I need proxies or a Tripadvisor account?

No to both. Proxy usage is included and there's nothing to sign in to.

#### What are its limits?

- With a filter set, the list holds the hotels that match it. Hotels with no availability for your dates may not be among them.
- Brands are limited to the 44 chains whose filter was checked.
- A city is the unit. For a region or a country Tripadvisor returns a selection, not the full set of hotels in it.
- Names resolve to the best-known destination of that name.
- Text is in English.

#### Is it legal to scrape Tripadvisor hotel listings?

The actor reads what Tripadvisor shows any visitor without signing in. Collecting public data is broadly lawful, though how you use it is your responsibility under GDPR and similar rules. If you're unsure, take legal advice.

### More from BonCross

- [Tripadvisor Attractions Scraper](https://apify.com/boncross/tripadvisor-attractions-scraper): The things to do Tripadvisor lists for a city or around a point.
- [Tripadvisor Place Details Scraper](https://apify.com/boncross/tripadvisor-location-details): The full Tripadvisor record for any hotel, restaurant or attraction.
- [Tripadvisor Restaurants Scraper](https://apify.com/boncross/tripadvisor-restaurants-scraper): Every restaurant Tripadvisor lists for a city.
- [Tripadvisor Reviews Scraper](https://apify.com/boncross/tripadvisor-reviews): Every Tripadvisor review for any hotel, restaurant, attraction or tour.
- [Trip.com Hotel Details Scraper](https://apify.com/boncross/tripcom-hotel-details): The full Trip.com record for any hotel, with its guest reviews.
- [Trip.com Hotel Search Scraper](https://apify.com/boncross/tripcom-hotel-search): Every hotel Trip.com lists for a destination and your dates.

### Your feedback

If a price here doesn't match what Tripadvisor showed you for the same dates, or a filter label you use isn't accepted, open an issue on the Issues tab in Apify Console. Tell us the city and the stay. We read every issue and reply there.

# Changelog

This Actor's version history is a separate document: https://apify.com/boncross/tripadvisor-hotels-scraper/changelog.md

# Actor input Schema

## `locations` (type: `array`):

The cities to list hotels for. Paste a Tripadvisor link for the city (any page of it, for example its Hotels page), its id (g187147), or its name (Paris, 東京, New York City). Regions and countries are not lists: give a city.

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

Tripadvisor city links, with the option to load them in bulk from a file, a Google Sheet or a remote list. Combined with anything in the list above.

## `maxItemsPerLocation` (type: `integer`):

How many hotels to return for each city, in the order of the sort you pick. Zero means every one the site lists.

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

A run-wide ceiling on hotels, across every city. Zero means no limit.

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

Arrival date, YYYY-MM-DD. Set with check-out for dated prices.

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

Departure date, YYYY-MM-DD.

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

Adults in total.

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

Rooms to price.

## `childrenAges` (type: `array`):

One entry per child, their age at check-in (0-17). Leave empty for adults only.

## `sortBy` (type: `string`):

Traveler ranked (the default) is Tripadvisor's ranking by reviews and is steady from page to page, so a long list comes back whole. Best value is Tripadvisor's own blend, re-ranked while partners' prices arrive: on a long list some hotels shift between pages and can be missed.

## `stars` (type: `array`):

Only hotels of these star classes.

## `minRating` (type: `string`):

Only hotels rated at least this, out of 5.

## `propertyTypes` (type: `array`):

For example Hotels, B\&Bs & Inns, Hostels, Condos, Resorts, Specialty lodgings.

## `amenities` (type: `array`):

For example Pool, Free Wifi, Free parking, Spa, Fitness center, Pets Allowed.

## `neighborhoods` (type: `array`):

Neighbourhood names as the city's Hotels page lists them, for example Le Marais.

## `styles` (type: `array`):

For example Budget, Luxury, Family, Romantic, Boutique, Business.

## `brands` (type: `array`):

Hotel brands, for example ibis or Mercure.

## `travelersChoice` (type: `boolean`):

Only hotels with a Travelers' Choice award.

## `bestOfTheBest` (type: `boolean`):

Only hotels with a Travelers' Choice Best of the Best award.

## `minPrice` (type: `integer`):

In the currency below. Hotels with no price for the stay are left out when a price limit is set.

## `maxPrice` (type: `integer`):

In the currency below.

## `lat` (type: `string`):

Decimal degrees, for example 48.8584. Set with longitude to search near a point.

## `lng` (type: `string`):

Decimal degrees, for example 2.2945.

## `radiusKm` (type: `integer`):

How far from the point, in kilometres. Rows further away are left out.

## `currency` (type: `string`):

Three-letter code, for example USD, EUR or JPY.

## Actor input object example

```json
{
  "locations": [
    "g187147"
  ],
  "startUrls": [],
  "maxItemsPerLocation": 100,
  "maxItems": 0,
  "checkIn": "2026-11-10",
  "checkOut": "2026-11-12",
  "adults": 2,
  "rooms": 1,
  "childrenAges": [],
  "sortBy": "popularity",
  "propertyTypes": [
    "Hostels"
  ],
  "amenities": [
    "Pool"
  ],
  "neighborhoods": [
    "Le Marais"
  ],
  "styles": [
    "Budget"
  ],
  "brands": [
    "ibis"
  ],
  "travelersChoice": false,
  "bestOfTheBest": false,
  "lat": "48.8584",
  "lng": "2.2945",
  "radiusKm": 2,
  "currency": "USD"
}
```

# Actor output Schema

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

Tripadvisor hotels: every row the run returned.

## `stats` (type: `string`):

Counts for the run: cities resolved, pages fetched, rows returned.

# 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 = {
    "locations": [
        "https://www.tripadvisor.com/Hotels-g187147-Paris_Ile_de_France-Hotels.html"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("boncross/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 = { "locations": ["https://www.tripadvisor.com/Hotels-g187147-Paris_Ile_de_France-Hotels.html"] }

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

```

## MCP server setup

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