Content API for Shopping

Protocol Reference Guide

This document provides detailed reference documentation for the raw protocol (XML and HTTP) for the Content API for Shopping. This API uses the same protocol as GData, see the GData Protocol Reference for more information.

Contents

  1. Attribute types
  2. Feed parameter reference
    1. Standard query parameters
    2. Insert, update, delete and batch parameters
  3. XML elements reference

Attribute types

The Content API for Shopping supports attributes of various types. The following attribute types are supported:

Type (Atom Feed) Type (Queries) Description Examples
text text Any string or text value Blue
int int Integer 1000
float float Floating-point numbers 3.5
boolean bool Value may be either y or n y
dateTimeRange date_range Range of dateTime values. In queries date ranges have the syntax
YYYY-MM-DDThh:mm:ss..YYYY-MM-DDThh:mm:ss
In the Atom entries, a date range simply consists of two consecutive date time values denoting the start and end date/time.
2005-12-12..2005-12-19 (see previous note on date formats)
location location Location a full address such as 1600 Amphitheatre Parkway, Mountain View, CA, 94043, USA, or a partial address such as Mountain View, CA, 94043
Note that you must enter a valid address which can be geocoded by Google.
In the query language, location strings are prefixed with an @ character; i.e. the above address would be written as: @"1600 Amphitheatre Parkway, Mountain View, CA.
url url URL http://www.google.com

Feed parameter reference

This section describes the query and path parameters that can be used on the Content API for Shopping feeds.

Standard query parameters

The Content API for Shopping supports the following standard Data API request parameters on all feeds.

The list of parameters is separated from the URL by the ? character. The & character is used to separate each subsequent parameter in the list.

Parameter Meaning Notes
max-results Maximum number of entries to return per page.

The default value is 25.

The maximum value is 250.

start-token A token which allows paging through search results.

When a requested <feed> has more than max-results items, the returned feed will contain a next link (atom:link element with a rel="next" attribute) that can be used to obtain the next set of items. By using the next link in each subsequent feed, you can go through all your items, no matter the number.

If such a link is not present, all items have already been retrieved.

For a more detailed explanation of this method, learn about it in the product items feed document.

XML elements reference

The Content API for Shopping uses XML elements from four schemas, with an additional schema for the data type your are working with. For information about the standard Google Data API elements, see the Atom specification and the Kinds document.

Schema Namespace Prefix Schema URL
Atom atom http://www.w3.org/2005/Atom
Atom Publishing Protocol app http://www.w3.org/2007/app
GData gd http://schemas.google.com/g/2005
Content API sc http://schemas.google.com/structuredcontent/2009
Products specific namespace scp http://schemas.google.com/structuredcontent/2009/products

The following element-reference sections describe the XML elements that appear in Data API requests and responses.

Certain symbols may appear next to attributes and child elements. The following table explains those symbols:

Symbol Description
@attributeName Item is an attribute.
name? Item is optional.
name+ At least one instance of item is required.
name (no symbol) Exactly one instance of item is required.

For individual element reference, please check the Product Item Feed.

The specification on this page is provided under the following Patent License.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.