Google Business Performance API has aNEW API method that allows fetching multiple `DailyMetrics` in a single API request.
Review thedeprecation schedule and instructions to migrate over from v4 reportInsights API method to Google Business Profile Performance API.

Create Posts on Google

  • The Google My Business API allows you to create and manage posts for your business directly on Google Search and Maps, including Event, Call to Action, and Offer posts, to engage with your customers.

  • Before using the API, you must register your application and obtain OAuth 2.0 credentials, following the setup instructions provided in the documentation.

  • You can create posts with various features, like event schedules, call-to-action buttons with customizable actions (book, order, shop, etc.), and offer details like coupon codes and terms.

  • After creating posts, the API enables you to edit their content or delete them entirely using dedicated HTTP methods and specifying the desired changes or target post ID.

  • Product posts cannot be created using the Google My Business API at this time.

The Google My Business API provides you with the ability to create Posts inGoogle Search within several categories, such as news, events, and offers.

This tutorial shows you how to do the following:

Note: Product Posts cannot be created via the Google My Business API at this time.

Before you begin

Before you use the Google My Business API, you need to register your applicationand obtain OAuth 2.0 credentials.

For details on how to get started with the Google My Business API, seeBasicsetup.

Note: Small businesses and large chains are eligible to create Posts.

Event Posts

Notify your customers about the next event at your business with a Post. YourPost for an event includes start and end dates and times, which displayprominently on the Post.

To make a Post to an account associated with a user, use theaccounts.locations.localPosts API.

To create a Post for an authenticated user, use the following:

HTTP
$POSThttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts{"languageCode":"en-US","summary":"Come in for our spooky Halloween event!","event":{"title":"Halloween Spook-tacular!","schedule":{"startDate":{"year":2017,"month":10,"day":31,},"startTime":{"hours":9,"minutes":0,"seconds":0,"nanos":0,},"endDate":{"year":2017,"month":10,"day":31,},"endTime":{"hours":17,"minutes":0,"seconds":0,"nanos":0,},}},"media":[{"mediaFormat":"PHOTO","sourceUrl":"https://www.google.com/real-image.jpg",}],"topicType":"EVENT"}

Call to action Posts

Posts with a call to action include a button. The text on the call to actionbutton is determined by theactionType field of the Post. A link to auser-provided URL is added to the button.

To create a Post with a call to action button, use the following:

HTTP
$POSThttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts{"languageCode":"en-US","summary":"Order your Thanksgiving turkeys now!!","callToAction":{"actionType":"ORDER","url":"http://google.com/order_turkeys_here",},"media":[{"mediaFormat":"PHOTO","sourceUrl":"https://www.google.com/real-turkey-photo.jpg",}],"topicType":"OFFER"}

Action types

The call to action Posts can have different action types that determine the typeof call to action Post.

The following are the supported call to action types:

Action types
BOOKCreates a Post that prompts a user to book an appointment, table, or something similar.
ORDERCreates a Post that prompts a user to order something.
SHOPCreates a Post that prompts a user to browse a product catalog.
LEARN_MORECreates a Post that prompts a user to see additional details on a website.
SIGN_UPCreates a Post that prompts a user to register, sign up, or join something.
CALLCreates a Post that prompts a user to call a business.

Offer Posts

To create an Offer Post, use the following:

HTTP
$POSThttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts{"languageCode":"en-US","summary":"Buy one Google jetpack, get a second one free!!","offer":{"couponCode":“BOGO-JET-CODE”,"redeemOnlineUrl":“https://www.google.com/redeem”,"termsConditions":“Offeronlyvalidifyoucanproveyouareatimetraveler”},"media":[{"mediaFormat":"PHOTO","sourceUrl":"https://www.google.com/real-jetpack-photo.jpg",}],"topicType":"OFFER"}

Edit Posts

Once a post is created, you can edit it with aPATCH request.

To edit a Post, use the following:

HTTP
$PATCHhttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts/{localPostId}?updateMask=summary{"summary":"Order your Christmas turkeys now!!"}

Delete Posts

After a Post is created, you can delete it with aDELETE request.

To delete a Post, use the following:

HTTP
$DELETEhttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts/{localPostId}

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-28 UTC.