My favorites | English | Sign in

Google Data APIs

Google Data APIs Overview

The Google Data APIs provide a simple standard protocol for reading and writing data on the web.

The Data APIs use either of two standard XML-based syndication formats: Atom or RSS. They also have a feed-publishing system that consists of the Atom publishing protocol plus some extensions (using Atom's standard extension model) for handling queries.

Contents

Background: Atom and RSS

There are two common XML-based syndication formats for feeds and other data interchange on the web: Atom and RSS. RSS has been around longer, in various versions; Atom is more recent but has more features.

Atom also provides the Atom Publishing Protocol (APP), an HTTP-based protocol for publishing and editing web resources. For example, using the APP, you can send an HTTP GET request to ask for a particular resource (such as a feed or entry); the server returns a representation of that resource in the Atom syndication format. You can also create, edit, and delete resources, using POST, PUT, or DELETE, respectively. This use of HTTP requests for a publishing and editing protocol is in the spirit of the REST approach to web service interfaces.

In various contexts, it's useful to be able to send a query to a server and receive a response containing a list of matching results. Neither Atom nor RSS provides a way to do that, but Atom provides an extension mechanism. The Google Data APIs use this standard extension mechanism to allow queries.

About the Google Data APIs

The Google Data APIs are a new protocol based on the Atom 1.0 and RSS 2.0 syndication formats, plus the Atom Publishing Protocol.

The Data APIs extend those standards in various ways, using the extension mechanisms built into the standards. A Data API feed conforms to either the Atom or RSS syndication formats. The Data API publishing model conforms to the Atom Publishing Protocol.

To acquire information from a service that has a Data API, you send an HTTP GET request; the service returns results as an Atom or RSS feed.

You can update data (where supported by a particular Data API) by sending an HTTP PUT request.

All sorts of services can provide Data API feeds, from public services like blog feeds or news syndication feeds to personalized data like email or calendar events or task-list items. The RSS and Atom models are extensible, so each feed provider can define its own extensions and semantics as desired while still conforming to the standards. A feed provider can provide read-only feeds (such as a search-results feed) or read/write feeds (such as a calendar application).

For example, a blogging application might provide a feed for each blog, and a comment feed for each blog entry. A calendar application might allow you to send full-text search queries using the Google Data API protocol, and return results in the Google Data API syndication format.

Because the Data APIs are built on basic technologies—HTTP and standard syndication models—you can send Data API requests and process the resulting feeds in a variety of ways: traditional syndication aggregators/feed readers, JavaScript/AJAX-based clients in a web browser, standalone applications, or any other approach you like. The Data API protocol is programming-language-neutral; you can write a client in any programming language that lets you issue HTTP requests and parse XML-based responses.

Creating and deleting a feed is left up to the service; the Data API protocol does not provide ways to create or delete a feed.

The following table lists Google Data API features and indicates whether they're available in other related technologies. For more information about these features, see the protocol reference document.

Feature Data APIs Atom* RSS 2.0
Syndication Format Y Y Y
Queries Y N N
Updates Y Y N
Optimistic Concurrency Y N N
Authentication Y N N

* The "Atom" column refers to both the syndication format and the publication protocol.

Motivation: Why the Data APIs?

Google's mission is to organize the world's information and make it universally accessible and useful. Sometimes making information accessible requires making it available in contexts other than a web browser. Thus, Google provides APIs to let client software request information outside of a browser context.

The Google Data APIs provide a general model for feeds, queries, and results. You can use the Data APIs to send queries and updates to any service that has a Data API.

Syndication is an effective and popular method for providing and aggregating content. The Data APIs provide a way to expand the types of content that Google can make available through syndication; in particular, they let you use the syndication mechanism to send queries and receive query results. The Data APIs also let you send data to Google, and update data that Google already has.

Back to top