Get a place's reviews
curl --request POST \
--url https://api.stophy.dev/v1/tripadvisor/reviews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"place": "<string>",
"language": "en",
"ratings": [],
"limit": 20,
"cursor": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({place: '<string>', language: 'en', ratings: [], limit: 20, cursor: '<string>'})
};
fetch('https://api.stophy.dev/v1/tripadvisor/reviews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/tripadvisor/reviews"
payload = {
"place": "<string>",
"language": "en",
"ratings": [],
"limit": 20,
"cursor": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"reviews": [
{
"helpful": 0,
"id": "<string>",
"url": "<string>",
"rating": 123,
"title": "<string>",
"text": "<string>",
"language": "<string>",
"createdDate": "2023-12-25",
"publishedDate": "2023-12-25",
"stayDate": "2023-12-25",
"tripType": "<string>",
"subRatings": [
{
"rating": 123,
"name": "<string>"
}
],
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true,
"address": {
"full": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"contributions": 0
},
"ownerReply": {
"text": "<string>",
"publishedDate": "2023-12-25",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
}
}
}
],
"place": {
"id": "<string>",
"name": "<string>",
"type": "<string>",
"url": "<string>"
},
"total": 0,
"cursor": "<string>"
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Tripadvisor
Tripadvisor reviews API
Call the Tripadvisor reviews API to get place, total and reviews, as JSON or markdown. 1 credit per 20 items, at least 1 credit.
POST
/
v1
/
tripadvisor
/
reviews
Get a place's reviews
curl --request POST \
--url https://api.stophy.dev/v1/tripadvisor/reviews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"place": "<string>",
"language": "en",
"ratings": [],
"limit": 20,
"cursor": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({place: '<string>', language: 'en', ratings: [], limit: 20, cursor: '<string>'})
};
fetch('https://api.stophy.dev/v1/tripadvisor/reviews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/tripadvisor/reviews"
payload = {
"place": "<string>",
"language": "en",
"ratings": [],
"limit": 20,
"cursor": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"reviews": [
{
"helpful": 0,
"id": "<string>",
"url": "<string>",
"rating": 123,
"title": "<string>",
"text": "<string>",
"language": "<string>",
"createdDate": "2023-12-25",
"publishedDate": "2023-12-25",
"stayDate": "2023-12-25",
"tripType": "<string>",
"subRatings": [
{
"rating": 123,
"name": "<string>"
}
],
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true,
"address": {
"full": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"contributions": 0
},
"ownerReply": {
"text": "<string>",
"publishedDate": "2023-12-25",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
}
}
}
],
"place": {
"id": "<string>",
"name": "<string>",
"type": "<string>",
"url": "<string>"
},
"total": 0,
"cursor": "<string>"
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
tripadvisor.reviews - Returns:
datahasplace,total,reviews. - Cost: 1 credit per 20 items, at least 1 credit. Failed calls cost nothing.
- Paging: Yes. Send the
cursorfrom the response to get the next page. See Paging.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.tripadvisor.reviews({ place: "https://www.tripadvisor.com/Hotel_Review-g60763-d224832-Reviews-The_Peninsula_New_York-New_York_City_New_York.html" });
console.log(result.data.place);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.tripadvisor.reviews(place="https://www.tripadvisor.com/Hotel_Review-g60763-d224832-Reviews-The_Peninsula_New_York-New_York_City_New_York.html")
print(result["data"]["place"])
curl -X POST https://api.stophy.dev/v1/tripadvisor/reviews \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"place":"https://www.tripadvisor.com/Hotel_Review-g60763-d224832-Reviews-The_Peninsula_New_York-New_York_City_New_York.html"}'
stophy tripadvisor reviews https://www.tripadvisor.com/Hotel_Review-g60763-d224832-Reviews-The_Peninsula_New_York-New_York_City_New_York.html
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json