API Tutorial
How to read & reply to Google Business comments via API
To reply to Google Business comments via API, connect Google Business through Modiva, list comments with `comments_list`, then post a response with `comments_reply` — useful for support, moderation and AI auto-replies.
Managing Google Business engagement at scale means pulling comments and replying without a human in every loop. Modiva exposes `comments_list` and `comments_reply` so you can build moderation, support or AI-assisted reply workflows on Google Business with the same two calls you'd use anywhere.
Step by step
Create a Modiva account and MCP key
Sign up free and generate an MCP key (`mk_live_…`) from the dashboard. The same key authenticates both the hosted MCP server (for AI agents) and the REST API (for your backend), so you only manage one credential.
Connect your Google Business account
From the dashboard, click Connect and choose Google Business. Modiva runs the OAuth flow and requests the right scopes for you, then stores the access + refresh tokens in an encrypted vault and keeps them fresh — you never handle Google Business's raw API credentials. The connection gets a stable `connectionId` you reference in every call.
List comments with comments_list
Call `comments_list` with the connection ID and a post ID to pull recent Google Business comments, including author, text and timestamps — paginated and normalised to the same shape across every platform.
Respond with comments_reply
Call `comments_reply` with the target `comment_id` and your text. Over MCP, an AI agent can read the thread, draft a contextual reply and post it back to Google Business automatically — great for first-line support and community management.
Example request
Call the comments_reply tool through Modiva’s REST API. The same tool is available to AI agents over the MCP server at https://mcp.modiva.ai/v1.
curl -X POST https://api.modiva.ai/v1/tools/invoke \
-H "Authorization: Bearer mk_live_…" \
-H "Content-Type: application/json" \
-d '{
"tool": "comments_reply",
"connectionId": "conn_…",
"args": { "comment_id": "c_123", "text": "Thanks for the kind words! 🙏" }
}'Try it with Google Business
Start freeFAQ
Can I auto-reply to Google Business comments with AI?
Yes. Expose `comments_list` + `comments_reply` to an MCP client and the agent can read each Google Business comment and post a tailored response on its own.
Are comments returned in the same format across platforms?
Yes — Modiva normalises Google Business comments to a unified shape, so the same code handles comments on every connected platform.