Restaurants in a destination API
Restaurants in a destination with cuisine, meal, price and diet filters, paginated.
GET /v1/tripadvisor/restaurantsBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tripadvisor/restaurants?q=New%20York%20City",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "geo": { "geoId": 60763, "name": "New York City" }, "restaurants": [ { "locationId": 478965, "name": "Gallaghers Steakhouse", "detailPageRoute": { "url": "/Restaurant_Review-g60763-d478965-Reviews-Gallaghers_Steakhouse-New_York_City_Ne…" }, "location": { "geoPoint": { "…": "2 fields" }, "distance": null }, "menu": { "menuUrl": "https://www.gallaghersnysteakhouse.com/menu.php", "hasProvider": false }, "offers": { "hasDelivery": false, "hasReservation": true, "slot1Offer": { "…": "10 fields" }, "slot2Offer": null, "restaurantSpecialOffer": null }, "cuisines": { "items": [ "…" ] }, "establishmentTypes": { "items": [ "…" ] }, "priceTypes": { "items": [ "…" ] }, "openHours": { "openStatus": "OPEN", "openStatusText": "Open now", "schedule": { "…": "7 fields" } }, "…": "11 more fields" }, "… 29 more" ], "facets": { "onlineOptions": { "name": "Online options & offers", "items": [ { "…": "6 fields" }, "… 2 more" ] }, "cuisines": { "name": "Cuisines", "items": [ { "…": "6 fields" }, "… 99 more" ] }, "diets": { "name": "Dietary restrictions", "items": [ { "…": "6 fields" }, "… 4 more" ] }, "diningOptions": { "name": "Features", "items": [ { "…": "6 fields" }, "… 38 more" ] }, "dishes": { "name": "Dishes", "items": [ { "…": "6 fields" }, "… 99 more" ] }, "establishmentTypes": { "name": "Establishment type", "items": [ { "…": "6 fields" }, "… 8 more" ] }, "mealTypes": { "name": "Meal type", "items": [ { "…": "6 fields" }, "… 3 more" ] }, "michelinAwards": { "name": "MICHELIN Guide", "items": [ { "…": "6 fields" }, "… 4 more" ] }, "restaurantSpecialOffer": null, "minimumTravelerRating": { "name": "Traveler rating", "items": [ { "…": "4 fields" }, "… 2 more" ] }, "…": "7 more fields" }, "sorts": [ { "is_applied": false, "key": "POPULARITY", "title": "Highest Rating", "tooltip": "Highest rated restaurants on Tripadvisor, based on reviews." }, "… 2 more" ], "total": 10000, "pagination": { "next_cursor": "eyJnIjo2MDc2MywibyI6MzB9", "has_more": true }}Parameters
| Name | Type | Description |
|---|---|---|
qquery · required | string | The destination: a city or region name (the first match is used), a geo id (60763 or g60763), or a Tripadvisor link to it. Example: New York City. |
cuisinequery | "any" | "italian" | "french" | "indian" | "chinese" | "japanese" | "mexican" | "seafood" | "steakhouse" | "cafe" | One of any, italian, french, indian, chinese, japanese, mexican, seafood, steakhouse, cafe. |
meal_typequery | "any" | "breakfast" | "lunch" | "dinner" | "brunch" | One of any, breakfast, lunch, dinner, brunch. |
price_levelquery | "any" | "cheap" | "moderate" | "expensive" | "fine_dining" | One of any, cheap, moderate, expensive, fine_dining. |
dietary_restrictionquery | "any" | "vegetarian" | "vegan" | "gluten_free" | "halal" | "kosher" | One of any, vegetarian, vegan, gluten_free, halal, kosher. |
open_nowquery | "true" | "false" | Only restaurants open now. One of true, false. |
online_reservationsquery | "true" | "false" | Only restaurants that take reservations. One of true, false. |
languagequery | string | Language for names and reviews: en, fr, de-DE, … (default en-US). |
afterquery | string | Cursor: the previous page’s pagination.next_cursor. |
Response fields
200 with a TripadvisorRestaurantsResponse, in Tripadvisor’s own JSON.
| Field | Type | Description |
|---|---|---|
geo | object | |
restaurants | object[] | |
facets | object | null | |
sorts | object[] | |
total | number | null | |
pagination | TripadvisorPagination |
Status codes
| Status | Meaning |
|---|---|
200 | A page of restaurants. |
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.