100 free credits. No credit card required. Get a key

Hotels in a destination API

Hotels in a destination with Tripadvisor’s filters, sorts and prices, paginated.

GET /v1/tripadvisor/hotelsBeta1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/tripadvisor/hotels?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"
},
"results": [
{
"hotelResultKey": "7778097:s:MzMxODA3Njk:07e457c3-c3e1-4c35-a43b-df461e10b743",
"locationId": 7778097,
"location": {
"url": "/Hotel_Review-g60763-d7778097-Reviews-EVEN_Hotel_New_York_Times_Square_South_by_…",
"reviewSummary": {
"…": "2 fields"
},
"thumbnail": {
"…": "4 fields"
},
"businessAdvantageSubscriptions": [
"…"
],
"locationV2": {
"…": "14 fields"
},
"accommodationCategory": "HOTEL",
"countryId": 191,
"isoCountryCode": "US",
"socialStatistics": {
"…": "1 fields"
}
},
"resultDetail": {
"businessAdvantageInfo": {
"…": "1 fields"
},
"amenities": {
"…": "1 fields"
},
"merchandisingLabels": [
"…"
],
"isNewListingTag": false,
"hotelMetaResult": {
"…": "12 fields"
}
},
"hotelHighlightLink": {
"webLinkUrl": "/HotelHighlight-g60763-d7778097-Reviews-EVEN_Hotel_New_York_Times_Square_South_b…"
}
},
"… 36 more"
],
"total": 1051,
"pagination": {
"next_cursor": "eyJnIjo2MDc2MywibyI6MzB9",
"has_more": true
}
}

Parameters

NameTypeDescription
qquery · requiredstringThe 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.
sort_byquery"BEST_VALUE" | "RANKED" | "PRICE_LOW_TO_HIGH" | "DISTANCE"Order (default BEST_VALUE). One of BEST_VALUE, RANKED, PRICE_LOW_TO_HIGH, DISTANCE.
price_minquerynumber | nullLowest nightly price.
price_maxquerynumber | nullHighest nightly price.
star_rating_minquery"0" | "1" | "2" | "3" | "4" | "5" | "any"Minimum hotel class in stars. One of 0, 1, 2, 3, 4, 5, any.
review_score_minquery"3" | "4" | "5" | "any" | "3.5" | "4.5"Minimum traveler rating. One of 3, 4, 5, any, 3.5, 4.5.
property_typequery"any" | "hotel" | "resort" | "apartment" | "villa" | "hostel" | "guest_house" | "bed_and_breakfast"Kind of property. One of any, hotel, resort, apartment, villa, hostel, guest_house, bed_and_breakfast.
currencyquerystringCurrency for prices (default USD).
afterquerystringCursor: the previous page’s pagination.next_cursor.
Response fields

200 with a TripadvisorHotelsResponse, in Tripadvisor’s own JSON.

FieldTypeDescription
geoobject
resultsobject[]
totalnumber | null
paginationTripadvisorPagination
Status codes
StatusMeaning
200A page of hotels.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No Tripadvisor place or destination like that.
429Too many requests. Wait for Retry-After seconds.
503Tripadvisor 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.