Updated Oct 2026
Google reviews API in Python: three ways, with working code
There are two official Google reviews APIs, and they answer different questions. The Places API returns up to 5 public reviews of any place for an API key. The Business Profile API returns every review of the locations you own and lets you reply, but only through OAuth and only after Google approves your project. This guide shows both in Python with requests, then the same job through Prisma, which is what we use when the reviews live on more than one platform. Background on the two APIs: Google reviews API: Places vs Business Profile. The same guide exists for Node.js, PHP and Java.
pip install requests google-auth google-auth-oauthlib1. Places API: 5 reviews of any place (API key)
The Places API (New) returns reviews as a field of a place. You need an API key with the Places API enabled, and the place ID (from the Place ID finder or a Text Search call).
import os, requests
PLACE_ID = "ChIJN1t_tDeuEmsRUsoyG83frY4"
r = requests.get(
f"https://places.googleapis.com/v1/places/{PLACE_ID}",
headers={
"X-Goog-Api-Key": os.environ["GOOGLE_MAPS_API_KEY"],
"X-Goog-FieldMask": "displayName,rating,userRatingCount,reviews",
},
timeout=30,
)
r.raise_for_status()
place = r.json()
print(place["displayName"]["text"], place.get("rating"), place.get("userRatingCount"))
for rev in place.get("reviews", []):
print(rev["rating"], rev["authorAttribution"]["displayName"], rev.get("text", {}).get("text", ""))What you get: reviews with at most 5 entries, chosen by Google (“most relevant” by default), with rating, text, author and a relative time. What you don’t get: the other reviews, the owner’s replies, or any way to post one. Each call is billed as a Place Details request with the Pro field group, so cache the result. The Google Maps reviews API page covers pricing and limits.
2. Business Profile API: every review of your locations, with replies (OAuth)
Prerequisites, and they are the hard part: a Google Cloud project with the Business Profile APIs enabled, API access approved by Google (until then the quota is 0 requests per minute), and an OAuth client ID of type “Desktop app” for this script. The account that signs in must be an owner or manager of the profile.
Get a token
from google_auth_oauthlib.flow import InstalledAppFlow
SCOPES = ["https://www.googleapis.com/auth/business.manage"]
flow = InstalledAppFlow.from_client_secrets_file("client_secret.json", SCOPES)
creds = flow.run_local_server(port=0) # opens the browser once; store creds.refresh_token for later runs
H = {"Authorization": f"Bearer {creds.token}"}Find your account and location names
import requests
accounts = requests.get("https://mybusinessaccountmanagement.googleapis.com/v1/accounts", headers=H, timeout=30).json()["accounts"]
account = accounts[0]["name"] # "accounts/1234567890"
locs = requests.get(
f"https://mybusinessbusinessinformation.googleapis.com/v1/{account}/locations",
headers=H, params={"readMask": "name,title"}, timeout=30,
).json()["locations"]
location = locs[0]["name"] # "locations/9876543210"
print(locs[0]["title"], location)List every review, page by page
Reviews still live on the v4 endpoints, under accounts/{account}/locations/{location}:
def all_reviews(account, location):
url = f"https://mybusiness.googleapis.com/v4/{account}/{location}/reviews"
token = None
while True:
r = requests.get(url, headers=H, params={"pageSize": 50, "pageToken": token}, timeout=30)
r.raise_for_status()
data = r.json()
yield from data.get("reviews", [])
token = data.get("nextPageToken")
if not token:
break
STARS = {"ONE": 1, "TWO": 2, "THREE": 3, "FOUR": 4, "FIVE": 5}
for rev in all_reviews(account, location):
print(STARS[rev["starRating"]], rev["reviewer"]["displayName"], rev.get("comment", ""), bool(rev.get("reviewReply")))Ratings come as the enum ONE to FIVE, not a number. Reviews without text have no comment. reviewReply.comment holds your existing reply.
Reply, edit or delete a reply
review_name = rev["name"] # "accounts/…/locations/…/reviews/…"
requests.put(f"https://mybusiness.googleapis.com/v4/{review_name}/reply", headers=H,
json={"comment": "Thank you, Laura. We've passed your note to the kitchen team."}, timeout=30).raise_for_status()
# the same PUT edits an existing reply; DELETE …/reply removes itLimits that bite in production: 300 queries per minute per project (shared across all your customers), 10 reply edits per minute per profile, 4,096 bytes per reply, and the whole thing stops working the day Google revokes or re-reviews the project. The quota guide covers backoff and the 429s.
3. Prisma: one key, Google and 50+ other platforms
The same two calls through Prisma. The owner connects the location once (OAuth for Google, handled by Prisma’s own approved project; a key or a listing URL on other platforms) and your code never touches Google tokens.
import os, requests
API = "https://api.prismareviews.com/v1"
H = {"Authorization": f"Bearer {os.environ['PRISMA_API_KEY']}"}
# every review, every platform, newest first; filter with platform=…, location_id=…, since=…, has_reply=false
cursor = None
while True:
r = requests.get(f"{API}/reviews", headers=H, params={"limit": 100, "cursor": cursor}, timeout=30)
r.raise_for_status()
data = r.json()
for rev in data["data"]:
print(rev["platform"], rev["rating"], rev["author"], rev["text"], rev["reply"] and rev["reply"]["status"])
cursor = data.get("next_cursor")
if not cursor:
break
# reply where the platform allows it; the job is queued and a reply.published webhook confirms it
requests.post(f"{API}/reviews/{rev['id']}/reply", headers=H,
json={"text": "Thank you, Laura. We've passed your note to the kitchen team."}, timeout=30).raise_for_status()The same fields come back whatever the platform: rating is always 1 to 5 (Google’s enum, Booking’s score out of 10 and Steam’s thumbs are all mapped), reply is the business reply with its status, url links to the review. A test key (pk_test_…) returns sample reviews from every platform, so the script runs before any real account is connected. Full reference: GET /v1/reviews and replies.
What’s true today, so you don’t build on a promise: Prisma reads Google reviews from the Google Maps listing (public reviews, read-only) while Google reviews Prisma’s own Business Profile API application; replies to Google reviews through Prisma start when that approval arrives. Replies already work by API on the App Store, Google Play, Judge.me, eBay, Trusted Shops, eKomi and others; the full list is on Platforms.
Which one to use
| You need | Use |
|---|---|
| Up to 5 public reviews of any place, no replies | Places API, section 1 |
| Every review of locations you own, with replies, Google only, and you can run the approval | Business Profile API, section 2 |
| The same for Google plus other platforms, or no approval process on your side | Prisma, section 3 |
FAQ
Which Google reviews API should I use in Python?
Places API if you only need up to 5 public reviews of any place and no replies. Business Profile API if you own the locations and need every review plus replies, and you can wait for Google’s approval. A unified API such as Prisma if you need the same for several platforms or don’t want to run the approval yourself.
Is there a Python library for the Google reviews API?
Google’s google-api-python-client can call the Business Profile APIs through discovery documents, but plain requests with an OAuth token is simpler and is what this guide uses. The Places API (New) is a REST call with an API key.
Why does my Python code only return 5 Google reviews?
Because it calls the Places API, which returns at most 5 reviews per place and no owner replies. Every review of a location you own comes from the Business Profile API, which needs OAuth and an approved Google Cloud project.
Skip the approval queue for the other 50+ platforms.
2 locations free. Test keys return sample reviews, so the code above runs today.