Get a Tripadvisor restaurant API
A Tripadvisor restaurant: cuisines, price range, hours, sub-ratings, contact, menu link.
GET /v1/tripadvisor/restaurantBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tripadvisor/restaurant?url=%2FRestaurant_Review-g60763-d457808-Reviews-Daniel-New_York_City_New_York.html",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "location": { "locationId": 457808, "detail": { "info": { "localizedName": "Daniel", "placeType": "EATERY", "parentGeoId": 60763, "latitude": 40.766827, "longitude": -73.96756, "locationDescription": null, "isGeo": false, "streetAddress1": "60 East 65th Street", "streetAddress2": null, "parentGeo": { "…": "2 fields" }, "…": "8 more fields" } }, "reviewRatingAndCount": { "responseData": { "rating": 4.7, "count": 3452 } }, "__typename": "Content__LocationNode", "primaryMedia": { "shape": "NORMAL", "photo": { "id": 787556689, "photoSizes": [ "…" ], "photoSizeDynamic": { "…": "3 fields" } } }, "tcAwardForActiveYear": { "awardType": null, "year": null } }, "restaurant": { "name": "Daniel", "description": null, "telephone": "212 288 0033", "localizedRealtimeAddress": "60 East 65th Street, New York City, NY 10065", "url": "QU5yX2h0dHA6Ly93d3cuZGFuaWVsbnljLmNvbS9fbHFW", "price_range": { "currency": "USD", "min_price": 100, "max_price": 400 }, "isPremium": false, "topTags": [ { "id": 10954, "tag": { "…": "1 fields" }, "secondary_name": "$$$$", "webRoute": { "…": "1 fields" } }, "… 2 more" ], "cuisines": { "items": [ { "…": "3 fields" } ] }, "price_types": { "items": [ { "…": "3 fields" } ] }, "…": "13 more fields" }, "award": null}Parameters
| Name | Type | Description |
|---|---|---|
urlquery · required | string | The place: a Tripadvisor link or its path (/Hotel_Review-g60763-d93437-Reviews-…html), d93437, or the location id. Example: /Hotel_Review-g60763-d93437-Reviews-Hotel_Edison_Times_Square-New_York_City_New_York.html. |
languagequery | string | Language for names and reviews: en, fr, de-DE, … (default en-US). |
currencyquery | string | Currency for prices (default USD). |
Response fields
200 with a TripadvisorRestaurantResponse, in Tripadvisor’s own JSON.
| Field | Type | Description |
|---|---|---|
location | TripadvisorContentLocation | |
restaurant | object | |
award | object | null |
Status codes
| Status | Meaning |
|---|---|
200 | The restaurant. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No Tripadvisor place or destination like that. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Tripadvisor is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Tripadvisor is a trademark of its owner. We are not affiliated with or endorsed by it.