Posting a reply to a Google review through the API is a single request. Getting permission to send it is the hard part.
Google requires a verified Business Profile that has been active for 60+ days, with a website listed, plus an approved "Application for Basic API Access". Reading reviews is one call (up to 50 per page). A reply can be at most 4,096 bytes.
This post covers the access checklist, the limits that bite, and a design for an LLM reply agent that does not embarrass the business.
Access checklist
Per Google's prerequisites page:
- A Google Cloud project.
- A verified Business Profile (yours or a client's), active 60+ days, with a website.
- A submitted Application for Basic API Access (contact form, with your project number, from an email that owns or manages the profile).
- After approval, enable the Business Profile APIs for the project.
Check approval in the Cloud console: a quota of 0 queries per minute means not approved yet, 300 means approved. If it is 0, submit the access application instead of asking for a quota increase.
Two gotchas:
- Over-quota requests return HTTP 429. Google recommends exponential backoff with jitter.
- On Google Workspace accounts, an admin must enable Search and/or Maps with Business Profile, otherwise replies return 403.
The review endpoints live in the older v4 API on mybusiness.googleapis.com. Check Google's deprecation schedule before building anything long-lived.
Finding the IDs
# accounts
curl -H "Authorization: Bearer ACCESS_TOKEN" \
"https://mybusinessaccountmanagement.googleapis.com/v1/accounts"
# locations (readMask is required)
curl -H "Authorization: Bearer ACCESS_TOKEN" \
"https://mybusinessbusinessinformation.googleapis.com/v1/accounts/ACCOUNT_ID/locations?readMask=name,title"
OAuth scope: https://www.googleapis.com/auth/business.manage. The v4 review path is accounts/ACCOUNT_ID/locations/LOCATION_ID.
Agent design
Refresh OAuth token
|
GET reviews (50 per page, newest first)
|
Skip reviews that already have a reviewReply
|
Stop words (refund, lawyer, injured ...) -> flag for the owner, no draft
|
Draft reply with the LLM (model may answer HOLD -> flag for the owner)
|
1-3 stars, or DRY_RUN on -> print the draft, post nothing
|
4-5 stars and DRY_RUN off -> PUT the reply, log the review
Choices worth copying even if you rewrite the code:
-
Dry run by default. Nothing posts until
DRY_RUN=0. - Only 4-5 star reviews can be auto-posted. Everything lower is draft-only.
-
The model can say HOLD. The prompt tells it to output
HOLDfor health, money, legal or safety content; the script treats that as "owner decides". - No generic fallback reply. If the model call fails, skip the review instead of posting boilerplate.
- A log file prevents double replies.
The prompt rules that matter: use the reviewer's first name if given, mention one specific detail, under 90 words, no discounts, no admitting legal fault, no private details, and for 1-3 stars thank them and invite direct contact.
Note: the full script in the original article is a template written from Google's and Groq's documentation and has not been run against a live profile. Read it, run it in dry-run mode, and test on your own reviews first.
Full code and strategy
The complete Python script (about 150 lines, stdlib only) and the policy side (what Google and the FTC allow, which reviews a human should always handle) are here:
If you serve local businesses and would rather not manage API approval, a hosted setup already has it: AI review management.
Top comments (0)