Google Reviews API (Paginated)
Fetch multiple pages of Google Reviews in a single request with automatic pagination handling.
Overview
Simplified Pagination
This endpoint handles pagination automatically. Just specify how many pages you want (1-10) and get all reviews in a single response.
The Google Reviews Paginated endpoint provides seamless access to multiple pages of customer reviews from Google's platform. Instead of managing pagination tokens, simply specify the number of pages you want (up to 10), and receive all reviews aggregated in a single response. Perfect for applications that need comprehensive review data without the complexity of pagination management.
Endpoint URL
Legacy Endpoint Available
The token-based pagination endpoint (/reviews) is still available for backward compatibility. For new integrations, we recommend using this paginated endpoint.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data_id | string | Required | Google Maps data_id for the place (e.g., 0x80c8c430cb5147bd:0x82f2c7c5d9d10d84) |
| pages | integer | Optional | Number of pages to fetch (1-10). Default: 1. Each page contains ~10 reviews. The endpoint automatically handles pagination internally. |
| sort_by | string | Optional | Sort order for reviews. Options: newest, most_relevant (default), highest_rating, lowest_rating |
| hl | string | Optional | Language code for reviews (e.g., en, es, fr). Default: en |
Response Structure
Success Response (200 OK)
{
"success": true,
"data_id": "0x80c8c430cb5147bd:0x82f2c7c5d9d10d84",
"place_name": "Bellagio Hotel & Casino",
"place_address": "3600 Las Vegas Blvd S, Las Vegas, NV 89109",
"total_reviews": 139601,
"average_rating": 4.7,
"reviews": [
{
"review_id": "ChdDSUhNMG9nS0VJQ0FnSURiOTlySm1RRRAB",
"rating": 5,
"text": "Amazing hotel with fantastic fountains and excellent service...",
"date": "a week ago",
"language": "en",
"photos": [],
"reviewer": {
"name": "John Smith",
"profile_picture": "https://lh3.googleusercontent.com/...",
"reviews_count": 25,
"local_guide": false
},
"likes": 3,
"owner_response": "Thank you for your wonderful review...",
"owner_response_date": "3 days ago"
},
{
"review_id": "ChdDSUhNMG9nS0VJQ0FnSURiOTlySm1RRRAQ",
"rating": 4,
"text": "Great location on the Strip, beautiful rooms...",
"date": "2 weeks ago",
"reviewer": {
"name": "Maria Garcia",
"reviews_count": 10,
"local_guide": true
},
"likes": 1
}
// ... more reviews from multiple pages
],
"total_fetched_reviews": 28,
"pages_requested": 3,
"pages_fetched": 3,
"has_more": true,
"search_metadata": {
"datetime": "2025-01-25T10:30:00Z"
}
}
Response Fields
- total_fetched_reviews: NEW - Total number of reviews returned in this response
- pages_requested: NEW - Number of pages you requested
- pages_fetched: NEW - Actual number of pages fetched (may be less if no more reviews)
- data_id: Google Maps data_id for the place
- place_name: Name of the business
- total_reviews: Total number of reviews for the place on Google
- average_rating: Overall rating of the business (1-5)
- reviews: Array of review objects from all fetched pages
- has_more: Whether more reviews are available beyond the fetched pages
Common Use Cases
📊 Reputation Management
Monitor and analyze customer feedback across your hotel portfolio. Track sentiment trends, identify common complaints, and respond to reviews promptly.
# Get recent reviews to monitor feedback
reviews = get_google_reviews(place_id, sort='newest')
negative_reviews = [r for r in reviews if r['rating'] <= 2]
# Alert management about negative reviews requiring response
🔍 Competitive Analysis
Compare review ratings and feedback between competing hotels. Identify strengths and weaknesses to improve your service offering.
# Compare reviews across competitors
competitors = ['ChIJ...', 'ChIK...', 'ChIL...']
for place_id in competitors:
reviews = get_google_reviews(place_id)
avg_rating = calculate_average_rating(reviews)
print(f"Competitor {place_id}: {avg_rating} stars")
💬 Content Enhancement
Display authentic Google Reviews on your website to build trust with potential customers and improve conversion rates.
# Display top reviews on hotel page
top_reviews = get_google_reviews(place_id, sort='highest_rating')
featured_reviews = top_reviews[:5] # Show top 5 reviews
render_reviews_widget(featured_reviews)
Simplified Pagination
This endpoint handles pagination automatically. Simply specify the number of pages you want (1-10), and get all reviews in a single response. No need to manage pagination tokens!
# Get multiple pages of reviews in one request
params = {
'data_id': '0x80c8c430cb5147bd:0x82f2c7c5d9d10d84',
'pages': 3, # Get 3 pages (~30 reviews) in one call
'sort_by': 'newest'
}
response = requests.get(
'https://api.stayapi.com/v1/google_reviews/reviews-paginated',
params=params,
headers={'X-API-Key': 'YOUR_API_KEY'}
)
data = response.json()
print(f"Requested {data['pages_requested']} pages")
print(f"Fetched {data['pages_fetched']} pages")
print(f"Total reviews received: {data['total_fetched_reviews']}")
# All reviews are already aggregated
for review in data['reviews']:
print(f"{review['reviewer']['name']}: {review['rating']} stars")
Benefits of Paginated Endpoint:
- ✓ No pagination token management
- ✓ Get up to 100 reviews in a single API call
- ✓ Automatic aggregation across pages
- ✓ Clear metadata about pagination status
Error Handling
| Code | Type | Description |
|---|---|---|
| 400 | INVALID_PLACE_ID | The provided Place ID is invalid or malformed |
| 404 | PLACE_NOT_FOUND | No business found with the provided Place ID |
| 429 | RATE_LIMITED | Too many requests. Please retry after the specified time |
| 500 | INTERNAL_ERROR | Server error. Please try again later |
| 502 | UPSTREAM_ERROR | Error fetching data from Google Reviews |
Rate Limits
This endpoint is subject to the standard API rate limits based on your subscription tier.
- ✓ Free tier: 10 requests/day
- ✓ Basic: 1,000 requests/day
- ✓ Pro: 10,000 requests/day
- ✓ Enterprise: Custom limits
Related Endpoints
curl -X GET "https://api.stayapi.com/v1/google_reviews/reviews-paginated?data_id=0x80c8c430cb5147bd:0x82f2c7c5d9d10d84&pages=3&sort_by=newest" \ -H "X-API-Key: YOUR_API_KEY"
const response = await fetch( "https://api.stayapi.com/v1/google_reviews/reviews-paginated?" + new URLSearchParams({ data_id: "0x80c8c430cb5147bd:0x82f2c7c5d9d10d84", pages: 3, // Get 3 pages of reviews sort_by: "newest" }), { headers: { "X-API-Key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(`Fetched ${data.total_fetched_reviews} reviews across ${data.pages_fetched} pages`); data.reviews.forEach(review => { console.log(`${review.reviewer.name}: ${review.rating} stars`); console.log(review.text); });
import requests params = { "data_id": "0x80c8c430cb5147bd:0x82f2c7c5d9d10d84", "pages": 3, # Get 3 pages of reviews in one call "sort_by": "newest" } response = requests.get( "https://api.stayapi.com/v1/google_reviews/reviews-paginated", params=params, headers={"X-API-Key": "YOUR_API_KEY"} ) data = response.json() print(f"Fetched {data['total_fetched_reviews']} reviews") print(f"Pages: {data['pages_fetched']} of {data['pages_requested']}") for review in data['reviews']: reviewer = review['reviewer'] print(f"{reviewer['name']}: {review['rating']} stars") print(f"Review: {review['text'][:100]}...") if review.get('owner_response'): print(f"Owner response: {review['owner_response'][:100]}...")
$dataId = "0x80c8c430cb5147bd:0x82f2c7c5d9d10d84"; $params = [ "data_id" => $dataId, "pages" => 3, // Get 3 pages of reviews "sort_by" => "newest" ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.stayapi.com/v1/google_reviews/reviews-paginated?" . http_build_query($params)); curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: YOUR_API_KEY"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $data = json_decode($response, true); echo "Fetched " . $data["total_fetched_reviews"] . " reviews\n"; echo "Pages: " . $data["pages_fetched"] . " of " . $data["pages_requested"] . "\n"; foreach ($data["reviews"] as $review) { $reviewer = $review["reviewer"]; echo $reviewer["name"] . ": " . $review["rating"] . " stars\n"; echo "Review: " . substr($review["text"], 0, 100) . "...\n"; }
{ "success": true, "data_id": "0x80c8c430cb5147bd:0x82f2c7c5d9d10d84", "place_name": "Bellagio Hotel & Casino", "place_address": "3600 Las Vegas Blvd S, Las Vegas, NV 89109", "total_reviews": 139601, "average_rating": 4.7, "reviews": [ { "review_id": "ChdDSUhNMG9nS0VJQ0FnSURiOTlySm1RRRAB", "rating": 5, "text": "Amazing hotel with fantastic fountains. The rooms are beautiful and the staff is incredibly friendly...", "date": "a week ago", "language": "en", "photos": [], "reviewer": { "name": "John Smith", "profile_picture": "https://lh3.googleusercontent.com/a-/ALV-...", "reviews_count": 25, "local_guide": false }, "likes": 3, "owner_response": "Thank you for your wonderful review! We are delighted you enjoyed your stay.", "owner_response_date": "3 days ago" }, { "review_id": "ChdDSUhNMG9nS0VJQ0FnSURiOTlySm1RRRAC", "rating": 4, "text": "Great location on the Strip. The conservatory is beautiful...", "date": "2 weeks ago", "reviewer": { "name": "Maria Garcia", "reviews_count": 10, "local_guide": true } } // ... more reviews from multiple pages ], "total_fetched_reviews": 28, "pages_requested": 3, "pages_fetched": 3, "has_more": true, "search_metadata": { "datetime": "2025-01-25T10:30:00Z" } }
{ "type": "https://api.stayapi.com/errors/invalid-parameters", "title": "Invalid Parameters", "status": 400, "detail": "data_id is required", "instance": "/v1/google_reviews/reviews-paginated", "provider": "google_reviews", "error_code": "INVALID_PARAMETERS", "correlation_id": "req_abc123" }