API stands for Application Programming Interface. The idea is to have our web or application to talk directly to the server with the given detail command. In short explanation, API is the agent who tells the service provider, that client needs this or that.

Sometimes, in the XML template is found Javascipt code for displaying post summary, this is part of the API. With API, we can get Post, Comment, Page, etc.
Retrieve Post with filtered Label

In above, we tell the server to retrieve a post with label Foo, and the result is in every post contain the label 'Foo' with Atom format.

The protocol accepts this parameter:
  • alt
    Output type of result. This can be json-in-script, atom or rss
  • callback
    value is used for function name while processing in other script
  • max-results
    This will tell how many posts will be retrieved.
  • orderby
    this will sort the result based criteria: updated, lastmodified (default), and starttime.
  • published-min, published-max
    post publication dates.
  • updated-min, updated-max
    post update dates. These parameters can only be used with orderby parameter and set to updated.
  • start-index
    Start indexing from 1, this is used for paging the result.

Example URL

The result will be post with label 'foo' with json escaped, max result no less than 100 post and with the callback Bar, if we combine this to javascript we can call the function with name Foo to print its result in the current page.

Blogger API now has 3 version, we can check int Blogger Developer Web.

Share This

Creative Commons License
Blogger Book is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.