Blogger

Reference Guide

Important: This is an old version of this page. For the latest version, use the links in the left-side navbar.

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 q (text search) and author parameters.

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://purl.org/atom/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/opensearchrss/1.0/"
      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 commment</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>

Back to top

Authentication required

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

Signing you in...

Google Developers needs your permission to do that.