Install
openclaw skills install @maton/google-business-profileGoogle Business Profile API integration with managed OAuth. Read and manage business accounts and locations, business hours and attributes, reviews, photos, local posts, verification status, and performance metrics. Use this skill when users want to audit or update a business listing on Google.
openclaw skills install @maton/google-business-profileAccess the Google Business Profile API with managed OAuth authentication. Read business accounts and locations, manage listing details, read reviews and photos, and pull performance insights.
Safety: A Business Profile listing is public. Its name, address, hours, phone number, photos, and posts are what customers see on Google Search and Maps, and edits can propagate within minutes. Every write requires explicit user confirmation of the exact value being set. Confirm the specific location by title and address — never by location ID alone — because an account can hold many listings and the wrong one is a public error.
All access runs through the Maton gateway and the maton CLI.
maton login --oauth # authenticate once (OAuth, recommended)
maton connection create google-business-profile # connect the account (needs user approval)
maton api '/google-business-profile/v1/accounts' # first call
npm install -g @maton/cli
brew install maton-ai/cli/maton
maton login --oauth
Opens the OAuth login page in the browser and waits for authorization. Once complete, it creates a profile in config.toml (eg. $HOME/.config/maton/config.toml) and stores the access and refresh tokens in the operating system's credential store (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux), auto-renewed on expiry. The CLI reads them when it needs them; nothing else should.
maton login --interactive
Requires manually copying an API key from Settings, which is error prone. Once complete, it also creates a profile in config.toml and stores the key in the same credential store. It is preferred over export MATON_API_KEY=..., which exposes a long-lived credential to every child process. When MATON_API_KEY is set, it overrides the active profile. If the CLI cannot be installed at all, see Appendix: Environments Without the CLI for the raw HTTP form and the rules for handling the key.
maton whoami --json
{
"authenticated": true,
"profile_name": "alice@example.com",
"auth_type": "oauth"
}
authenticated is false, stop and login again via maton login --oauth.auth_type is api_key, it is recommended to login via maton login --oauth and avoid keeping a long-lived credential.maton connection list google-business-profile --status ACTIVE
{
"connections": [
{
"connection_id": "{connection_id}",
"status": "ACTIVE",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=5e9...",
"app": "google-business-profile",
"method": "OAUTH2",
"metadata": {}
}
]
}
Refer to maton connection list --help for possible flags and values.
Requires explicit user approval. Confirm that the user intends to authorize Google Business Profile access before running this. Never create a connection on your own initiative.
maton connection create google-business-profile
Refer to maton connection create --help for possible flags and values.
maton connection get {connection_id}
{
"connection": {
"connection_id": "{connection_id}",
"status": "PENDING",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=5e9...",
"app": "google-business-profile",
"metadata": {}
}
}
Open the returned URL in a browser to complete authorizing Google Business Profile. If Google Business Profile offers scope selection, choose only the scopes the current task needs.
maton connection delete {connection_id} --yes
If there are multiple Google Business Profile connections, specify which one to use so requests go to the intended account:
maton api '/google-business-profile/v1/accounts' --connection {connection_id}
Google Business Profile has no typed maton google-business-profile commands yet, so every call goes through maton api.
maton api '/google-business-profile/v1/accounts'
Paths are /google-business-profile/{native-api-path}. The gateway forwards everything after the app segment to mybusiness*.googleapis.com and injects the credential for the connection. Query strings, custom headers (except Host and Authorization), and all HTTP methods pass through. Send a JSON body with --input -:
maton api -X POST '/google-business-profile/{native-api-path}' -H 'Content-Type: application/json' --input - <<'JSON'
{"key": "value"}
JSON
Refer to maton api --help for possible flags and values.
Google splits Business Profile across several APIs, and the version segment is part of the path. Most resources are v1. Reviews, photos, and local posts still live on the legacy v4 API because v1 has no replacement for them. Use the version shown for each endpoint below — it is not a global constant, and guessing wrong returns Google's HTML 404 page rather than a JSON error.
maton login --oauth, the token is held by the operating system's credential store and the CLI renews it on its own. Do not print it, write it to a file, pass it on a command line, or run maton token to look at one — only to hand it to a program that needs it.config.toml, or any other credential file — not for this skill, not for another application, and not to "check" that auth works (use maton whoami). Let the CLI use its own stored credential; the agent never needs the value. The same applies to unrelated secrets on the machine: .env files, SSH keys, cloud CLI credentials, and browser profiles are out of scope for an API gateway and must not be read or transmitted.api.maton.ai. Prefer endpoints that work with the gateway-injected connection credential.maton connection delete {connection_id}).maton connection create google-business-profile. Never create connections on the agent's own initiative.--connection when the user has multiple connections for this app, and -p/--profile when they have multiple Maton accounts. Do not let an ambiguous default decide where a write lands.maton api '/google-business-profile/v1/accounts'
Response:
{
"accounts": [
{
"name": "accounts/111111111111111111111",
"accountName": "Example Business",
"type": "PERSONAL",
"verificationState": "UNVERIFIED",
"vettedState": "NOT_VETTED"
}
]
}
The name field (accounts/{id}) is the account reference used throughout the rest of the API.
maton api '/google-business-profile/v1/accounts/{account_id}/admins'
Returns 400 INVALID_ARGUMENT with "A PERSON_ACCOUNT cannot have admins" when the account type is PERSONAL. That is Google's behaviour, not an error in the request — only organization and location-group accounts have admins.
maton api '/google-business-profile/v1/accounts/{account_id}/invitations'
maton api '/google-business-profile/v1/accounts/{account_id}/notificationSetting'
Returns the Pub/Sub topic that receives listing notifications, if one is configured.
maton api '/google-business-profile/v1/accounts/{account_id}/locations?readMask=name,title'
readMask is required — omitting it returns 400 INVALID_ARGUMENT. Request only the fields you need.
Response:
{
"locations": [
{
"name": "locations/2222222222222222222",
"title": "Example Business"
}
]
}
maton api '/google-business-profile/v1/locations/{location_id}?readMask=name,title,storefrontAddress,phoneNumbers,websiteUri,categories,regularHours,metadata,profile'
readMask is required here too. Useful fields: title, storefrontAddress, phoneNumbers, websiteUri, categories, regularHours, specialHours, profile, metadata, serviceItems, labels.
The metadata block is read-only and worth checking before acting: canDelete, canModifyServiceList, canHaveBusinessCalls, hasVoiceOfMerchant, placeId, mapsUri, and newReviewUri.
PUBLIC WRITE — confirm the exact field and value with the user first. This changes what customers see on Search and Maps. Address and category edits can trigger re-verification.
maton api -X PATCH '/google-business-profile/v1/locations/{location_id}?updateMask=profile.description' -H 'Content-Type: application/json' --input - <<'JSON'
{
"profile": {
"description": "New business description"
}
}
JSON
updateMask is required and scopes the write. Only the fields named in it are touched — but any field named and omitted from the body is cleared, so send every field you list.
maton api '/google-business-profile/v1/locations/{location_id}/admins'
Response:
{
"admins": [
{
"name": "locations/2222222222222222222/admins/111111111111111111111",
"admin": "Example Business",
"role": "PRIMARY_OWNER",
"account": "accounts/111111111111111111111"
}
]
}
maton api '/google-business-profile/v1/categories?regionCode=US&languageCode=en&view=BASIC&pageSize=100'
view is BASIC or FULL. Category names look like categories/gcid:corporate_office.
maton api '/google-business-profile/v1/chains:search?chainName=starbucks'
maton api '/google-business-profile/v1/attributes?regionCode=US&languageCode=en&categoryName=categories/gcid:restaurant'
Returns the attribute metadata valid for a category — the allowed set differs per category, so query this before writing attributes to a location.
Searches all locations Google knows about, not just the ones the account manages. Use it to check whether a listing already exists before creating a duplicate, or to find a listing to claim.
This is a
POST, not aGET— aGETreturns Google's HTML 404 page.
maton api -X POST '/google-business-profile/v1/googleLocations:search' -H 'Content-Type: application/json' --input - <<'JSON'
{
"query": "starbucks seattle",
"pageSize": 3
}
JSON
Send either query (free text) or location (a partial Location object with title and storefrontAddress), not both.
Response:
{
"googleLocations": [
{
"name": "googleLocations/ChIJryqIewBrkFQRkWfQIS8mzpc",
"location": {
"title": "Starbucks Coffee Company",
"phoneNumbers": { "primaryPhone": "+1 206-448-8762" },
"storefrontAddress": {
"regionCode": "US",
"locality": "Seattle",
"administrativeArea": "WA",
"postalCode": "98101",
"addressLines": ["1912 Pike Place"]
},
"websiteUri": "https://www.starbucks.com/store-locator/store/11676/"
},
"requestAdminRightsUri": "https://business.google.com/arc/p/ChIJryqIewBrkFQRkWfQIS8mzpc"
}
]
}
requestAdminRightsUri is the link a user follows to claim a listing someone else owns. A search that matches nothing returns {}.
maton api '/google-business-profile/v1/locations/{location_id}/verifications'
Response:
{
"verifications": [
{
"name": "locations/2222222222222222222/verifications/0T0000000000000",
"state": "COMPLETED",
"createTime": "2026-05-20T19:10:03.549Z"
}
]
}
An unverified listing has sharply limited functionality, so check this before diagnosing why other endpoints return little data.
maton api '/google-business-profile/v1/locations/{location_id}/placeActionLinks'
Booking, ordering, and reservation links attached to the listing.
maton api '/google-business-profile/v1/locations/{location_id}/lodging?readMask=name'
Hotel-specific attributes. readMask is required. Any location that is not a lodging business returns:
{
"error": {
"code": 400,
"message": "This operation is not supported for this location. Please check the value of `Location.location_state.can_operate_lodging_data` before fetching or updating Lodging data.",
"status": "FAILED_PRECONDITION"
}
}
The can_operate_lodging_data field Google names here is not returned by the v1 location read, so there is no reliable way to pre-check it — treat this FAILED_PRECONDITION as the signal that the listing is not a hotel.
Metrics come from the Performance API and use : method syntax on the location.
maton api '/google-business-profile/v1/locations/{location_id}:getDailyMetricsTimeSeries?dailyMetric=WEBSITE_CLICKS&dailyRange.start_date.year=2026&dailyRange.start_date.month=7&dailyRange.start_date.day=1&dailyRange.end_date.year=2026&dailyRange.end_date.month=7&dailyRange.end_date.day=28'
The date range is passed as separate scalar query parameters, not an ISO string.
Response:
{
"timeSeries": {
"datedValues": [
{ "date": { "year": 2026, "month": 7, "day": 1 } }
]
}
}
A datedValue with no value key means zero for that day — Google omits the field rather than sending 0.
maton api '/google-business-profile/v1/locations/{location_id}:fetchMultiDailyMetricsTimeSeries?dailyMetrics=WEBSITE_CLICKS&dailyMetrics=CALL_CLICKS&dailyRange.start_date.year=2026&dailyRange.start_date.month=7&dailyRange.start_date.day=1&dailyRange.end_date.year=2026&dailyRange.end_date.month=7&dailyRange.end_date.day=28'
Repeat dailyMetrics once per metric. Common values: BUSINESS_IMPRESSIONS_DESKTOP_SEARCH, BUSINESS_IMPRESSIONS_MOBILE_SEARCH, BUSINESS_IMPRESSIONS_DESKTOP_MAPS, BUSINESS_IMPRESSIONS_MOBILE_MAPS, WEBSITE_CLICKS, CALL_CLICKS, BUSINESS_DIRECTION_REQUESTS, BUSINESS_CONVERSATIONS, BUSINESS_BOOKINGS.
maton api '/google-business-profile/v1/locations/{location_id}/searchkeywords/impressions/monthly?monthlyRange.start_month.year=2026&monthlyRange.start_month.month=6&monthlyRange.end_month.year=2026&monthlyRange.end_month.month=7'
Response:
{
"searchKeywordsCounts": [
{
"searchKeyword": "example business",
"insightsValue": { "threshold": "15" }
}
]
}
Low-volume keywords report insightsValue.threshold ("fewer than N") instead of an exact value. Handle both shapes.
Reviews have no v1 equivalent, so they use the legacy v4 path, which requires both the account and the location in the path.
maton api '/google-business-profile/v4/accounts/{account_id}/locations/{location_id}/reviews?pageSize=50&orderBy=updateTime%20desc'
orderBy accepts updateTime desc or rating desc (URL-encode the space). A location with no reviews returns {} — an empty object, not an empty array, so guard before iterating.
PUBLIC WRITE — this reply is visible to everyone on Google. Post only the user's exact approved wording.
maton api -X PUT '/google-business-profile/v4/accounts/{account_id}/locations/{location_id}/reviews/{review_id}/reply' -H 'Content-Type: application/json' --input - <<'JSON'
{
"comment": "Thank you for the feedback."
}
JSON
DESTRUCTIVE — irreversible, confirm first.
maton api '/google-business-profile/v4/accounts/{account_id}/locations/{location_id}/reviews/{review_id}/reply' -X DELETE
maton api '/google-business-profile/v4/accounts/{account_id}/locations/{location_id}/media'
Response:
{
"mediaItems": [
{
"name": "accounts/111111111111111111111/locations/2222222222222222222/media/AF1Qip...",
"mediaFormat": "PHOTO",
"locationAssociation": { "category": "ADDITIONAL" },
"googleUrl": "https://lh3.googleusercontent.com/...",
"thumbnailUrl": "https://lh3.googleusercontent.com/...",
"createTime": "...",
"dimensions": { "widthPixels": 0, "heightPixels": 0 }
}
],
"totalMediaItemCount": 1
}
PUBLIC WRITE — the photo appears on the listing. Confirm the image and its category first.
maton api -X POST '/google-business-profile/v4/accounts/{account_id}/locations/{location_id}/media' -H 'Content-Type: application/json' --input - <<'JSON'
{
"mediaFormat": "PHOTO",
"locationAssociation": { "category": "ADDITIONAL" },
"sourceUrl": "https://example.com/photo.jpg"
}
JSON
DESTRUCTIVE — irreversible, confirm first.
maton api '/google-business-profile/v4/accounts/{account_id}/locations/{location_id}/media/{media_id}' -X DELETE
maton api '/google-business-profile/v4/accounts/{account_id}/locations/{location_id}/localPosts'
Returns {} when the listing has no posts.
PUBLIC WRITE — a local post is published to the listing immediately. Confirm the full text, any call-to-action URL, and the schedule with the user before posting.
maton api -X POST '/google-business-profile/v4/accounts/{account_id}/locations/{location_id}/localPosts' -H 'Content-Type: application/json' --input - <<'JSON'
{
"languageCode": "en-US",
"summary": "Post text shown on the listing",
"topicType": "STANDARD",
"callToAction": {
"actionType": "LEARN_MORE",
"url": "https://example.com"
}
}
JSON
DESTRUCTIVE — irreversible, confirm first.
maton api '/google-business-profile/v4/accounts/{account_id}/locations/{location_id}/localPosts/{post_id}' -X DELETE
Most list endpoints use Google's standard pageSize / pageToken pattern. A response containing nextPageToken has more results; pass it back as pageToken.
maton api '/google-business-profile/v1/categories?regionCode=US&languageCode=en&view=BASIC&pageSize=100&pageToken={nextPageToken}'
Location lists also accept filter and orderBy. Performance endpoints are not paginated — they are bounded by the date range instead.
GET /v1/accounts to get the accounts/{id} reference, then list its locations. Both are needed for every v4 path.readMask is mandatory on location reads. Omitting it returns 400 INVALID_ARGUMENT rather than a default field set.name comes back as accounts/123 and locations/456; when a path already includes locations/, do not prefix the bare ID again.v4; everything else is v1. A wrong version returns Google's HTML 404 page instead of JSON — if a response starts with <!DOCTYPE html>, the path or version is wrong, not the data.{} rather than {"items": []} on several endpoints, so check before iterating.:getVoiceOfMerchantState. Verification status is available through /v1/locations/{location_id}/verifications instead.:someMethod are not all the same verb — chains:search and the Performance methods are GET, but googleLocations:search is a POST. Using the wrong verb returns Google's HTML 404 page, which looks exactly like a wrong path....year / ...month / ...day query parameters, not ISO strings.The CLI above is this skill's documented path; the SDKs are an optional way to call the same gateway from application code. The two modes keep separate credential stores: the CLI uses the profile from maton login, while an SDK program signs in once with login(), which opens a browser and stores a session that Maton() reads. Google Business Profile has no typed accessor yet, so calls go through the api passthrough, which takes the app and the path after it.
Python
pip install maton-ai
from maton_ai import Maton, login
# login()
maton = Maton()
# maton = Maton(api_key="...")
result = maton.api.get("google-business-profile", "/v1/accounts")
JavaScript
npm install @maton/sdk
import { Maton, login } from "@maton/sdk";
// await login()
const maton = new Maton();
// const maton = new Maton({ apiKey: "..." });
const result = await maton.api.get("google-business-profile", "/v1/accounts");
| Status | Meaning |
|---|---|
| 400 | Missing Google Business Profile connection |
| 401 | Invalid, missing, or expired Maton credential |
| 429 | Rate limited (10 requests/second per account) |
| 500 | Internal Server Error |
| 4xx/5xx | Passthrough error from the Google Business Profile API |
Errors from Google Business Profile are passed through with their original status codes and response bodies.
maton whoami --json
"authenticated": false — login again with maton login --oauth."auth_type": "api_key" — prefer maton login --oauth so no long-lived key sits on the machine.maton whoami is the check.Then confirm the app is connected:
maton connection list google-business-profile --status ACTIVE
Paths passed to maton api must start with /google-business-profile/:
maton api '/google-business-profile/v1/accounts'maton api '/v1/accounts'A 500 may mean the Google Business Profile authorization expired. With the user's approval, create a new connection (maton connection create google-business-profile) and complete authorization; once it is ACTIVE, delete the stale connection so the gateway uses the new one.
A 500 from the gateway usually means the connection's OAuth grant can no longer be refreshed, not that the API is down. List connections, and if more than one is ACTIVE, retry with an explicit Maton-Connection header. Delete and recreate any connection that still fails.
maton api.--paginate walks every page and -q/--jq trims the response before it reaches you. On typed commands, --jq requires --json.maton api; Host and Authorization are set by the gateway.Everything above uses the CLI, which holds the credential itself and never exposes it to the caller. Use the raw HTTP form below only where the CLI cannot be installed — a locked-down container, a CI step, a sandbox with no package manager. If maton is available, maton api does the same job without handling a secret.
Calling api.maton.ai directly means holding a long-lived Maton API key in the process environment, where it is readable by every child process and easy to leak into logs, crash dumps, shell history, and pasted output. Handle it accordingly:
[ -n "$MATON_API_KEY" ] && echo "MATON_API_KEY is set" || echo "MATON_API_KEY is not set"
.env, or a script makes it permanent. Let the environment that starts the session supply it — a CI secret store, a container secret, a secrets manager.ps output and shell history. Read it from the environment inside the process that makes the request, as below.api.maton.ai. It is not a credential for Google Business Profile or any other third-party host.The request is a plain HTTPS call to host api.maton.ai at path /google-business-profile/{native-api-path} with a bearer token; the gateway swaps in the connected app's credential. Add a Maton-Connection: {connection_id} header to pin a specific connection when the account has more than one. Query values must be URL-encoded. The Python standard library is enough — the key is read from the environment inside the process, so it never appears on a command line:
python3 - <<'PY'
import json, os, urllib.request
GATEWAY = "https://api.maton.ai"
req = urllib.request.Request(GATEWAY + "/google-business-profile/v1/accounts")
req.add_header("Authorization", "Bearer " + os.environ["MATON_API_KEY"])
req.add_header("User-Agent", "maton-google-business-profile-skill/1.2")
# req.add_header("Maton-Connection", "{connection_id}")
with urllib.request.urlopen(req) as resp:
print(json.dumps(json.load(resp), indent=2))
PY
For a write, set method="POST" (or PUT/DELETE) on the Request, pass the JSON-encoded body as data=, and add a Content-Type: application/json header.
The same rules as the CLI apply to every request made this way: read-only calls first, and explicit user confirmation before any POST, PUT, PATCH, or DELETE.