We will sunset v2 of the Content API on March 29th, 2021. To avoid disruptions with your integration, please migrate to v2.1 as soon as possible. For more information, see Migrating to v2.1.

Products API

The Products API allows for a great deal of flexibility and control over more than 60 product attributes. Together these are called the product resource. There are a number of fields that are mandatory, and must be included in order to be approved for display on Google Shopping. There are a number of optional fields that may become mandatory based on varying conditions such as a merchant's location, type of product, use of product variants and product bundles, etc. For more details on the 60+ optional parameters that can be configured for products, refer to the Product Data Specifications.

The Products API allows us to insert, get, and delete one product at a time as well as list all products in the merchant center database.

The productstatuses API can be used to check on the approval or disapproval status of a specific product for a destination. Refer to the Product Statuses API guide for more details on which products may have data quality issues and what those issues may be.

In our API examples, we will use three products, two Google t-shirts and a Google cap. We use a minimal set of product data shown in the table below to make Products API calls to insert, get, list, and delete individual products and batches of products.

Best Practice: We recommend that Shipping and Tax information be configured in the merchant center, rather than at a product level.

id online:en:US:1111111111 online:en:US:2222222222 online:en:US:3333333333
offerId 1111111111 2222222222 3333333333
title The Black Google Tee Google Tee Green Google Twill Cap
description The Black Google Tee 100% cotton Google t-shirt Classic Google cap
item group ID google_tee google_tee
link http://my.site.com/blacktee http://my.site.com/greentee http://my.site.com/blackhat
condition New New New
price 21.99 USD 21.99 USD 10.99 USD
availability In Stock In Stock In Stock
imageLink https://shop.example.com/store/20160512512/assets/items/images/GGOEGXXX1100.jpg https://shop.example.com/store/20160512512/assets/items/images/GGOEGXXX0906.jpg https://shop.example.com/store/20160512512/assets/items/images/GGOEGHPB071610.jpg
gtin 9504000059422 9504000059446 9504000059452
mpn 00638NIC 00638ANG 00638ABC
brand Google Google Google
Google product category Apparel & Accessories > Clothing Apparel & Accessories > Clothing Apparel & Accessories > Clothing Accessories > Hats
color black green black
size L M M
age_group adult adult adult
gender male male unisex
included_destination Shopping Actions, Shopping Ads Shopping Actions, Shopping Ads Shopping Actions

Products.Insert

To insert a single product, use the following request URL, specifying your merchant ID, and a sample JSON body. An insert will create a new product. If values exist for the attributes channel, contentLanguage, offerId, and targetCountry for a given product, this method updates that entry, and replaces all data from previous API calls for the given product.

The example shown will insert a new "Black Google Tee" to the products available.

POST https://www.googleapis.com/content/v2.1/{merchantId}/products

Sample request body call for products.insert:

{
 "kind": "content#product",
 "offerId": "1111111111",
 "title": "Google Tee Black",
 "description": "The Black Google Tee is available in unisex sizing and features a retail fit.",
 "link": "http://my.site.com/blacktee/",
 "imageLink": "https://shop.example.com/.../images/GGOEGXXX1100.jpg",
 "contentLanguage": "en",
 "targetCountry": "US",
 "channel": "online",
 "ageGroup": "adult",
 "availability": "in stock",
 "availabilityDate": "2019-01-25T13:00:00-08:00",
 "brand": "Google",
 "color": "black",
 "condition": "new",
 "gender": "male",
 "googleProductCategory": "1604",
 "gtin": "608802531656",
 "itemGroupId": "google_tee",
 "mpn": "608802531656",
 "price": {
  "value": "21.99",
  "currency": "USD"
 },
 "sizes": [
  "Large"
 ]
}

A product can also have custom attributes set within the JSON body. For example, we can set a purchase_quantity_limit for a single product in order to limit the number of items a customer can order as follows:

"customAttributes": [
 {
   "name": "purchase_quantity_limit",
   "type": "int",
   "value": "4"
 }
]

Note that the purchase_quantity_limit custom attribute sets a purchase limit per customer order to the product definition and is also supported by feeds. The attribute is currently in beta until fully supported by the API. Any additional custom attribute can be added by a merchant but does not result in any specific processing by the APIs.

A successful call will return an HTTP 200 code and a response body with the product resource that was created below:

{
 "kind": "content#product",
 "id": "online:en:US:1111111111",
 "offerId": "1111111111",
 "title": "Google Tee Black",
 "description": "The Black Google Tee is available in unisex sizing and features a retail fit.",
 "link": "http://my.site.com/blacktee/",
 "imageLink": "https://shop.example.com/.../images/GGOEGXXX1100.jpg",
 "contentLanguage": "en",
 "targetCountry": "US",
 "channel": "online",
 "ageGroup": "adult",
 "availability": "in stock",
 "availabilityDate": "2019-01-25T13:00:00-08:00",
 "brand": "Google",
 "color": "black",
 "condition": "new",
 "gender": "male",
 "googleProductCategory": "1604",
 "gtin": "608802531656",
 "itemGroupId": "google_tee",
 "mpn": "608802531656",
 "price": {
  "value": "21.99",
  "currency": "USD"
 },
 "sizes": [
  "Large"
 ],
 "destinations": [
  {
   "destinationName": "Shopping",
   "intention": "required"
  }
 ]
}

Products.Get

To get information on a specific product that is in the Merchant Center database, use products.get. It may take a few minutes for a newly inserted product to be available via the products.get API call.

Use the following HTTP request URL and parameters, your merchant ID, and the product ID (REST ID format) for the product that you want to get:

GET https://www.googleapis.com/content/v2.1/{merchantId}/products/{productId}

A successful call would return an HTTP 200 and the "product resource" in the response body. As an example, the following information was successfully returned in our example with product ID online:en:US:1111111111:

{
 "kind": "content#product",
 "id": "online:en:US:1111111111",
 "offerId": "1111111111",
 "source": "api",
 "title": "Google Tee Black",
 "description": "The Black Google Tee is available in unisex sizing and features a retail fit.",
 "link": "http://my.site.com/blacktee/",
 "imageLink": "https://shop.example.com/.../images/GGOEGXXX1100.jpg",
 "contentLanguage": "en",
 "targetCountry": "US",
 "channel": "online",
 "ageGroup": "adult",
 "availability": "in stock",
 "availabilityDate": "2019-01-25T13:00:00-08:00",
 "brand": "Google",
 "color": "black",
 "condition": "new",
 "gender": "male",
 "googleProductCategory": "1604",
 "gtin": "608802531656",
 "itemGroupId": "google_tee",
 "mpn": "608802531656",
 "price": {
  "value": "21.99",
  "currency": "USD"
 },
 "sizes": [
  "Large"
 ],
 "destinations": [
  {
   "destinationName": "Shopping",
   "intention": "required"
  }
 ]
}

Products.Delete

To delete a single product, use products.delete with the sample HTTP request URL, your merchant ID, and the product ID (the REST ID format such as online:en:US:1111111111) for the product that you want to delete:

DELETE https://www.googleapis.com/content/v2.1/{merchantId}/products/{productId}

A successful response would be an HTTP Status 204, a success with no response body.

Products.List

The products.list will list all products that a merchant has within the merchant center database. Use the following request URL:

GET https://www.googleapis.com/content/v2.1/{merchantId}/products

An HTTP 200 success is returned along with the response body, where a product resource in the JSON body represents data for a single product.

The following three example products are returned:

{
 "kind": "content#productsListResponse",
 "resources": [
  {
   "kind": "content#product",
   "id": "online:en:US:1111111111",
   "offerId": "1111111111",
   "source": "api",
   "title": "Google Tee Black",
   "description": "The Black Google Tee is available in unisex sizing and features a retail fit.",
   "link": "http://my.site.com/blacktee/",
   "imageLink": "https://shop.example.com/.../images/GGOEGXXX1100.jpg",
   "contentLanguage": "en",
   "targetCountry": "US",
   "channel": "online",
   "ageGroup": "adult",
   "availability": "in stock",
   "availabilityDate": "2019-01-25T13:00:00-08:00",
   "brand": "Google",
   "color": "black",
   "condition": "new",
   "gender": "male",
   "googleProductCategory": "1604",
   "gtin": "608802531656",
   "itemGroupId": "google_tee",
   "mpn": "608802531656",
   "price": {
    "value": "21.99",
    "currency": "USD"
   },
   "sizes": [
    "Large"
   ],
   "destinations": [
    {
     "destinationName": "Shopping",
     "intention": "required"
    }
   ]
  },
  {
   "kind": "content#product",
   "id": "online:en:US:2222222222",
   "offerId": "2222222222",
   "source": "api",
   "title": "Google Tee Green",
   "description": "100% cotton jersey fabric sets this Google t-shirt above the crowd.
   Features the google logo across the chest. Unisex sizing.",
   "link": "http://my.site.com/greentee/",
   "imageLink": "https://shop.example.com/.../images/GGOEGXXX0906.jpg",
   "contentLanguage": "en",
   "targetCountry": "US",
   "channel": "online",
   "ageGroup": "adult",
   "availability": "in stock",
   "availabilityDate": "2019-01-25T13:00:00-08:00",
   "brand": "Google",
   "color": "green",
   "condition": "new",
   "gender": "male",
   "googleProductCategory": "1604",
   "gtin": "608802531649",
   "itemGroupId": "google_tee",
   "mpn": "608802531649",
   "price": {
    "value": "21.99",
    "currency": "USD"
   },
   "sizes": [
    "Medium"
   ],
   "destinations": [
    {
     "destinationName": "Shopping",
     "intention": "required"
    }
   ]
  },
  {
   "kind": "content#product",
   "id": "online:en:US:3333333333",
   "offerId": "3333333333",
   "source": "api",
   "title": "Google Twill Cap",
   "description": "Classic urban styling distinguishes this Google cap.
   Retains its shape, even when not being worn.",
   "link": "http://my.site.com/blackhat/",
   "imageLink": "https://shop.example.com/.../images/GGOEGHPB071610.jpg",
   "contentLanguage": "en",
   "targetCountry": "US",
   "channel": "online",
   "ageGroup": "adult",
   "availability": "in stock",
   "availabilityDate": "2019-01-07T13:00:00-08:00",
   "brand": "Google",
   "color": "black",
   "condition": "new",
   "gender": "male",
   "googleProductCategory": "173",
   "gtin": "689355417246",
   "mpn": "689355417246",
   "price": {
    "value": "10.99",
    "currency": "USD"
   },
   "sizes": [
    "Medium"
   ],
   "destinations": [
    {
     "destinationName": "Shopping",
     "intention": "required"
    }
   ]
  }
 ]
}