Google Business API
Schedule and automate Google Business Profile posts with Zernio API - Updates, CTAs, location management, reviews, and local SEO
Quick Reference
| Property | Value |
|---|---|
| Character limit | 1,500 |
| Images per post | 1 |
| Videos per post | Not supported |
| Image formats | JPEG, PNG only (WebP auto-converted) |
| Image max size | 5 MB |
| Image min dimensions | 400 x 300 px |
| Post types | Text, Text+Image, Text+CTA |
| Scheduling | Yes |
| Inbox (Reviews) | Yes (add-on) |
| Inbox (DMs/Comments) | No |
| Analytics | Yes |
Before You Start
Google Business Profile is not social media -- it's local SEO. Posts appear on Google Search, Google Maps, and Google Knowledge Panel. They contribute to local search ranking. Posts are visible for about 7 days before being archived. Post weekly minimum.
- Requires a verified Google Business Profile
- Posts appear in Google Search + Maps (not a social feed)
- Videos are not supported
- No text-only posts via API (media or CTA recommended for visibility)
Quick Start
Create a Google Business Profile post with an image:
const { post } = await zernio.posts.createPost({
content: 'We are open this holiday weekend! Stop by for our special seasonal menu.',
mediaItems: [
{ type: 'image', url: 'https://example.com/holiday-special.jpg' }
],
platforms: [
{ platform: 'googlebusiness', accountId: 'YOUR_ACCOUNT_ID' }
],
publishNow: true
});
console.log('Posted to Google Business!', post._id);result = client.posts.create(
content="We are open this holiday weekend! Stop by for our special seasonal menu.",
media_items=[
{"type": "image", "url": "https://example.com/holiday-special.jpg"}
],
platforms=[
{"platform": "googlebusiness", "accountId": "YOUR_ACCOUNT_ID"}
],
publish_now=True
)
post = result.post
print(f"Posted to Google Business! {post['_id']}")curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "We are open this holiday weekend! Stop by for our special seasonal menu.",
"mediaItems": [
{"type": "image", "url": "https://example.com/holiday-special.jpg"}
],
"platforms": [
{"platform": "googlebusiness", "accountId": "YOUR_ACCOUNT_ID"}
],
"publishNow": true
}'Content Types
Text + Image Post
The most common and recommended post type. A single image with text. No contentType field is needed -- this is the default when media is included.
const { post } = await zernio.posts.createPost({
content: 'Fresh seasonal menu available now! Visit us to try our new dishes.',
mediaItems: [
{ type: 'image', url: 'https://example.com/seasonal-menu.jpg' }
],
platforms: [
{ platform: 'googlebusiness', accountId: 'YOUR_ACCOUNT_ID' }
],
publishNow: true
});result = client.posts.create(
content="Fresh seasonal menu available now! Visit us to try our new dishes.",
media_items=[
{"type": "image", "url": "https://example.com/seasonal-menu.jpg"}
],
platforms=[
{"platform": "googlebusiness", "accountId": "YOUR_ACCOUNT_ID"}
],
publish_now=True
)curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Fresh seasonal menu available now! Visit us to try our new dishes.",
"mediaItems": [
{"type": "image", "url": "https://example.com/seasonal-menu.jpg"}
],
"platforms": [
{"platform": "googlebusiness", "accountId": "YOUR_ACCOUNT_ID"}
],
"publishNow": true
}'Text-Only Post
Text-only posts are supported but have lower visibility on Google Search and Maps. Adding an image or CTA is recommended.
const { post } = await zernio.posts.createPost({
content: 'Happy Friday! We are offering 20% off all services this weekend. Mention this post when you visit!',
platforms: [
{ platform: 'googlebusiness', accountId: 'YOUR_ACCOUNT_ID' }
],
publishNow: true
});result = client.posts.create(
content="Happy Friday! We are offering 20% off all services this weekend. Mention this post when you visit!",
platforms=[
{"platform": "googlebusiness", "accountId": "YOUR_ACCOUNT_ID"}
],
publish_now=True
)curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Happy Friday! We are offering 20% off all services this weekend. Mention this post when you visit!",
"platforms": [
{"platform": "googlebusiness", "accountId": "YOUR_ACCOUNT_ID"}
],
"publishNow": true
}'Post with CTA Button
Add a call-to-action button to drive traffic. The CTA appears as a prominent button below the post content.
const { post } = await zernio.posts.createPost({
content: 'Book your appointment today! Limited spots available this week.',
mediaItems: [
{ type: 'image', url: 'https://example.com/booking.jpg' }
],
platforms: [{
platform: 'googlebusiness',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
callToAction: {
type: 'BOOK',
url: 'https://mybusiness.com/book'
}
}
}],
publishNow: true
});result = client.posts.create(
content="Book your appointment today! Limited spots available this week.",
media_items=[
{"type": "image", "url": "https://example.com/booking.jpg"}
],
platforms=[{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"callToAction": {
"type": "BOOK",
"url": "https://mybusiness.com/book"
}
}
}],
publish_now=True
)curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Book your appointment today! Limited spots available this week.",
"mediaItems": [
{"type": "image", "url": "https://example.com/booking.jpg"}
],
"platforms": [{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"callToAction": {
"type": "BOOK",
"url": "https://mybusiness.com/book"
}
}
}],
"publishNow": true
}'Available CTA Types:
| Type | Description | Best For |
|---|---|---|
LEARN_MORE | Link to more information | Articles, about pages |
BOOK | Booking/reservation link | Services, appointments |
ORDER | Online ordering link | Restaurants, food |
SHOP | E-commerce link | Retail, products |
SIGN_UP | Registration link | Events, newsletters |
CALL | Phone call action | Contact, inquiries |
Media Requirements
| Property | Requirement |
|---|---|
| Max images | 1 per post |
| Formats | JPEG, PNG (WebP auto-converted) |
| Max file size | 5 MB |
| Min dimensions | 400 x 300 px |
| Recommended | 1200 x 900 px (4:3) |
Google may crop images. Use 4:3 aspect ratio for best results.
Platform-Specific Fields
All fields are set inside platformSpecificData on the platform entry.
| Field | Type | Description |
|---|---|---|
locationId | string | For multi-location businesses. Format: locations/111111111. Get locations via GET /v1/accounts/{accountId}/gmb-locations. If omitted, posts to default location. |
languageCode | string | BCP 47 language code (e.g., en, de). Sets metadata only -- does not translate content. |
callToAction | { type, url } | CTA button. type: LEARN_MORE, BOOK, ORDER, SHOP, SIGN_UP, CALL. url: valid HTTPS URL. |
Language Code Example
By default, post language is auto-detected from text. If auto-detection may be inaccurate (very short posts, mixed-language content, transliterated text), set languageCode explicitly.
const { post } = await zernio.posts.createPost({
content: 'Diese Woche: 20% Rabatt auf alle Services.',
mediaItems: [
{ type: 'image', url: 'https://example.com/promo.jpg' }
],
platforms: [{
platform: 'googlebusiness',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: {
languageCode: 'de'
}
}],
publishNow: true
});result = client.posts.create(
content="Diese Woche: 20% Rabatt auf alle Services.",
media_items=[
{"type": "image", "url": "https://example.com/promo.jpg"}
],
platforms=[{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"languageCode": "de"
}
}],
publish_now=True
)curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Diese Woche: 20% Rabatt auf alle Services.",
"mediaItems": [
{"type": "image", "url": "https://example.com/promo.jpg"}
],
"platforms": [{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"languageCode": "de"
}
}],
"publishNow": true
}'Multi-Location Posting
If your connected Google Business account manages multiple locations, you can post to different locations from the same account connection.
List Available Locations
First, retrieve the list of locations you can post to:
const locations = await zernio.googleBusiness.getLocations('YOUR_ACCOUNT_ID');
console.log('Available locations:', locations);locations = client.google_business.get_locations("YOUR_ACCOUNT_ID")
print("Available locations:", locations)curl -X GET https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-locations \
-H "Authorization: Bearer YOUR_API_KEY"Post to Multiple Locations
Use the same accountId multiple times with different locationId values:
const { post } = await zernio.posts.createPost({
content: 'Now open at all locations! Visit us today.',
mediaItems: [
{ type: 'image', url: 'https://example.com/store.jpg' }
],
platforms: [
{
platform: 'googlebusiness',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: { locationId: 'locations/111111111' }
},
{
platform: 'googlebusiness',
accountId: 'YOUR_ACCOUNT_ID',
platformSpecificData: { locationId: 'locations/222222222' }
}
],
publishNow: true
});result = client.posts.create(
content="Now open at all locations! Visit us today.",
media_items=[
{"type": "image", "url": "https://example.com/store.jpg"}
],
platforms=[
{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {"locationId": "locations/111111111"}
},
{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {"locationId": "locations/222222222"}
}
],
publish_now=True
)curl -X POST https://zernio.com/api/v1/posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Now open at all locations! Visit us today.",
"mediaItems": [
{"type": "image", "url": "https://example.com/store.jpg"}
],
"platforms": [
{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"locationId": "locations/111111111"
}
},
{
"platform": "googlebusiness",
"accountId": "YOUR_ACCOUNT_ID",
"platformSpecificData": {
"locationId": "locations/222222222"
}
}
],
"publishNow": true
}'The locationId format is locations/ followed by the location ID number.
Media URL Requirements
| Requirement | Details |
|---|---|
| Public URL | Must be publicly accessible |
| HTTPS | Secure URLs only |
| No redirects | Direct link to image |
| No auth required | Cannot require login |
https://mybucket.s3.amazonaws.com/image.jpg (valid)
https://example.com/images/post.png (valid)
https://example.com/image?token=abc (invalid - auth required)
http://example.com/image.jpg (invalid - not HTTPS)Business Profile Management
Beyond posting, you can manage your Google Business Profile listing directly through the API. Each subsection below covers a specific management feature.
Food Menus
Manage food menus for locations that support them (restaurants, cafes, etc.). Menu items support price (with currency code), dietaryRestriction (VEGETARIAN, VEGAN, GLUTEN_FREE), allergen (DAIRY, GLUTEN, SHELLFISH), spiciness, servesNumPeople, and preparationMethods.
// Get menus
const menus = await zernio.googleBusiness.getFoodMenus('YOUR_ACCOUNT_ID');
console.log('Food menus:', menus);
// Update menus
await zernio.googleBusiness.updateFoodMenus('YOUR_ACCOUNT_ID', {
menus: [{
labels: [{ displayName: 'Lunch Menu', languageCode: 'en' }],
sections: [{
labels: [{ displayName: 'Appetizers' }],
items: [{
labels: [{ displayName: 'Caesar Salad', description: 'Romaine, parmesan, croutons' }],
attributes: {
price: { currencyCode: 'USD', units: '12' },
dietaryRestriction: ['VEGETARIAN']
}
}]
}]
}],
updateMask: 'menus'
});# Get menus
menus = client.google_business.get_food_menus("YOUR_ACCOUNT_ID")
print("Food menus:", menus)
# Update menus
client.google_business.update_food_menus("YOUR_ACCOUNT_ID",
menus=[{
"labels": [{"displayName": "Lunch Menu", "languageCode": "en"}],
"sections": [{
"labels": [{"displayName": "Appetizers"}],
"items": [{
"labels": [{"displayName": "Caesar Salad", "description": "Romaine, parmesan, croutons"}],
"attributes": {
"price": {"currencyCode": "USD", "units": "12"},
"dietaryRestriction": ["VEGETARIAN"]
}
}]
}]
}],
update_mask="menus"
)# Get menus
curl -X GET https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-food-menus \
-H "Authorization: Bearer YOUR_API_KEY"
# Update menus
curl -X PUT https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-food-menus \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"menus": [{
"labels": [{"displayName": "Lunch Menu", "languageCode": "en"}],
"sections": [{
"labels": [{"displayName": "Appetizers"}],
"items": [{
"labels": [{"displayName": "Caesar Salad", "description": "Romaine, parmesan, croutons"}],
"attributes": {
"price": {"currencyCode": "USD", "units": "12"},
"dietaryRestriction": ["VEGETARIAN"]
}
}]
}]
}],
"updateMask": "menus"
}'See the GMB Food Menus API Reference for full schema details.
Location Details
Read and update your business information including hours, special hours, description, phone numbers, and website. Use readMask to request specific fields and updateMask to update them. Available fields include regularHours, specialHours, profile.description, websiteUri, and phoneNumbers.
// Get location details
const details = await zernio.googleBusiness.getLocationDetails('YOUR_ACCOUNT_ID', {
readMask: 'regularHours,specialHours,profile,websiteUri'
});
// Update business hours
await zernio.googleBusiness.updateLocationDetails('YOUR_ACCOUNT_ID', {
updateMask: 'regularHours',
regularHours: {
periods: [
{ openDay: 'MONDAY', openTime: '09:00', closeDay: 'MONDAY', closeTime: '17:00' },
{ openDay: 'TUESDAY', openTime: '09:00', closeDay: 'TUESDAY', closeTime: '17:00' }
]
}
});# Get location details
details = client.google_business.get_location_details("YOUR_ACCOUNT_ID",
read_mask="regularHours,specialHours,profile,websiteUri"
)
# Update business hours
client.google_business.update_location_details("YOUR_ACCOUNT_ID",
update_mask="regularHours",
regular_hours={
"periods": [
{"openDay": "MONDAY", "openTime": "09:00", "closeDay": "MONDAY", "closeTime": "17:00"},
{"openDay": "TUESDAY", "openTime": "09:00", "closeDay": "TUESDAY", "closeTime": "17:00"}
]
}
)# Get location details
curl -X GET "https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-location-details?readMask=regularHours,specialHours,profile,websiteUri" \
-H "Authorization: Bearer YOUR_API_KEY"
# Update business hours
curl -X PUT https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-location-details \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"updateMask": "regularHours",
"regularHours": {
"periods": [
{"openDay": "MONDAY", "openTime": "09:00", "closeDay": "MONDAY", "closeTime": "17:00"},
{"openDay": "TUESDAY", "openTime": "09:00", "closeDay": "TUESDAY", "closeTime": "17:00"}
]
}
}'See the GMB Location Details API Reference for the full schema.
Media (Photos)
Upload, list, and delete photos for your Google Business Profile listing. Photo categories: COVER, PROFILE, LOGO, EXTERIOR, INTERIOR, FOOD_AND_DRINK, MENU, PRODUCT, TEAMS, ADDITIONAL.
// List photos
const media = await zernio.googleBusiness.listMedia('YOUR_ACCOUNT_ID');
// Upload a photo
await zernio.googleBusiness.uploadMedia('YOUR_ACCOUNT_ID', {
sourceUrl: 'https://example.com/photos/interior.jpg',
description: 'Dining area with outdoor seating',
category: 'INTERIOR'
});# List photos
media = client.google_business.list_media("YOUR_ACCOUNT_ID")
# Upload a photo
client.google_business.upload_media("YOUR_ACCOUNT_ID",
source_url="https://example.com/photos/interior.jpg",
description="Dining area with outdoor seating",
category="INTERIOR"
)# List photos
curl -X GET https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-media \
-H "Authorization: Bearer YOUR_API_KEY"
# Upload a photo
curl -X POST https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-media \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sourceUrl": "https://example.com/photos/interior.jpg",
"description": "Dining area with outdoor seating",
"category": "INTERIOR"
}'See the GMB Media API Reference for full details.
Attributes
Manage amenities and services like delivery, Wi-Fi, outdoor seating, and payment types. Available attributes vary by business category. Common ones include has_dine_in, has_takeout, has_delivery, has_wifi, has_outdoor_seating, and pay_credit_card_types_accepted.
// Get attributes
const attrs = await zernio.googleBusiness.getAttributes('YOUR_ACCOUNT_ID');
// Update attributes
await zernio.googleBusiness.updateAttributes('YOUR_ACCOUNT_ID', {
attributes: [
{ name: 'has_delivery', values: [true] },
{ name: 'has_outdoor_seating', values: [true] }
],
attributeMask: 'has_delivery,has_outdoor_seating'
});# Get attributes
attrs = client.google_business.get_attributes("YOUR_ACCOUNT_ID")
# Update attributes
client.google_business.update_attributes("YOUR_ACCOUNT_ID",
attributes=[
{"name": "has_delivery", "values": [True]},
{"name": "has_outdoor_seating", "values": [True]}
],
attribute_mask="has_delivery,has_outdoor_seating"
)# Get attributes
curl -X GET https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-attributes \
-H "Authorization: Bearer YOUR_API_KEY"
# Update attributes
curl -X PUT https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-attributes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"attributes": [
{"name": "has_delivery", "values": [true]},
{"name": "has_outdoor_seating", "values": [true]}
],
"attributeMask": "has_delivery,has_outdoor_seating"
}'See the GMB Attributes API Reference for full details.
Place Actions
Manage booking, ordering, and reservation buttons that appear on your listing. Action types: APPOINTMENT, ONLINE_APPOINTMENT, DINING_RESERVATION, FOOD_ORDERING, FOOD_DELIVERY, FOOD_TAKEOUT, SHOP_ONLINE.
// List place actions
const actions = await zernio.googleBusiness.listPlaceActions('YOUR_ACCOUNT_ID');
// Create a place action
await zernio.googleBusiness.createPlaceAction('YOUR_ACCOUNT_ID', {
uri: 'https://order.ubereats.com/mybusiness',
placeActionType: 'FOOD_ORDERING'
});# List place actions
actions = client.google_business.list_place_actions("YOUR_ACCOUNT_ID")
# Create a place action
client.google_business.create_place_action("YOUR_ACCOUNT_ID",
uri="https://order.ubereats.com/mybusiness",
place_action_type="FOOD_ORDERING"
)# List place actions
curl -X GET https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-place-actions \
-H "Authorization: Bearer YOUR_API_KEY"
# Create a place action
curl -X POST https://zernio.com/api/v1/accounts/YOUR_ACCOUNT_ID/gmb-place-actions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"uri": "https://order.ubereats.com/mybusiness",
"placeActionType": "FOOD_ORDERING"
}'See the GMB Place Actions API Reference for full details.
Analytics
Requires Analytics add-on
Available metrics via the Analytics API:
| Metric | Available |
|---|---|
| Impressions | ✅ |
| Clicks | ✅ |
| Views | ✅ |
const analytics = await zernio.analytics.getAnalytics({
platform: 'google-business',
fromDate: '2024-01-01',
toDate: '2024-01-31'
});
console.log(analytics.posts);analytics = client.analytics.get(
platform="google-business",
from_date="2024-01-01",
to_date="2024-01-31"
)
print(analytics["posts"])curl "https://zernio.com/api/v1/analytics?platform=google-business&fromDate=2024-01-01&toDate=2024-01-31" \
-H "Authorization: Bearer YOUR_API_KEY"What You Can't Do
These features are not available through Google Business Profile's API:
- Post videos
- Create offers or events (special post types)
- Respond to Q&A
- Manage service areas
- Manage business categories
Common Errors
Google Business has a 6.5% failure rate across Zernio's platform (557 failures out of 8,529 attempts). Here are the most frequent errors and how to fix them:
| Error | Meaning | Fix |
|---|---|---|
| "Image not found" | Image URL is inaccessible or requires authentication | Verify URL is publicly accessible. Ensure HTTPS. Test URL in an incognito browser. |
| "Invalid image format" | Unsupported file format or corrupted file | Use JPEG or PNG only. GIF is not supported. Re-export the image if corrupted. |
| "Image too small" | Image dimensions below minimum | Use at least 400 x 300 px. Recommended: 1200 x 900 px. |
| Post not appearing | Post may be pending review or account not verified | Posts may take 24-48 hours to appear. Check Google Business Console for approval status. Ensure account is verified. |
| CTA not working | Invalid or inaccessible URL | Verify URL is valid and accessible. Use HTTPS. Avoid shortened URLs. |
Inbox
Requires Inbox add-on — Build: +$10/mo · Accelerate: +$50/unit · Unlimited: +$1,000/mo
Google Business supports reviews management only.
Reviews
| Feature | Supported |
|---|---|
| List reviews | ✅ |
| Reply to reviews | ✅ |
| Delete reply | ✅ |
Limitations
- No DMs - Google Business does not have a messaging system accessible via API
- No comments - Posts on Google Business do not support comments
See Reviews API Reference for endpoint details.
Related Endpoints
- Connect Google Business Account - OAuth flow
- Create Post - Post creation and scheduling
- Upload Media - Image uploads
- GMB Reviews - Manage reviews
- GMB Food Menus - Manage food menus
- GMB Location Details - Hours, description, contact info
- GMB Media - Photos management
- GMB Attributes - Amenities and services
- GMB Place Actions - Booking and ordering links
- Reviews