Get a Tripadvisor hotel API
A Tripadvisor hotel: rating, sub-ratings, amenities, price range, contact, description.
GET /v1/tripadvisor/hotelBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/tripadvisor/hotel?url=%2FHotel_Review-g60763-d93437-Reviews-Hotel_Edison_Times_Square-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": 93437, "detail": { "info": { "localizedName": "Hotel Edison Times Square", "placeType": "ACCOMMODATION", "parentGeoId": 60763, "latitude": 40.759735, "longitude": -73.986153, "locationDescription": "Hotel Edison has been a staple of Times Square since its opening in 1931, when T…", "isGeo": false, "streetAddress1": "228 West 47th Street", "streetAddress2": null, "parentGeo": { "…": "2 fields" }, "…": "8 more fields" } }, "reviewRatingAndCount": { "responseData": { "rating": 3.9, "count": 18889 } }, "__typename": "Content__LocationNode", "primaryMedia": { "shape": "NORMAL", "photo": { "id": 678015390, "photoSizes": [ "…" ], "photoSizeDynamic": { "…": "3 fields" } } }, "tcAwardForActiveYear": { "awardType": null, "year": null } }, "hotel": { "businessAdvantageData": { "contactLinks": [ { "…": "7 fields" }, "… 1 more" ] }, "locationId": 93437, "name": "Hotel Edison Times Square", "geoName": "New York City", "parentGeoId": 60763, "photos": [ { "id": 732493465, "photoSizes": [ "…" ] }, "… 8 more" ], "thumbnail": { "id": 678015390, "photoSizes": [ { "…": "3 fields" }, "… 7 more" ] }, "route": { "url": "/Hotel_Review-g60763-d93437-Reviews-Hotel_Edison_Times_Square-New_York_City_New_…" }, "locationV2": { "bestAwardForActiveYearV2": null, "starRating": { "tags": [ "…" ] } }, "accommodationCategory": "HOTEL", "…": "6 more fields" }, "hotelInformation": { "walkScore": 100, "subRatings": { "cleanliness": 4.0722566, "location": 4.8392897, "value": 3.9377773, "service": 4.003078 } }, "amenities": { "highlightedAmenities": { "propertyAmenities": [ { "…": "3 fields" }, "… 7 more" ] } }, "priceRange": { "maximum": 813, "minimum": 164 }, "nearbyLocations": { "attractionCount": 453, "restaurantCount": 675, "distanceRange": 0.3, "distanceUnit": "MILES" }}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 TripadvisorHotelResponse, in Tripadvisor’s own JSON.
| Field | Type | Description |
|---|---|---|
location | TripadvisorContentLocation | |
hotel | object | |
hotelInformation | object | null | |
amenities | object | null | |
priceRange | object | null | |
nearbyLocations | object | null |
Status codes
| Status | Meaning |
|---|---|
200 | The hotel. |
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.