> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Business Profile API

> Options for posting using the Google Business Profile API

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "basic") {
      displayPlans = ["Basic", "Premium", "Business", "Enterprise"];
    } else if (lowerCasePlan === "business") {
      displayPlans = ["Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

## Posting to Google Business Profile

There are four types of Google Business Profile, formerly known as Google My Business, posts that can be created using the Google Business Profile API.
In the below example, the `post` text is posted as an update to the user's Google business page.
[Find out more](https://www.ayrshare.com/google-my-business-what-is-gmb-why-you-need-it-and-how-to-use-it/) about Google Business Profile (GBP).

<Warning>
  You must [claim](https://support.google.com/business/answer/2911778) your Google Business Profile page before linking it with Ayrshare. Be sure to choose the Google account that is an admin of your GBP page during link authorization. The business profile must also be verified and public.

  You can access your GBP manage console and check the verification status at [https://business.google.com/](https://business.google.com/)
</Warning>

Product posts cannot be created via the Google Business Profile API at this time.

JSON for a basic post with just text to GBP, which will appear in the "What's New" section of :

```json Google Business Profile Post theme={"system"}
{
  "post": "The best GMB ever #best https://www.google.com",
  "platforms": ["gmb"] // Please note to use `gmb`
}
```

or JSON for a basic post with an image to GBP:

```json Google Business Profile Post with Image theme={"system"}
{
  "post": "The best GMB ever #best https://www.google.com",
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"],
  "platforms": ["gmb"]
}
```

<ul class="custom-bullets">
  <li>
    If your video doesn't end in a known video extension such as mp4, please use the `isVideo`
    parameter. See the [/post endpoint](/apis/post/overview) for details.
  </li>

  <li>
    See [Google Business Profile Media Guidelines](/media-guidelines/google_business_profile) and [Google Business Profile Authorization](/dashboard/connect-social-accounts/google-business) for more information.
    more information.
  </li>
</ul>

## Google Business Profile Posting Requirements

Please be sure your post does not contain the following. Google will reject your post and the post will show as "This post is no longer available" or with a "Rejected" label in the Google Console:

<ul class="custom-bullets">
  <li>Phone numbers. Google will reject all posts containing phone numbers.</li>
  <li>Spam, false claims, or false representation.</li>
  <li>Off-topic post that doesn't pertain to your business.</li>
  <li>Duplicate content.</li>
  <li>Inappropriate content.</li>
  <li>Offensive language.</li>
</ul>

Please see [Google Business Profile's Content Policy](https://support.google.com/business/answer/7213077?hl=en) for more information.

## Standard Post (What's New)

A standard local post appears in the "*Posts*" GBP section and is categorized as "What's New".
It can contain post text, an image, or a Call to Action ([see below](/apis/post/social-networks/google#call-to-action)).

Videos are not supported for to be published to the What's New section via the Google Business Profile API.
Please see [Image or Video Post](#image-or-video-post) for details on how to publish videos to Google Business Profile.

*These posts will appear in the "**Posts -> What's New**" section in the GMB management console.*

```json Google Business Profile Standard Post theme={"system"}
{
  "post": "A wonderful post",
  "platforms": ["gmb"],
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"], // optional - images only
  "gmbOptions": {
    "callToAction": {
      // optional
      "actionType": "learn_more",
      "url": "https://www.ayrshare.com"
    }
  }
}
```

## Image or Video Post

You can publish Image or Video posts to Google Business Profile.
Images and videos will appear in the "**Photos**" section in the GBP management console.

### Requirements

<ul class="custom-bullets">
  <li>
    Only one image or one video can be added to your GBP location, which will appear in the "Photos"
    section of the GBP console.
  </li>

  <li>Only one image or video is allowed per post.</li>
  <li>The post text is required by the endpoint, but is not used by GBP.</li>
  <li>Call to Action is not supported for image or video posts.</li>
  <li>Be sure to include the `isPhotoVideo` parameter in the `gmbOptions` object.</li>
</ul>

```json Google Business Profile Image Post {6} theme={"system"}
{
  "post": "What an image!",
  "platforms": ["gmb"],
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"], // required
  "gmbOptions": {
    "isPhotoVideo": true, //required
    "category": "product" // optional
  }
}
```

### Video Processing

Google at times takes extra time to process uploaded videos.

You can view the status of the media in the Google Business Profile console:

1. Go to your [Google Business Profile console](https://business.google.com/us/business-profile/).
2. Click the button "See your profile". You will br brought to the GBP page.
3. Click on the "Photos" tab.
4. You will see a list of photos and videos.
5. Click on the photo or video you want to view.

<Warning>
  If your video has a "pending" status, it is still being processed by Google. Please wait a few
  minutes and refresh the page. Be sure your Google Business Profile has been verififed and the
  profile is public.

  If the video seems stuck in "pending", this may be due to a bug at Google.
  Please contact [Google Business support](https://support.google.com/business/gethelp) for
  assistance.
</Warning>

### Product Category

You can specify a product category for an image or video so the media is categorized in the "Photos" section of the GBP console. For example, if an image has the category "product", it will appear under the "Product" tab in Photos.

Some categories are not allowed for certain business types. For example, Ayrshare could not use `food_and_drink` since we are not in the food/drink industry.

Available Categories:

<ul class="custom-bullets">
  <li>`cover`: Cover photo. A location has only one cover photo.</li>
  <li>`profile`: Profile photo. A location has only one profile photo.</li>
  <li>`logo`: Logo photo.</li>
  <li>`exterior`: Exterior media.</li>
  <li>`interior`: Interior media.</li>
  <li>`product`: Product media.</li>
  <li>`at_work`: At work media.</li>
  <li>`food_and_drink`: Food and drink media.</li>
  <li>`menu`: Menu media.</li>
  <li>`common_area`: Common area media.</li>
  <li>`rooms`: Rooms media.</li>
  <li>`teams`: Teams media.</li>
</ul>

## Events Post

Promote an event at your business. Events require a title, start and end dates, and can include a video. For example, a real estate agent may advertise an open house showing.

<ul class="custom-bullets">
  <li>Events support Call to Action.</li>
  <li>Include an optional image with the `mediaUrls` parameter.</li>
  <li>Videos are not supported for Events.</li>

  <li>
    Event posts will appear in the "**Posts -> Events**" section in the GBP management console.
  </li>

  <li>The `post` text will be used for the Event Details.</li>
</ul>

```json Google Business Profile Event Post theme={"system"}
{
  "post": "A great event!", // Event Details
  "platforms": ["gmb"],
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"], // optional
  "gmbOptions": {
    "event": {
      "title": "Check this event out.", // required
      "startDate": "2021-08-12T20:17:46.384Z", // required
      "endDate": "2021-09-12T20:17:46.384Z" // required
    }
  }
}
```

## Offers Post

Provide promotional sales or offers from your business. Offers require a title as well as start and end dates and times. A "View offer" action button is automatically added to the post. You can also include a photo, description, coupon code, link, and terms and conditions with the post. For example, a toy store may advertise 20% off all beanie babies for a week.

Include an image with the `mediaUrls` parameter.

*Videos are not supported for Offers.*

*These posts will appear in the "**Posts -> Offers**" section in the GBP management console.*

```json Google Business Profile Offers Post theme={"system"}
{
  "post": "A great offer for everyone!",
  "platforms": ["gmb"],
  "gmbOptions": {
    "offer": {
      "title": "Great Sale.", // required
      "startDate": "2021-08-12T20:17:46.384Z", // required
      "endDate": "2021-09-12T20:17:46.384Z", // required
      "couponCode": "BOGO-JET-CODE", // required - max 58 characters
      "redeemOnlineUrl": "https://www.ayrshare.com", // required
      "termsConditions": "Offer only valid if you can prove you are a time traveler" // required
    }
  }
}
```

<ul class="custom-bullets">
  <li>`couponCode` has a maximum of 58 characters.</li>
</ul>

## Call to Action

Provide general information about your business and appears as an action button. For example, a website might promote a *Learn More* button to redirect to their website.

A Call to Action can be added to a Standard post or Event. Offers cannot have Call to Actions.

Include an image with the `mediaUrls` parameter.

```json Google Business Profile Call to Action Post theme={"system"}
{
  "post": "Take this action!",
  "platforms": ["gmb"],
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"], //optional
  "gmbOptions": {
    "callToAction": {
      "actionType": "order", // required
      "url": "https://www.ayrshare.com" // required for all action types but "call"
    }
  }
}
```

The `actionType` is displayed as a button on the post. Possible values are:

<ul class="custom-bullets">
  <li>**book**: Prompts a user to book an appointment, table, or something similar.</li>
  <li>**order**: Prompts a user to order something.</li>
  <li>**shop**: Prompts a user to browse a product catalog.</li>
  <li>**learn\_more**: Prompts a user to see additional details on a website.</li>
  <li>**sign\_up**: Prompts a user to register, sign up, or join something.</li>

  <li>
    **call**: Prompts a user to call a business. The `url` field is not required for `call`.
    However, you must first have set a phone number in your Google Business Profile for the call
    action to appear on the post.
  </li>
</ul>

The `url` parameter is the URL the user will be directed to upon clicking.

Additional [Google Business Profile information](https://www.ayrshare.com/google-my-business-what-is-gmb-why-you-need-it-and-how-to-use-it/).

<Card title="Google Business Profile Linking" icon="link" href="/dashboard/connect-social-accounts/google-business" horizontal />

## Google Business Profile Mentions

While you can add a `@handle` to a Google Business Profile post, Google Business Profile does not support resolving mentions in the post text.
The `@handle` will remain as plain text.

## Character Limits

Please see [Google Business Profile Character Limits](/help-center/technical-support/character_limits#google-business-profile-character-limits) for more information.
