# Does Tripadvisor have an API? After the Content API sunset

> Tripadvisor's Content API is deprecated; its Terra API bills $0.015 per location. Our Tripadvisor API lists 30 places per call, at 1 credit.

- URL: https://toolzerhub.com/blog/tripadvisor-api
- Published: 2026-11-04
- Publisher: ToolzerHub (we sell the API this post describes)

## Short answer

- Tripadvisor retired its Content API and free 5,000 calls a month. The Terra API replaces it, with 1,000 free locations once per account.
- After that, Terra bills each location it returns, from $0.015 down to $0.009, so a 90-restaurant city list costs about $1.35.
- Our Tripadvisor API lists a city's hotels or restaurants, 30 per call with rating, review count, phone and address, at 1 credit a call.

Yes, but not the one most guides describe. Tripadvisor's Content API, with its free 5,000 calls a month, is deprecated, and its keys were sunset on August 31, 2026. The Terra API replaces it and bills every location it returns. For a city's hotels or restaurants as JSON at 1 credit per 30 places, our Tripadvisor API reads the public list pages.

## What Tripadvisor's Terra API is for

[Terra](https://docs.terra.tripadvisor.com/docs/faq) is Tripadvisor's API for showing its locations, ratings and a sample of reviews inside your own site or app. Its FAQ says the old keys were "sunset and API keys deprecated on August 31, 2026". Discover, the self-serve package, gives 1,000 billable locations free once per account, then $0.015 each, falling to $0.009 above 5,000 in a billing cycle. Larger packages go through Tripadvisor's sales team. If you are building a branded Tripadvisor widget, Terra is the route.

## Tripadvisor city lists with ToolzerHub

We make ToolzerHub. Our [Tripadvisor API](https://toolzerhub.com/apis/tripadvisor) has two routes, each 1 credit a call:

- `/v1/tripadvisor/list`: a city's hotels, restaurants or attractions, 30 per call
- `/v1/tripadvisor/detail`: one hotel or restaurant from its page link

```bash
export TOOLZERHUB_API_KEY=your_key
curl -H "x-api-key: $TOOLZERHUB_API_KEY" \
  "https://api.toolzerhub.com/v1/tripadvisor/list?kind=restaurants&city_url=https://www.tripadvisor.com/Restaurants-g187147-Paris_Ile_de_France.html"
```

`city_url` is any Tripadvisor page for the city. The third restaurant on the first Paris page, trimmed:

```json
{
  "location_slug": "Paris_Ile_de_France",
  "kind": "restaurants",
  "offset": 0,
  "next_offset": 30,
  "results": [{
    "position": 3,
    "name": "Bistro L'Olivier",
    "location_id": "3159643",
    "rating": 4.8,
    "review_count": 3044,
    "price_range": "$$ - $$$",
    "telephone": "+33 1 46 06 46 14",
    "address": {"street_address": "88 Rue Ordener, 75018 Paris France", "postal_code": "75018"},
    "geo": {"latitude": 48.892815, "longitude": 2.342972}
  }]
}
```

Pass `next_offset` as `offset` for the next 30. `position` restarts at 1 on each page. Rows carry ratings and review counts, not review text.

## Export a city's restaurants to CSV

The script takes city page links, reads the number of pages you ask for and writes one row per place with its overall rank. For each city it prints how many places rate 4.5 or higher and the median review count. Install `requests` (`pip install requests`) and save it as `tripadvisor_city.py`.

```python
import csv
import os
import statistics
import sys
import time

import requests

URL = "https://api.toolzerhub.com/v1/tripadvisor/list"
HEADERS = {"x-api-key": os.environ.get("TOOLZERHUB_API_KEY", "")}
FIELDS = ["city", "kind", "rank", "name", "rating", "review_count", "price_range",
          "telephone", "street_address", "postal_code", "latitude", "longitude", "url"]


def get_page(city_url, kind, offset, tries=3):
    # Retry rate limits, server errors and dropped connections.
    params = {"city_url": city_url, "kind": kind, "offset": offset}
    for attempt in range(tries):
        last = attempt == tries - 1
        try:
            r = requests.get(URL, headers=HEADERS, params=params, timeout=120)
        except requests.RequestException:
            if last:
                raise
            time.sleep(5 * (attempt + 1))
            continue
        if r.status_code in (429, 500, 502, 503, 504) and not last:
            time.sleep(5 * (attempt + 1))
            continue
        r.raise_for_status()
        return r.json()["data"]


def main(city_urls, kind="restaurants", pages="2", out="tripadvisor.csv"):
    with open(out, "w", newline="", encoding="utf-8") as f:
        writer = csv.DictWriter(f, fieldnames=FIELDS)
        writer.writeheader()
        for city_url in filter(None, (u.strip() for u in city_urls.split(","))):
            rows, offset = [], 0
            for _ in range(int(pages)):
                data = get_page(city_url, kind, offset)
                if not data:
                    break
                rows += [{**r, "rank": offset + r["position"]} for r in data["results"]]
                if not data["next_offset"]:
                    break
                offset = data["next_offset"]
            city = data["location_slug"] if data else city_url
            for r in rows:
                address, geo = r.get("address") or {}, r.get("geo") or {}
                writer.writerow({
                    "city": city, "kind": kind, "rank": r["rank"], "name": r["name"],
                    "rating": r["rating"], "review_count": r["review_count"],
                    "price_range": r["price_range"], "telephone": r["telephone"],
                    "street_address": address.get("street_address"), "postal_code": address.get("postal_code"),
                    "latitude": geo.get("latitude"), "longitude": geo.get("longitude"),
                    "url": r["url"].split("?")[0],
                })
            reviews = [r["review_count"] for r in rows if r["review_count"] is not None]
            top = sum(1 for r in rows if (r["rating"] or 0) >= 4.5)
            print(f"{city}: {len(rows)} {kind}, {top} rated 4.5 or higher, "
                  f"median {statistics.median(reviews) if reviews else '-'} reviews, "
                  f"{sum(1 for r in rows if r['telephone'])} with a phone number")


if __name__ == "__main__":
    if len(sys.argv) < 2:
        sys.exit("usage: python tripadvisor_city.py <city page links, comma-separated> [hotels|restaurants] [pages] [out.csv]")
    if not HEADERS["x-api-key"]:
        sys.exit("set TOOLZERHUB_API_KEY first")
    main(*sys.argv[1:])
```

## What 360 restaurants showed

Three pages for each of four cities made 12 calls in 45 seconds and saved 360 restaurants:

```bash
python tripadvisor_city.py "https://www.tripadvisor.com/Restaurants-g187147-Paris_Ile_de_France.html,https://www.tripadvisor.com/Restaurants-g60763-New_York_City_New_York.html,https://www.tripadvisor.com/Restaurants-g298184-Tokyo_Tokyo_Prefecture_Kanto.html,https://www.tripadvisor.com/Restaurants-g189158-Lisbon_Lisbon_District_Central_Portugal.html" restaurants 3
```

| City | Restaurants | Rated 4.5+ | Median reviews | Average rating, ranks 1-10 | Average rating, ranks 11-90 |
|---|---|---|---|---|---|
| Paris | 90 | 62 | 1,177 | 4.41 | 4.56 |
| New York | 90 | 50 | 1,242 | 4.72 | 4.47 |
| Tokyo | 90 | 74 | 264 | 4.73 | 4.75 |
| Lisbon | 90 | 68 | 1,336 | 4.72 | 4.57 |

The list is Tripadvisor's own order, not a sort by rating. Paris opens with Bouillon Julien at 3.6 and Le Procope at 3.8, both with thousands of reviews, while 62 of the 90 rate 4.5 or higher. Sort the CSV by `rating` and `review_count` for a best-rated list. Tokyo's places have far fewer reviews: 12 of its 90 have under 100, against one or none elsewhere.

## What it costs

A 90-place city list is 3 credits here. On Terra, the same 90 locations are 90 billable entities, about $1.35 at the first tier once the free 1,000 are used. The 100 free credits a month cover 33 such lists; $19 buys 10,000 credits that never expire, and [plans for higher volume](https://toolzerhub.com/pricing) cover a weekly sweep of many cities. Set your key and the first city is a CSV in under a minute.

For hotel prices, see the [Google Hotels API](https://toolzerhub.com/blog/google-hotels-api). For reviews of places, see the [Google reviews API](https://toolzerhub.com/blog/google-maps-reviews-api).

We are not affiliated with Tripadvisor.
