Tripadvisor reviews
Reviews of a hotel, restaurant or attraction: id, title, text, rating, language (and original language when machine translated), publish date, trip type, visit month, helpful votes, sub-ratings, photos, URL, author (name, username, profile, avatar, hometown, contributions) and the owner's response, with raw. Filters as on the site: language, rating, trip type, months of visit, and a word in the text. total counts the reviews matching the filters; pass next_page back as page (null on the last page). Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
id | string | Tripadvisor location id (d-number), e.g. 93437; or pass url. Example: 93437 |
url | string | A Tripadvisor place URL (instead of id; also sets type). |
type | hotel | restaurant | attraction | attraction_product | Kind of place: hotel (default with id), restaurant, attraction or attraction_product. |
page | integer | Page number. Pass next_page back as page; null on the last page. Example: 1 |
limit | integer | Reviews per page (1-20, default 10). |
language | string | Review language, e.g. en, fr, de, zh-TW; all for every language. Default: the market's mix as on the site. |
rating | string | Star ratings to keep, comma-separated, e.g. 5 or 1,2. |
sort | recent | detailed | insightful | default | recent (default), detailed, insightful or default (the site's order). |
trip_type | string | Trip types, comma-separated: family, couples, solo, business, friends. |
months | string | Months of visit, comma-separated numbers 1-12. |
q | string | Only reviews mentioning this word or phrase. |
domain | com | co.uk | de | fr | it | es | in | Tripadvisor market: com (default), co.uk, de, fr, it, es or in. Names, prices, currency and review translations follow the market. Default: com |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/tripadvisor/v1/reviews?id=93437" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/tripadvisor/v1/reviews",
params={"id": "93437"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/tripadvisor/v1/reviews");
url.searchParams.set("id", "93437");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).