Important: We will discontinue support for the v2.0 Google Data API on September 30th, 2024. To ensure continued functionality, update your applications that rely on the v2.0 Google Data API to the latest API version. For the latest version, use the links in the left-side navbar. Note: while some GET requests (such as listing posts) will continue to be supported as feed URLs, there are minor differences in their behavior. For detailed information, refer to the Blogger Help documentation.
This document provides detailed reference documentation for the raw protocol (XML and HTTP) for the Blogger Data API.
This document doesn't contain information about the programming-language client libraries. For client-library reference information, see the links from the programming-language-specific sections of the developer's guide.
Contents
Audience
This document is intended for programmers who want to write client applications that can interact with Blogger.
It's a reference document; it assumes that you understand the concepts presented in the developer's guide, and the general ideas behind the Google Data APIs protocol.
Blogger feed types
Blogger provides two representations of blog content in feeds: full feeds and summary feeds. A full feed contains full blog posts, while a summary feed contains only a short snippet of each post.
A blog's owner can specify, using GUI settings, whether the blog supplies a full feed or a summary feed to syndicators and aggregators.
When your client app sends an unauthenticated request for a feed, it receives whichever type of feed the blog owner has specified.
When your client app sends an authenticated request, however, it always receives a full feed, regardless of what the blog owner has specified.
Blogger query parameters reference
The Blogger Data API supports almost all of the standard Google Data API query parameters.
Blogger does not support the author
parameter.
The updated-min
and updated-max
query parameters
are ignored unless the orderby
parameter is set to
updated
. For example, the following URL retrieves all of the blog
posts which have been updated from March 16, 2008 to March 24, 2008:
http://www.blogger.com/feeds/blogID/posts/default?updated-min=2008-03-16T00:00:00&updated-max=2008-03-24T23:59:59&orderby=updated
Blogger elements reference
The Blogger Data API uses only standard Atom elements; for more information, see the Atom 1.0 syndication format specification and the Atom Publishing Protocol.
The rest of this section provides a couple of specific notes about Blogger's use of some standard elements.
Draft entries
A draft blog entry is marked using the <app:draft>
extension element defined in the Atom Publishing Protocol document. Here's an
example of a draft entry:
<entry xmlns:app='http://www.w3.org/2007/app'> ... <app:control> <app:draft>yes</app:draft> </app:control> </entry>
If no <draft>
element is specified, then the entry is not a draft.
Publication dates and updated dates
The timestamp given in the standard Atom <published>
element corresponds to the "post date" that a user can set in the
Blogger GUI.
When your client creates a new entry, if the client doesn't specify a value
for <published>
, then Blogger sets the entry's post date to
the current server time. When your client edits an entry but doesn't specify a
<published>
value, Blogger leaves the entry's post date
alone.
However, if your client does specify a value for the
<published>
element when creating or editing an entry, then
Blogger sets the entry's post date to the specified value. This can be useful
for tasks like importing old entries from another blogging system (while keeping
the original creation dates).
Blogger uses the standard Atom <updated>
element to
indicate when an entry was last changed. Your client can't control the
<updated>
value; Blogger always sets the entry's last-updated
date to the current server time whenever your client posts or edits an
entry.
You can use the standard Google Data API published-min
,
published-max
, updated-min
, and
updated-max
query parameters to request entries based on their
<published>
or <updated>
values. However,
for notes about querying on updated dates, see Blogger
query parameters reference.
Linking comments to posts
The Blogger export
format contains both posts and comment entries in one Atom feed document.
In order to differentiate between the two types of entries, Blogger utilizes the
<atom:category>
element. This element will have a
term
parameter that reflects whether the entry is for a post or a
comment.
Furthermore, linking the comment entry to the post entry it belong to is
accomplished through the use of the Atom Threading Extension. In
the example below, the <thr:in-reply-to>
element in the
comment entry will point to the post by using the post entry identifier in the
ref
parameter. It also links to the post's HTML URL through the
href
parameter.
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0"> ... <-- A blog post entry --> <entry> <id>tag:blogger.com,1999:blog-blogID.post-postID</id> <content type="html">This is my first post</content> <link rel="alternate" type="text/html" href="http://blogName.blogspot.com/2007/04/first-post.html"> </link> <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/blogger/2008/kind#post"/> ... </entry> <-- A comment to the blog post entry --> <entry> <id>tag:blogger.com,1999:blog-blogID.post-postID.comment-commentID</id> <content type="html">This is my first comment</content> <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/blogger/2008/kind#comment"/> <thr:in-reply-to href="http://blogName.blogspot.com/2007/04/first-post.html" ref="tag:blogger.com,1999:blog-blogID.post-postID" type="text/html"/> ... </entry> </feed>