Xpersona
T

tripadvisor-api

CLAWHUB · Unverified

Query TripAdvisor location data (search, nearby, details, photos, reviews) straight from a shell with curl against the Terra REST API (terra.tripadvisor.com), instead of running the tripadvisor-mcp server — plus a no-API-key fallback that reads a location's public page through the fpx browser bridge. Use when you want TripAdvisor data without the MCP, in a script, or on a machine where the MCP isn't installed. Triggers on "check TripAdvisor", "TripAdvisor location/restaurant/hotel/attraction search, details, photos, reviews", or any TripAdvisor data request that should hit the API directly.

62
Rank
84
Safety
1.6k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17cjx1a349nz5apaqp02vgz4h85728z:tripadvisor-api
  1. Install using `clawhub skill install s17cjx1a349nz5apaqp02vgz4h85728z:tripadvisor-api` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/chrischall/tripadvisor-api before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-chrischall-tripadvisor-api/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

148,392 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: tripadvisor-api
description: >-
  Query TripAdvisor location data (search, nearby, details, photos, reviews)
  straight from a shell with curl against the Terra REST API
  (terra.tripadvisor.com), instead of running the tripadvisor-mcp server —
  plus a no-API-key fallback that reads a location's public page through the
  fpx browser bridge. Use when you want TripAdvisor data without the MCP, in
  a script, or on a machine where the MCP isn't installed. Triggers on "check
  TripAdvisor", "TripAdvisor location/restaurant/hotel/attraction search,
  details, photos, reviews", or any TripAdvisor data request that should hit
  the API directly.
---

# TripAdvisor Terra API via curl (no MCP)

TripAdvisor's **Terra** API (`terra.tripadvisor.com/api`) is a plain
API-key REST API reachable directly from a server or shell — no browser
bridge needed. This skill shells out to `curl` with the key in an
`X-API-Key` header, exactly as `tripadvisor-mcp`'s `src/client.ts` does.
Terra is the current API (the legacy Content API sunsets 2026-08-31); it
has **no write endpoints** — everything here is a read.

A second, smaller tier at the bottom covers the one thing Terra can't do
without a key: reading a location's core details from the public
consumer page via the `fpx` browser bridge.

## One-time setup: get a Terra key

```sh
# Prefer the env var tripadvisor-mcp itself reads (check its .env first):
grep -h TRIPADVISOR_API_KEY ~/git/tripadvisor-mcp/.env 2>/dev/null
export TRIPADVISOR_API_KEY='...'
```

If you don't have one: create a free **Discover**-tier key at
https://www.tripadvisor.com/developers (pay-as-you-go, 10 QPS / 10,000
calls/day). A **legacy** Content API key does NOT work here (and vice
versa) — a mismatched key gets a `403`.

## Core call pattern

```sh
BASE=https://terra.tripadvisor.com/api

curl -sS "$BASE/locations/search?query=Golden%20Gate%20Bridge" \
  -H "X-API-Key: $TRIPADVISOR_API_KEY" -H 'accept: application/json' \
  | jq '.data[].location | {id, name: (.names[] | select(.primary) | .value)}'
```

Every call needs just the two headers above — no session/cookie, no
mutual TLS. Ready-to-run recipes for all 6 endpoints are in
`references/terra-endpoints.md`.

## The one rule: resolve a location id first

Details/photos/reviews are keyed by numeric `location_id` — get one from
`ta_search_locations`'s equivalent, `GET /locations/search`, before
calling the id-scoped endpoints:

```sh
curl -sS "$BASE/locations/search?query=Golden+Gate+Bridge" \
  -H "X-API-Key: $TRIPADVISOR_API_KEY" | jq -r '.data[].location.id'
# 104675
```

## Response shapes (quick reference)

- List endpoints (`search`, `nearby`, `reviews`, `photos`) wrap results:
  `{"data": [...], "pagination": {"page","size","total_pages","total_elements"}}`.
- `GET /locations` (batch) and `GET /locations/{id}` (details) do **not**
  wrap in `pagination` — batch returns `{"data": [...]}`, details returns
  the location object directly.
- A **location** object keys `names`/`des

_meta.json

{
  "ownerId": "kn700jq4sjtf2anb0rk3ft4p7n856872",
  "slug": "tripadvisor-api",
  "version": "1.1.8",
  "publishedAt": 1791588429793
}

references/terra-endpoints.md

# Terra API endpoints (curl + jq)

All paths are relative to `$BASE=https://terra.tripadvisor.com/api`. Every
call carries `-H "X-API-Key: $TRIPADVISOR_API_KEY" -H 'accept: application/json'`
(shorthand `"${H[@]}"` below). Shapes captured live with a Discover-plan key;
transcribed from `tripadvisor-mcp`'s `src/tools/search.ts` + `src/tools/location.ts`
(each section names its source tool). All 6 are `GET`, all read-only.

```sh
BASE=https://terra.tripadvisor.com/api
H=(-H "X-API-Key: $TRIPADVISOR_API_KEY" -H 'accept: application/json')
```

Categories are `RESTAURANT` | `ATTRACTION` | `HOTEL` (uppercase). `size` on
list endpoints defaults to 20 and is **capped at 20**.

---

## 1. Location search (`ta_search_locations` / `src/tools/search.ts`)

`GET /locations/search` — `query` (1–500 chars) required; optional
`category`, `search_type` (default `NAME`), `country_code` (alpha-2),
`geo_name`, `postal_code` (takes precedence over `geo_name`), `locale`
(repeated), `page`, `size`.

```sh
curl -sS "${H[@]}" "$BASE/locations/search?query=Golden+Gate+Bridge&category=ATTRACTION" \
  | jq '[.data[] | {id: .location.id, name: (.location.names[] | select(.primary) | .value),
        geo: .location.geo, rating: .location.traveler_ratings.overall.rating}]'
```

Response: `{"data": [{"location": <Location>, "matched_value": {"language","value"}}], "pagination": {...}}`.

## 2. Nearby search (`ta_search_nearby` / `src/tools/search.ts`)

`GET /locations/nearby` — center is **exactly one** of:
`lat`+`lon`+`radius` (`unit=MI|KM`, default `MI`), `location_id`+`radius`,
or the box `sw_lat`,`sw_lon`,`ne_lat`,`ne_lon` (box mode ignores `radius`).
Plus optional `category`, `min_rating` (1.0–5.0), `include_photo` (bool),
`sort` (`distance`|`rating`), `page`, `size`, `locale`.

```sh
# lat/lon + radius
curl -sS "${H[@]}" "$BASE/locations/nearby?lat=37.8199&lon=-122.4783&radius=5&unit=MI&category=RESTAURANT&sort=rating" \
  | jq '[.data[] | {id: .location.id, name: (.location.names[] | select(.primary) | .value),
        distance_mi: .distance_miles, bearing}]'

# location_id + radius (reference location as center)
curl -sS "${H[@]}" "$BASE/locations/nearby?location_id=104675&radius=2&unit=KM&category=HOTEL" | jq '.data'

# bounding box
curl -sS "${H[@]}" "$BASE/locations/nearby?sw_lat=37.70&sw_lon=-122.55&ne_lat=37.85&ne_lon=-122.35&category=ATTRACTION" \
  | jq '.data'
```

Response item: `{"location": <Location>, "bearing", "distance_miles", "distance_kilometers"}`.

## 3. Batch multi-get (`ta_get_locations` / `src/tools/location.ts`)

`GET /locations` — repeated `id` param (1–50 ids), required; optional
`locale`. **No `pagination` wrapper.** Unknown/unlicensed ids are silently
omitted (not an error) — a malformed id, e.g. one exceeding int32, does 400.

```sh
curl -sS "${H[@]}" "$BASE/locations?id=104675&id=93520&id=423942" \
  | jq '[.data[] | {id, name: (.names[] | select(.primary) | .value)}]'
```

Response: `{"data": [<Location>, ...]}` — cheaper than N single-id c

references/web-fallback.md

# Web fallback: location detail via fpx (no API key)

Covers `ta_web_get_location` (`tripadvisor-mcp`'s `src/tools/web.ts` +
`src/web/parse.ts`) — the one solid endpoint on the consumer site, reached
with **no Terra key** by routing through your own signed-in browser tab.
Shapes captured live 2026-07-04; re-verify if parsing drifts (see
`docs/TRIPADVISOR-WEB-API.md` in the repo for the full recon).

Setup (once): see `../SKILL.md`'s "Fallback tier" section
(`fpx profile add tripadvisor --domain tripadvisor.com` + `fpx pair -p tripadvisor`).

## Canonical URL — works for every category

TripAdvisor canonicalizes on the `d<id>` segment; the `g<geo>` and the
`_Review` type prefix are corrected by a same-origin redirect that the
in-tab fetch follows. **One fixed URL form works whether the id is an
attraction, hotel, or restaurant** — no need to know the category up front:

```
https://www.tripadvisor.com/Attraction_Review-g1-d<locationId>-Reviews-a-a.html
```

## Fetch + parse

```sh
LOCATION_ID=104675
fpx get "https://www.tripadvisor.com/Attraction_Review-g1-d${LOCATION_ID}-Reviews-a-a.html" \
  -p tripadvisor > /tmp/ta-location.html

# The page embeds 3 application/ld+json blocks; the business node is the
# one with BOTH `name` and `aggregateRating` (its @type varies by category:
# LocalBusiness=attraction, LodgingBusiness=hotel, FoodEstablishment=restaurant).
python3 - /tmp/ta-location.html <<'PY'
import re, json, sys
html = open(sys.argv[1]).read()
for m in re.findall(r'<script[^>]*type=["\']application/ld\+json["\'][^>]*>(.*?)</script>', html, re.S | re.I):
    try:
        obj = json.loads(m.strip())
    except Exception:
        continue
    if isinstance(obj, dict) and 'name' in obj and 'aggregateRating' in obj:
        print(json.dumps(obj))
        break
PY
```

Pipe that single-line JSON into `jq` for a slim projection matching what
`ta_web_get_location` returns:

```sh
... | jq '{
  name, type: .["@type"], url,
  rating: (.aggregateRating.ratingValue | tonumber),
  review_count: .aggregateRating.reviewCount,
  best_rating: .aggregateRating.bestRating,
  telephone, image,
  latitude: .geo.latitude, longitude: .geo.longitude,
  same_as: .sameAs, address
}'
```

Example fields (attraction, `d104675`):

```jsonc
{
  "@type": "LocalBusiness",
  "name": "Golden Gate Bridge",
  "url": "https://www.tripadvisor.com/Attraction_Review-g60713-d104675-...html",
  "address": {"addressLocality": "San Francisco", "addressRegion": "California", "addressCountry": "US", "postalCode": "94129"},
  "aggregateRating": {"ratingValue": "4.7", "reviewCount": 49969, "bestRating": 5},
  "image": "https://dynamic-media-cdn.tripadvisor.com/media/photo-o/.../golden-gate-bridge.jpg?...",
  "telephone": "+1 415-921-5858",
  "geo": {"latitude": 37.820026, "longitude": -122.47859},
  "sameAs": "https://www.goldengate.org/"
}
```

## Limits

- No key-free search/typeahead endpoint exists — every plausible one
  (`/TypeAheadJson`, `/data/1.0/typeahead`, `/api/internal/1.14/t

skill-card.md

## Description:

Helps agents query TripAdvisor locations, photos, and reviews through the read-only Terra API, with a browser-assisted fallback for public location details.

This skill is ready for commercial/non-commercial use.

## Publisher:

[chrischall](https://clawhub.ai/user/chrischall)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and agents use this skill to look up TripAdvisor locations, nearby places, details, photos, and reviews without running an MCP server. Public location details can also be retrieved through a paired browser when an API key is unavailable.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: An API key may be exposed if printed from a local environment file or included in shared command output.

Mitigation: Set TRIPADVISOR_API_KEY using a secret manager or shell environment, and avoid printing or sharing the key.

Risk: Pairing the browser fetch bridge grants access to requests through the signed-in TripAdvisor tab.

Mitigation: Approve pairing only for the intended TripAdvisor profile and use the bridge only when needed.

## Reference(s):

- [TripAdvisor API skill release](https://clawhub.ai/chrischall/skills/tripadvisor-api)
- [TripAdvisor developer portal](https://www.tripadvisor.com/developers)
- [Terra endpoint recipes](artifact/references/terra-endpoints.md)
- [Browser fallback guide](artifact/references/web-fallback.md)
- [ContextMint Bridge releases](https://github.com/nullnet-app/contextmint-bridge/releases)

## Skill Output:

**Output Type(s):** [Text, JSON, Shell commands, Guidance]

**Output Format:** [Markdown guidance with shell examples and JSON location data]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Read-only location data; review text requires the API rather than the browser fallback.]

## Skill Version(s):

1.1.8 (source: ClawHub release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to tripadvisor-api and adjacent AI workflows.