---
title: "Tripadvisor Scraper or API: What You Get | Perceptlayer"
description: "A Tripadvisor scraper vs three 1-credit endpoints: a recorded search with location_id, type, rating and review_count, and the cost per place tracked."
url: https://perceptlayer.com/blog/tripadvisor-scraper-vs-api
---

[Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides)

# Tripadvisor Scraper or API: What You Get

7 Nov 2026 Perceptlayer 8 min read

A Tripadvisor scraper is code you write and keep running to search Tripadvisor, open hotel, restaurant and attraction pages, and pull out names, ratings, review counts and reviews from the HTML. The alternative is three Tripadvisor endpoints, `search`, `place` and `reviews`, that return that data as JSON for 1 credit per successful call. This post compares the two on a recorded search, shows which fields you get without writing a parser, prices a recurring watch per place, and gives a verdict per use case.

## Key takeaways

-   A recorded `GET /v1/tripadvisor/search` for `pizza rome` returned results with `position`, `location_id`, `name`, `type`, `location`, `url`, `rating` and `review_count`.
-   Both results in that recording were tours with `type: attraction`, not pizzerias. The search mixes place types unless you set `type` to `hotel`, `restaurant`, `attraction` or `destination`.
-   `place` and `reviews` both take a `location_id`, the same parameter name as the field in search results. In the recording, each result's `url` also contains its `location_id` after a `d`.
-   Checking 40 places once a day with one `place` call each costs 40 calls × 1 credit = 40 credits a day, 1,200 credits over 30 days. The 100 free credits on signup cover the 40 searches and the first day.
-   Every endpoint costs 1 credit per successful call; a failed call costs nothing and returns `X-Credits-Used: 0`.

## What would a Tripadvisor scraper have to handle?

A Tripadvisor scraper has three jobs: turn a name or a phrase into the right listing, read that listing's current numbers, and collect its reviews over time. Each job is a parser you write against pages you don't control, plus the scheduling, retries and storage around it. Travel listings add one wrinkle: hotels, restaurants, attractions and destinations are different kinds of page, so a scraper that handles one type well often needs separate parsing for the others.

Resolving a listing is the first parser. A search returns several candidates, and your code has to pick the one you meant and record an identifier that stays stable when the name or the URL slug changes. Reading the numbers is a second parser, per page type. Collecting reviews is the third and the most work: a popular attraction has thousands of reviews across many pages, so a recurring run needs an order, a stopping rule and a way to recognise reviews it already stored.

Around those parsers sits the operational layer: request pacing, retries with backoff, alerts when a run returns empty fields for a place that had numbers yesterday, and storage that keeps reviewers' personal details out. Read Tripadvisor's terms before you build a collector, and if a site blocks or challenges your traffic, stop rather than work around it. None of this is hard to build once. The cost is keeping it working every week after that.

## What does one Tripadvisor search call return?

One search call returns a ranked list of places, each with a `location_id`, its `type`, a human-readable `location`, the Tripadvisor `url`, an `image`, the `rating` and the `review_count`. Those are the fields a scraper's first parser would extract, already named and typed. The request takes a query `q` (up to 255 characters) and optional `locale`, `limit` and `type`. This is the recorded request:

```bash
curl "https://api.perceptlayer.com/v1/tripadvisor/search?q=pizza+rome&limit=3" \
  -H "X-API-Key: $API_KEY"
```

And the recorded response, trimmed:

```json
{
  "success": true,
  "data": {
    "query": "pizza rome",
    "results": [
      {
        "position": 1,
        "location_id": 11449818,
        "name": "Pompeii from Rome with Optional Mt. Vesuvius & Pizza Lunch",
        "type": "attraction",
        "location": "Rome, Lazio, Italy",
        …
        "url": "https://www.tripadvisor.com/AttractionProductReview-g187791-d11449818-Pompeii_from_Rome_with_Optional_Mt_Vesuvius_Pizza_Lunch-Rome_Lazio.html",
        "rating": 4.7,
        "review_count": 1617
      },
      {
        "position": 2,
        "location_id": 28122604,
        "name": "Rome Pizza & Gelato Class with Wine by Cooking Italy",
        "type": "attraction",
        …
        "rating": 5,
        "review_count": 1492
      }
    ]
  },
  "meta": {
    "endpoint_family": "search",
    "billable": true
  }
}
```

### What does the recording teach about the data?

Three details are worth building around. First, the query `pizza rome` returned a day tour and a cooking class, both `type: attraction`, not restaurants. A free-text search matches across place types, so set `type=restaurant` when you want pizzerias. Second, `rating` is `4.7` on one result and `5` on the other: read it as a number, not as a string with one decimal place. Third, `location_id` is an integer, and the `url` of each result contains it after a `d` ( `d11449818`, `d28122604`). Store the `location_id` as your key and the `url` as a reference.

### How do search, place and reviews fit together?

The three endpoints share one parameter name. Search results carry a `location_id` field, and both `GET /v1/tripadvisor/place` and `GET /v1/tripadvisor/reviews` require a `location_id` parameter. We only have a recorded search, so we can't show here what `place` or `reviews` return. Run both in the playground on the [Tripadvisor API page](https://perceptlayer.com/apis/tripadvisor) with an ID from a search before you write code against their fields.

| Endpoint | Required | Optional |
| --- | --- | --- |
| [`/v1/tripadvisor/search`](https://perceptlayer.com/apis/tripadvisor/search) | `q` (up to 255 characters) | `locale` (up to 10 characters), `limit`, `type` |
| [`/v1/tripadvisor/place`](https://perceptlayer.com/apis/tripadvisor/place) | `location_id` (integer) | `locale` (up to 10 characters) |
| [`/v1/tripadvisor/reviews`](https://perceptlayer.com/apis/tripadvisor/reviews) | `location_id` (integer) | `offset`, `limit`, `language` |

The `type` parameter takes one of `hotel`, `restaurant`, `attraction` or `destination`. The reviews endpoint pages with `offset` and `limit` and can narrow by `language`; check the page size you get in the playground rather than assuming one.

## How do a Tripadvisor scraper and the endpoints compare?

A scraper costs engineering time, hosting and the risk of breaking when a page changes; the endpoints cost 1 credit per successful call and return the same named fields every time. The table compares them on a recurring job: tracking a set of hotels, restaurants or attractions for rating and review changes.

|  | DIY Tripadvisor scraper | Tripadvisor endpoints |
| --- | --- | --- |
| Finding a place | Parse search results, pick the right one | `search` with `q`, narrowed by `type`; match on `location_id` |
| Place types | A parser per page type | One response shape, with a `type` field per result |
| Rating and volume | Parsed from each page | `rating` and `review_count` in every search result |
| Stable key | Extracted from the URL or page | `location_id`, an integer |
| Reviews | Parsed per page, paging found by you | `reviews` with `offset`, `limit` and `language` |
| Localisation | Your own handling per site version | `locale` on `search` and `place` |
| When the page changes | Parsers return blanks until fixed | Same JSON fields; no parser of yours to fix |
| Failures | Yours to detect | HTTP status and error code; a failed call costs 0 credits |
| Cost | Hosting and your time | 1 credit per successful call |

### What does tracking a place cost?

Cost follows calls, and every Tripadvisor call is 1 credit. Resolving each place is one search, done once. Tracking it can then go two ways. If you only need `rating` and `review_count`, a single search can return several places per call, so the cost per place depends on how many of your places one query returns. If you track a fixed list by ID, one `place` call per place per check is the predictable unit.

A worked example: a hotel group watching 40 competitor properties once a day spends 40 calls × 1 credit = 40 credits a day, 1,200 credits over 30 days and 14,600 over a year. The 100 free credits on signup cover the initial 40 searches and one day of the watch; after that you need a pack. The 50,000-credit Build pack covers the year with room for reviews calls. Adding a daily `reviews` call per place doubles the count to 80 credits a day. See [pricing](https://perceptlayer.com/pricing) for what credits cost and the [credits docs](https://docs.perceptlayer.com/credits) for how they're debited.

## How do you snapshot search results in code?

Store one row per result per day, keyed on `location_id`, and compare today's `rating` and `review_count` with yesterday's. This Python script runs a search per query with `type` set, and writes the fields that appear in the recorded response to a CSV file. It reads nothing else, so an unexpected response shape fails loudly instead of writing guesses.

```python
import csv
import datetime
import os

import requests

API = "https://api.perceptlayer.com/v1/tripadvisor/search"
HEADERS = {"X-API-Key": os.environ["API_KEY"]}
QUERIES = [("pizza rome", "restaurant"), ("cooking class rome", "attraction")]
FIELDS = ["position", "location_id", "name", "type", "location", "url", "rating", "review_count"]

today = datetime.date.today().isoformat()
with open("tripadvisor_snapshot.csv", "a", newline="") as f:
    writer = csv.writer(f)
    for q, place_type in QUERIES:
        r = requests.get(API, params={"q": q, "type": place_type}, headers=HEADERS, timeout=60)
        r.raise_for_status()
        print(q, "credits used:", r.headers.get("X-Credits-Used"))
        for result in r.json()["data"]["results"]:
            writer.writerow([today, q] + [result.get(k) for k in FIELDS])
```

`raise_for_status()` stops the run on an error before anything is written, and a failed call costs nothing. The JSON body names the problem: such as `invalid_parameters` (422) or `rate_limited` (429) with a `Retry-After` header. The [errors docs](https://docs.perceptlayer.com/errors) list every code. A client timeout is the one case to handle with care: the request may have succeeded and been billed, so don't retry it in a tight loop.

## Which route fits your job?

Pick by frequency and scope. A scraper's cost is ongoing upkeep across several page types; the endpoints' cost is one credit per call. These verdicts assume the job repeats. For a one-time look at a few places, open Tripadvisor in a browser.

-   **Watching a competitive set of hotels or restaurants**: resolve each `location_id` once with `search` and `type`, then check each place on a schedule. 1 credit per place per check.
-   **Mapping a market by rating and volume**: run `search` per category and city, store `rating` and `review_count` by `location_id`, and compare week to week.
-   **Reading what guests say**: call `reviews` with `offset` and `limit`, and `language` to keep one language per analysis run. Drop reviewers' names and profile details before you store anything.
-   **Building a travel agent that recommends places**: connect the Tripadvisor endpoints through the MCP server, as the [AI agents docs](https://docs.perceptlayer.com/ai-agents) describe, so the agent calls `search` with a `type` instead of reading pages.
-   **Learning to scrape**: practise on a site built for it, not on a review platform with real people's posts.

For hotel prices rather than reviews, [Hotel API: Expedia, Booking.com and Google Hotels](https://perceptlayer.com/blog/hotel-api-comparison) covers rate data. [Yelp Scraper or API](https://perceptlayer.com/blog/yelp-scraper-vs-api) runs the same comparison for local businesses, and the [reviews APIs](https://perceptlayer.com/verticals/reviews) page lists the other review sources. To see the fields for a place you care about, run `search` and then `place` in the playground on the [Tripadvisor API page](https://perceptlayer.com/apis/tripadvisor), then [get a free API key](https://perceptlayer.com/signup).

## APIs in this post

-   [Tripadvisor **1 credit per call** · 3 endpoints](https://perceptlayer.com/apis/tripadvisor)

## Frequently asked questions

### Is scraping Tripadvisor allowed?

That depends on Tripadvisor's terms, how you store and use the data, and the law where you operate, so read the terms and get legal advice for commercial use. Don't get around blocks or challenges. Ratings and review counts for a business are lower risk than personal data; leave reviewers' names, usernames and avatars out of anything you keep.

### How do I find a location\_id?

Run `GET /v1/tripadvisor/search` with the place's name and set `type` to narrow the results. Each result carries a `location_id`, an integer such as `11449818` in the recording. In that recording each result's `url` also contained its `location_id` after a `d`, but check that with your own links in the playground before relying on it.

### Why did a pizza search return tours?

The recorded search for `pizza rome` set no `type`, and both results came back as `type: attraction`: a day tour with a pizza lunch and a pizza-making class. A free-text search matches across place types. Set `type=restaurant` for restaurants, `hotel` for hotels, or `destination` for destinations, and check the `type` field on each result.

### Does a failed Tripadvisor call cost credits?

No. Only a successful response debits credits. A failed call returns an HTTP status and a JSON error with a `code`, a `message` and a `request_id`, plus `X-Credits-Used: 0`. Every successful response carries `X-Credits-Used` and `X-Credits-Remaining`, so a script can log what each run spent.

### How fast can I run a daily Tripadvisor job?

Limits are per account, shared by all its keys, and counted per minute. A free account gets 1 request a second (60 a minute), so 40 daily calls finish within a minute. Paying accounts run at least 5 requests a second. The [rate limits docs](https://docs.perceptlayer.com/rate-limits) list the rate each pack includes.

tripadvisor travel reviews scraping hospitality

## More from the blog

1.  [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 7 min read
    
    ## [Trustpilot Scraper or API: Ratings and Review History](https://perceptlayer.com/blog/trustpilot-scraper-vs-api)
    
    A Trustpilot scraper vs a 1-credit company-reviews call: the recorded Amazon response, its star breakdown, and 2,340 pages × 1 credit for a full history.
    
2.  [API guides](https://perceptlayer.com/blog/category/api-guides) 30 Oct 2026 Perceptlayer 8 min read
    
    ## [Yelp Scraper or API: Reviews Without the Upkeep](https://perceptlayer.com/blog/yelp-scraper-vs-api)
    
    A Yelp scraper vs three 1-credit endpoints: a recorded Gary Danko search whose alias feeds the reviews call, with rating, text, created\_at and next\_after.
    
3.  [API guides](https://perceptlayer.com/blog/category/api-guides) 15 Oct 2026 Updated 10 Nov 2026 Perceptlayer 7 min read
    
    ## [Google Maps Scraper or Places Data API: What You Get](https://perceptlayer.com/blog/google-maps-scraper-vs-api)
    
    Compare building a Google Maps scraper with the official Places API and place endpoints at 1 credit a call: fields, upkeep, terms and a verdict per use case.
