Using the Google Shopping APIs


Danny Hermes
profiles.google.com/daniel.j.hermes

November 8, 2011

Today I hope to introduce you to the Google Shopping APIs. A basic roadmap for the next 30 minutes of your life:

What are the Shopping APIs?

Product data stored in Google Merchant Center can be available on all Google Shopping Sites

10,000 Foot View of Shopping APIs

Content API based on HTTP, REST & GData

With the Content API for Shopping, you can programmatically
With the Search API for Shopping
The Search API for Shopping can be used in three cases:

Google Product Search and Data

How can more data improve buying a dress?
What kind of value can we add to the shopper's experience?
Define price limits
Refine results
Define her style
Imagine herself in the dress!
In order to ensure the data for product search users is of utmost quality, we try to use and combine as much data as possible. We also have a data freshness policy in place to maintain reliable results.
If the product is listed at $102 in results, the user expects to be able to buy that item for $102.

The Policy: "When a user comes to your website from Product Search, he or she expects to see the same price and availability as what is shown in Product Search results, or, what is provided in your data to us. For example, if the product is listed as being 'in stock' in results, the user expects to be able to buy that item -- it is disappointing when that item is not actually available for purchase. For these reasons, we check your website regularly to ensure information provided to us is the same as on your website - at all times. If your website and the data you provide to us do not match, your items may be suspended from Product Search results."

goo.gl/C5P8X

What does this have to do with the APIs?

  • If your item prices or quantities change often, and you'd like to be able to update your entries in the Merchant Center, the Content API is the way to go.
  • If you have a massive set of items, day to day maintenance and updates can be done through the API only on the items which you wish to change.

When would you use a Shopping API?

Whoa, how does that work?

OK, What about the Content API?

The Content API for Shopping is Real Time

The Content API for Shopping is Automated

Performance data can also be retrieved through the Content API

How do you use the APIs?

Some implementation details

Request Body containing product information formatted as XML

POST to Products Endpoint

201 Response on success

Response body contains new product information

Test an implementation by making real API requests through our Interactive Demo

Open Source Client Libraries:

code.google.com/apis/gdata/docs/client-libraries.html

POST https://content.googleapis.com/content/v1/7663654/items/products/schema
?dry-run

How about implementing the Shopping API?

Using data to improve results:

An example response

{
 "kind": "shopping#products",
 "etag": "\"g4vAy7M-xlr9t4iHvMv4hM4SrpU/UAeTlb_5PXTW_wtp3g-Gk...
 "id": "tag:google.com,2010:shopping/products",
 "selfLink": "https://www.googleapis.com/shopping/search/v1/p...
 "nextLink": "https://www.googleapis.com/shopping/search/v1/p...
 "totalItems": 1234445,
 "startIndex": 1,
 "itemsPerPage": 25,
 "currentItemCount": 25,
 "items": [
  {
   "kind": "shopping#product",
   "id": "tag:google.com,2010:shopping/products/3622330/72699...
   "selfLink": "https://www.googleapis.com/shopping/search/v1...
   "product": {
    "googleId": "7269998773346629677",
    "author": {
     "name": "Apple Store",

Resources

Thank you!

Q & A