# Tripadvisor Places & Ratings Data Scraper (`datascraperes/tripadvisor-places-scraper`) Actor

Scrape structured Tripadvisor place data from city searches, category pages, or public place URLs. Collect hotels, restaurants, attractions, and activities with ratings, review counts, rankings, contacts, hours, cuisine or amenities, primary images, and optional photos in one normalized dataset.

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

## Pricing

from $0.75 / 1,000 tripadvisor place 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?

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

Collect structured Tripadvisor place data from a search or public Tripadvisor URL. **Get one normalized Dataset item per unique hotel, restaurant, attraction, or activity**, with ratings, rankings, addresses, contact fields, hours, primary media, and optional additional photos.

### What this Actor does

Tripadvisor Places & Ratings Data Scraper accepts a free-text query for any country, city, region, or locality, plus public Tripadvisor place/category URLs from localized country domains. A place URL returns one place; a category URL is paginated up to your configured limit; a locality query discovers a balanced set of hotels, restaurants, and attractions/activities before hydrating each result with its detailed public listing data.

Each Dataset item is keyed by Tripadvisor's stable location ID and can include the name, type, category, coordinates, rating, review count, ranking, price fields, address, phone, website, opening hours, awards, amenities, cuisine or activity fields, the primary photo, and optional additional photos. The Actor also preserves the small review preview that Tripadvisor includes in a place-detail response; it does not paginate the complete review history.

The result is designed for travel research, local SEO, market analysis, directories, and lead research. It does not add unrelated third-party enrichment, and it keeps the public input bounded so a run can be estimated before it starts.

### Use cases

- Build structured hotel, restaurant, attraction, and activity datasets for any destination or locality.
- Enrich a known Tripadvisor place URL with contact, ranking, category, and location data.
- Compare local businesses, ratings, review counts, awards, and opening information.
- Create travel directories, destination inventories, or local SEO research tables.
- Add a bounded selection of public place photos to a normalized Dataset.

### How to use

1. Open the Actor in Apify Console.
2. Replace the example in `query` with your country, city, region, locality, or place. If you prefer a direct Tripadvisor URL, clear `query` and paste it under `startUrls` instead.
3. Set `maxItemsPerQuery`, or enable `collectAll` with a `maxTotalItemsPerRun` safety cap, and choose any categories, localization, and photo options you need.
4. Click **Start** and open the Dataset when the run finishes.

The simplest run is to replace the prefilled `Madrid, Spain` search and click **Start**. The advanced language, currency, and photo options can remain at their defaults.

### Input

Use one of the two entry paths: a search in `query`, or public Tripadvisor URLs in `startUrls`. The Console opens with a Madrid example so a first run needs only one edit and a click. If you use `startUrls`, clear the example search first so the run does not process both entry paths accidentally. `query` accepts any country or locality supported by Tripadvisor, for example `Madrid, Spain`, `hotels in Tokyo, Japan`, or `museums in Paris, France`. Include the country after a comma when a locality name is ambiguous. `startUrls` accepts up to 20 public Tripadvisor URLs from country-specific domains such as `tripadvisor.es`, `tripadvisor.fr`, or `tripadvisor.co.jp`. Place URLs containing a location ID return one item; category URLs containing a geographic ID are paginated up to `maxItemsPerQuery`, including common localized category slugs.

`maxItemsPerQuery` defaults to `20` and accepts `1` through `10,000` for each query or URL target when `collectAll` is disabled. The Actor deduplicates places across all targets in the run by `id`, so the final Dataset can contain fewer items than the sum of individual target limits. The hotel, restaurant, and attraction switches are enabled by default; they apply to geographic searches and category URLs. A direct place URL is always processed because it is an explicit target.

Set `collectAll` to `true` when you want pagination to continue until Tripadvisor has no more source pages. In this mode, `maxItemsPerQuery` is not the stopping point: `maxTotalItemsPerRun` is the hard safety cap for the complete run, defaults to `10,000`, and accepts up to `50,000`. The Actor stops at source exhaustion or that cap, whichever comes first. Use a lower cap for exploratory runs and increase it only when you expect a large Dataset and budget for it.

`language` defaults to `en` and accepts a language code such as `en`, `es`, `fr`, or `de`; regional forms are normalized to their two-letter language code. `currency` defaults to `USD` and is normalized to uppercase. `maxPhotosPerPlace` defaults to `0`; set it from `1` to `50` to fetch additional photos.

For a direct-place URL example, use this input and set `maxItemsPerQuery` to `1`:

```json
{
  "startUrls": [
    {
      "url": "https://www.tripadvisor.com/Attraction_Review-g60750-d104122-Reviews-San_Diego_Zoo-San_Diego_California.html"
    }
  ],
  "maxItemsPerQuery": 1,
  "language": "en",
  "currency": "USD",
  "maxPhotosPerPlace": 0
}
```

```json
{
  "query": "Madrid, Spain",
  "startUrls": [],
  "maxItemsPerQuery": 20,
  "collectAll": false,
  "maxTotalItemsPerRun": 10000,
  "includeHotels": true,
  "includeRestaurants": true,
  "includeAttractions": true,
  "language": "en",
  "currency": "USD",
  "maxPhotosPerPlace": 0
}
```

This complete input contract includes every public property from the Actor schema.

### Output

The Actor writes one normalized place object per unique location to the default Dataset. Export the Dataset as JSON, JSONL, CSV, Excel, XML, or another format supported by Apify. A run is successful only when the requested collection produces usable data. If the source does not provide enough usable data, the run can fail instead of presenting an incomplete collection as successful; rows that were already delivered remain in the Dataset.

This is the complete Dataset item from a real successful execution:

```json
{
  "id": "104122",
  "name": "San Diego Zoo",
  "type": "ATTRACTION",
  "category": "attraction",
  "categoryName": "Attraction",
  "subcategory": [
    {
      "key": "48",
      "name": "Zoos & Aquariums"
    },
    {
      "key": "57",
      "name": "Nature & Parks"
    },
    {
      "key": "61",
      "name": "Outdoor Activities"
    }
  ],
  "description": "The San Diego Zoo pioneered cageless exhibits and offers travelers a fun and informative experience. Featuring over 4000 animals, the park gives you a peek into the wildlife of several ecosystems, from deserts to rainforests. Ride the tour bus, which crosses three quarters of the zoo’s area, and learn more about the animals from the guide as you view them in their natural habitats. You can also hop on the Skyfari gondola lift to see the entire park from above. Tickets to the San Diego Zoo that also cover the San Diego Zoo Safari Park in Escondido are available for a discount. – Tripadvisor",
  "locationString": "San Diego, California",
  "latitude": 32.735275,
  "longitude": -117.14911,
  "rating": 4.6,
  "numReviews": 31948,
  "ranking": "#3 of 946 things to do in San Diego",
  "rankingPosition": 3,
  "rankingDenominator": 946,
  "rankingCategory": "attraction",
  "rankingGeo": "San Diego",
  "rankingGeoId": "60750",
  "rawRanking": 4.941324234008789,
  "price": null,
  "priceLevel": null,
  "isClosed": false,
  "isLongClosed": false,
  "openNowText": "Closed Now",
  "address": "2920 Zoo Drive Balboa Park, San Diego, CA 92101",
  "addressObj": {
    "street1": "2920 Zoo Drive",
    "street2": "Balboa Park",
    "city": "San Diego",
    "state": "CA",
    "country": "United States",
    "postalcode": "92101"
  },
  "phone": "+1 619-231-1515",
  "email": null,
  "website": "https://zoo.sandiegozoo.org/",
  "webUrl": "https://www.tripadvisor.com/Attraction_Review-g60750-d104122-Reviews-San_Diego_Zoo-San_Diego_California.html",
  "sourceUrl": "https://www.tripadvisor.com/Attraction_Review-g60750-d104122-Reviews-San_Diego_Zoo-San_Diego_California.html",
  "ancestors": [
    {
      "subcategory": [
        {
          "key": "municipality",
          "name": "Municipality"
        }
      ],
      "name": "San Diego",
      "abbrv": null,
      "location_id": "60750"
    },
    {
      "subcategory": [
        {
          "key": "state",
          "name": "State"
        }
      ],
      "name": "California",
      "abbrv": "CA",
      "location_id": "28926"
    },
    {
      "subcategory": [
        {
          "key": "country",
          "name": "Country"
        }
      ],
      "name": "United States",
      "abbrv": null,
      "location_id": "191"
    }
  ],
  "photo": {
    "id": "326743187",
    "caption": "",
    "uploadedDate": "2018-06-25T16:03:16-0400",
    "publishedDate": "2018-06-25T16:03:16-0400",
    "helpfulVotes": 12,
    "images": {
      "small": {
        "width": "250",
        "url": "https://media-cdn.tripadvisor.com/media/photo-f/13/79/b4/93/20180426-104539-largejpg.jpg",
        "height": "141"
      },
      "thumbnail": {
        "width": "50",
        "url": "https://media-cdn.tripadvisor.com/media/photo-t/13/79/b4/93/20180426-104539-largejpg.jpg",
        "height": "50"
      },
      "original": {
        "width": "1280",
        "url": "https://media-cdn.tripadvisor.com/media/photo-m/1280/13/79/b4/93/20180426-104539-largejpg.jpg",
        "height": "720"
      },
      "large": {
        "width": "1024",
        "url": "https://media-cdn.tripadvisor.com/media/photo-w/13/79/b4/93/20180426-104539-largejpg.jpg",
        "height": "576"
      },
      "medium": {
        "width": "550",
        "url": "https://media-cdn.tripadvisor.com/media/photo-s/13/79/b4/93/20180426-104539-largejpg.jpg",
        "height": "309"
      }
    },
    "user": {
      "userId": null,
      "memberId": "0",
      "type": "user"
    }
  },
  "image": "https://media-cdn.tripadvisor.com/media/photo-m/1280/13/79/b4/93/20180426-104539-largejpg.jpg",
  "photos": [],
  "photoCount": 16780,
  "awards": [],
  "hours": {
    "week_ranges": [
      [
        {
          "open_time": 540,
          "close_time": 1200
        }
      ],
      [
        {
          "open_time": 540,
          "close_time": 1200
        }
      ],
      [
        {
          "open_time": 540,
          "close_time": 1080
        }
      ],
      [
        {
          "open_time": 540,
          "close_time": 1080
        }
      ],
      [
        {
          "open_time": 540,
          "close_time": 1080
        }
      ],
      [
        {
          "open_time": 540,
          "close_time": 1080
        }
      ],
      [
        {
          "open_time": 540,
          "close_time": 1200
        }
      ]
    ],
    "timezone": "America/Los_Angeles"
  },
  "amenities": [],
  "hotelClass": null,
  "hotelClassAttribution": null,
  "specialOffers": null,
  "roomTips": [],
  "cuisine": [],
  "dietaryRestrictions": [],
  "mealTypes": [],
  "establishmentTypes": [],
  "dishes": [],
  "subCuisine": [],
  "menuWebUrl": null,
  "booking": {
    "provider": "Viator",
    "url": "https://www.tripadvisor.com/Commerce?url=https%3A%2F%2Fwww.viator.com%2Ftours%2Fx%2Fy%2Fd0-3097ZOO_TR%3Feap%3Dmobile-web-11383%26aid%3Dtripen1&partnerKey=1&urlKey=0b13a8a4fc06f7f7b&logme=true&uidparam=refid&attrc=true&Provider=Viator&area=TOP&slot=1&cnt=1&geo=104122&clt=TM&from=api&nt=true"
  },
  "reserveInfo": null,
  "ratingHistogram": {
    "count_1": "247",
    "count_2": "485",
    "count_3": "1949",
    "count_4": "6031",
    "count_5": "23236"
  },
  "reviews": [],
  "query": null,
  "language": "en",
  "currency": "USD",
  "scrapedAt": "2026-09-24T12:46:36.020239+00:00"
}
```

The most useful fields are `id`, `name`, `type`, `category`, `rating`, `numReviews`, `addressObj`, `latitude`, `longitude`, `webUrl`, `photo`, `photos`, and the category-specific arrays. Fields that Tripadvisor does not expose for a place remain `null` or empty arrays.

### Pricing

The Actor uses pay-per-event pricing. You are charged only for each unique place item successfully saved to the Dataset. Searches, URLs, failed place requests, and runs with no delivered place rows do not create a place-result charge. If a run reaches its maximum charge limit, it returns only the rows that fit within that limit.

| Apify tier | Price per delivered place | Equivalent price per 1,000 delivered places |
|---|---:|---:|
| FREE | $0.001 | $1.00 |
| BRONZE | $0.0009 | $0.90 |
| SILVER | $0.0008 | $0.80 |
| GOLD | $0.00075 | $0.75 |
| PLATINUM | $0.00075 | $0.75 |
| DIAMOND | $0.00075 | $0.75 |

The billable unit is one delivered place; the per-1,000 amounts are comparison equivalents. Apify determines the tier and applies its configured price. When source collection is incomplete, successfully saved place rows are still billable and the run ends as failed so partial data is not mistaken for a complete collection.

### Related Actors

| Actor | Best for |
|---|---|
| [Google Maps Business Scraper | $1 per 1,000](https://apify.com/datascraperes/actor-google-maps) | Comparing Tripadvisor hotels, restaurants, and attractions with business listings from Google Maps. |
| [Google Maps Reviews Scraper | Ratings & Replies](https://apify.com/datascraperes/google-maps-reviews-scraper) | Adding Google Maps review text, ratings, and owner replies to a cross-platform place research workflow. |

### Limits and data quality

- `maxItemsPerQuery` accepts up to 10,000 places for each query or URL target when `collectAll` is disabled, and `startUrls` accepts at most 20 URLs.
- With `collectAll` enabled, pagination continues until the source is exhausted or `maxTotalItemsPerRun` is reached. That safety cap defaults to 10,000 and accepts up to 50,000 places per run.
- A direct place URL returns one record. A category URL and a geographic search can return fewer records when the source has fewer usable places, a category is disabled, or a target has no results.
- Results are deduplicated across the complete run by Tripadvisor `location_id`.
- Search ordering and category contents can change with query wording, language, currency, location, source updates, and time.
- Opening hours, phone numbers, websites, rankings, awards, photos, prices, amenities, and category-specific fields are source-dependent and may be missing.
- `maxPhotosPerPlace` adds a bounded photo request and can increase runtime; `0` keeps only the primary photo included in the place detail.
- Tripadvisor may temporarily restrict access or return incomplete data. If the Actor cannot complete the requested collection, the run fails rather than silently treating missing records as complete; any rows already delivered remain available in the Dataset.
- The `reviews` array contains only review previews exposed with the place detail. It is not a complete review archive and does not apply review-language, rating, translation, or date filters.
- Date-sensitive hotel offers, AI review summaries, nearby expansion, tags, and lead-enrichment options are outside this first places contract.
- Persistent source failures or incomplete detail hydration fail the run rather than claiming `Completed` with silently missing records.

### Frequently asked questions

#### Can I submit a normal Tripadvisor place URL?

Yes. Use a public place URL containing its Tripadvisor location ID, normally the `d` segment in a hotel, restaurant, attraction, or activity URL. The Actor extracts the ID and requests the structured place details directly.

#### Can a search return hotels, restaurants, and attractions together?

Yes. When a search resolves to a geographic location, the three category switches control which groups are included. The Actor interleaves enabled categories before hydrating details so a small limit does not consume the whole Dataset with only one category.

#### Does this Actor collect all Tripadvisor reviews?

No. It returns the small review preview that can be included in place details. Use the separate review-focused Actor when the goal is complete review pagination and review filters.

#### Why did my run return fewer items than the limit?

The limit is a maximum, not a guarantee. The source may expose fewer eligible places, filters may disable categories, duplicates may be removed, or the source may return incomplete data. A persistent incomplete collection fails the run so it is not mistaken for a complete result.

#### Are prices and hotel offers guaranteed?

No. The Actor preserves price fields when Tripadvisor exposes them for a place and requested currency, but it does not promise date-specific availability or booking offers.

### Responsible use

Use this Actor only for lawful purposes and in accordance with applicable laws, privacy obligations, database rights, and the terms governing the source data. You are responsible for deciding whether collecting, storing, combining, and using the output is permitted for your use case.

Protect exported Datasets, minimize retention, avoid excessive collection, and honor applicable deletion or opt-out requests.

### Support

If a run does not behave as expected, open an issue in the Actor's **Issues** tab. Include the run ID, a sanitized reproducible input, the expected result, and the observed result. Do not post credentials, cookies, or confidential information.

For Python, JavaScript and cURL integration examples, see the [public companion repository](https://github.com/datacrawler-edu/tripadvisor-places-scraper-python).

# Actor input Schema

## `query` (type: `string`):

The easiest input. Search any country, city, region, neighborhood, hotel, restaurant, attraction, or activity. Include the country after a comma when a locality name could be ambiguous.

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

Alternative to search text. Paste one or more public Tripadvisor URLs from any country domain. Place URLs return one item; category URLs are paginated up to maxItemsPerQuery, or until the source is exhausted when collectAll is enabled.

## `maxItemsPerQuery` (type: `integer`):

Maximum unique places returned for each search or URL when collectAll is disabled. A direct place URL always returns one place. Maximum 10,000.

## `collectAll` (type: `boolean`):

When enabled, continue paginating each search or category URL until the source is exhausted or maxTotalItemsPerRun is reached. This may take longer and use more memory and budget.

## `maxTotalItemsPerRun` (type: `integer`):

Safety cap for collectAll runs across all targets. It prevents an unexpectedly broad source from running without a bound. Maximum 50,000.

## `includeHotels` (type: `boolean`):

Include hotel listings when a search resolves to a geographic location or when a category URL is used.

## `includeRestaurants` (type: `boolean`):

Include restaurant listings when a search resolves to a geographic location or when a category URL is used.

## `includeAttractions` (type: `boolean`):

Include attractions, things to do, and activities when a search resolves to a geographic location or when an attractions category URL is used.

## `language` (type: `string`):

Two-letter language code for the returned place details, for example en, es, fr, de, pt, or ja. Regional forms are normalized to their language code.

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

Three-letter currency code for currency-sensitive values, for example USD, EUR, GBP, JPY, or BRL. Custom ISO-style codes are accepted.

## `maxPhotosPerPlace` (type: `integer`):

Additional photos to fetch for each place. Set to 0 to keep only the primary photo exposed in the place details.

## Actor input object example

```json
{
  "query": "Madrid, Spain",
  "maxItemsPerQuery": 1,
  "collectAll": false,
  "maxTotalItemsPerRun": 10000,
  "includeHotels": true,
  "includeRestaurants": true,
  "includeAttractions": true,
  "language": "en",
  "currency": "USD",
  "maxPhotosPerPlace": 0
}
```

# Actor output Schema

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

Structured Tripadvisor places, deduplicated by location ID.

# 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 = {
    "query": "Madrid, Spain",
    "maxItemsPerQuery": 1,
    "collectAll": false,
    "maxTotalItemsPerRun": 10000,
    "includeHotels": true,
    "includeRestaurants": true,
    "includeAttractions": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascraperes/tripadvisor-places-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 = {
    "query": "Madrid, Spain",
    "maxItemsPerQuery": 1,
    "collectAll": False,
    "maxTotalItemsPerRun": 10000,
    "includeHotels": True,
    "includeRestaurants": True,
    "includeAttractions": True,
}

# Run the Actor and wait for it to finish
run = client.actor("datascraperes/tripadvisor-places-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 '{
  "query": "Madrid, Spain",
  "maxItemsPerQuery": 1,
  "collectAll": false,
  "maxTotalItemsPerRun": 10000,
  "includeHotels": true,
  "includeRestaurants": true,
  "includeAttractions": true
}' |
apify call datascraperes/tripadvisor-places-scraper --silent --output-dataset

```

## MCP server setup

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