Lists the business locations of a Business Profile account: name, address, phone, categories, website, open status and Maps links.
curl -X POST "https://api.primaryapi.com/v1/run/google-business.locations" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"accountId":"2345678901","limit":1}'{
"output": {
"found": true,
"data": {
"nextCursor": "eyJ0IjoiQ0FFUUFRIn0",
"locations": [
{
"name": "locations/9876543210",
"hasVoiceOfMerchant": true,
"title": "Example Coffee",
"storeCode": "SF-01", …
}
],
"accountId": "2345678901"
}
},
"credits": 1
}Input and output
5 fields
2345678901.1.20 fields
Good to know
Runs as your connected Google account. Needs the Google Business Profile capability.
Get accountId from google-business.accounts.
A personal account lists only the locations it owns directly. Locations shared through a location group or organization are listed under that account.
An account with no locations is a miss. An unknown account account_not_found.
Google grants Business Profile API access per Cloud project, on request. Until it has granted PrimaryAPI’s, calls are refused (as a permission error, never charged).
One page per call. Send nextCursor back as cursor to read the next page.
The same key and credits work for every API.