Search Tripadvisor API
Search Tripadvisor places (hotels, restaurants, attractions, cities, ships) with full details.
GET /v1/tripadvisor/searchBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tripadvisor/search?q=Plaza%20Hotel",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "query": "Plaza Hotel", "scope_geo_id": null, "results": [ { "locationId": 84095, "name": "Washington Plaza Hotel", "placeType": "ACCOMMODATION", "isGeo": false, "latitude": 38.906216, "longitude": -77.03116, "geoName": "Washington DC", "parentGeoId": 28970, "route": { "url": "/Hotel_Review-g28970-d84095-Reviews-Washington_Plaza_Hotel-Washington_DC_District_of_Colum…" }, "reviewSummary": { "rating": 4.3, "count": 3758, "ratingCounts": [ 104, 105, "… 3 more" ] }, "locationDescription": "Discover the fresh new feel of the Washington Plaza. Designed in 1962 by world-famous arch…", "__typename": "LocationInformation", "localizedStreetAddress": { "street1": "10 Thomas Circle NW", "fullAddress": "10 Thomas Circle NW, Washington DC, DC 20005" }, "neighborhoods": [ { "name": "Downtown" }, { "name": "Cleveland Park" } ], "…": "12 more fields" }, { "locationId": 84104, "name": "State Plaza Hotel", "placeType": "ACCOMMODATION", "isGeo": false, "latitude": 38.89624, "longitude": -77.04749, "geoName": "Washington DC", "parentGeoId": 28970, "route": { "url": "/Hotel_Review-g28970-d84104-Reviews-State_Plaza_Hotel-Washington_DC_District_of_Columbia.h…" }, "reviewSummary": { "rating": 4.3, "count": 2561, "ratingCounts": [ 54, 66, "… 3 more" ] }, "locationDescription": "Sleek and sophisticated, with impeccable service, the all-suite State Plaza Hotel offers a…", "__typename": "LocationInformation", "localizedStreetAddress": { "street1": "2117 E Street, N.W.", "fullAddress": "2117 E Street, N.W., Washington DC, DC 20037" }, "neighborhoods": [ { "name": "Cleveland Park" }, { "name": "Foggy Bottom - GWU - West End" } ], "…": "12 more fields" }, "… 8 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
qquery · required | string | What to search for. Example: Plaza Hotel. |
locationquery | 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. |
languagequery | string | Language for names and reviews: en, fr, de-DE, … (default en-US). |
limitquery | number | Results, 1-20 (default 10). |
Response fields
200 with a TripadvisorSearchResponse, in Tripadvisor’s own JSON.
| Field | Type | Description |
|---|---|---|
query | string | |
scope_geo_id | number | null | |
results | TripadvisorLocationInformation[] |
Status codes
| Status | Meaning |
|---|---|
200 | The matching places. |
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.