代码改变世界

Google Base Data API

2010-04-11 22:21  小寇子  阅读(393)  评论(0)    收藏  举报

What is the Google Base Data API?

 

Google Base is a free service for submiting all kinds of content for Google to host and to make searchable online. It allows content providers to upload structured data to Google, surface it across Google search properties, and syndicate it via apis, gadgets and gadget ads.

What can we do with Google Base Data?

1.The API allows you to programmatically manage your Google Base content. Use it to post new items, edit existing items, or delete items.

2.The API is built on top of a rich query language. By referencing attributes in your search queries, you can obtain very specific results.

3.The Google Base Data API uses the same underlying protocol as the other Google Data APIs.

4.You can target the appropriate audience for your content by choosing from popular item types such as Housing, Jobs, Products, and Events & activities, or by creating your own. Published content can also surface across certain Google properties such as Google Product Search.

 

 

 

Getting Started

For using Google Base Data ,you should be familiar with HTTP protocol and the Atom syndication format.

Terminology

Google Base defines these terms slightly differently than the XML standard.

Data items

A data item is an XML construct that describes a single entry in Google Base. Each data item consists of a set of attributes that describe it. You can see an example of a data item below.

Attributes

Attributes are typed name/value pairs that describe the content. Each attribute associates a value with an attribute name to describe the data item. For example, in Google Base, <g:label>kung pao chicken</g:label> is an attribute (rather than an element.) You can specify multiple values for a single attribute name. For example, the data item below specifies multiple values for the label attribute. See Attributes and Queries for more information about attributes.

Item types

The item type describes the type of data. Each item type has a set of recommended attributes for describing it. There are many standard item types in Google Base, each with its own set of recommended attributes. The Recommended Attributes page lists the valid item types and their associated approved attributes.

Google Base data API services

The Google Base data API exposes the following functionality via a webservice:

  • searching for data items
  • discovering metadata
  • inserting, updating, and deleting data items