Tip: Understanding the Atom/RSS feeds created by Blogger

If you've heard of RSS feeds, you probably know that they're a way for your site's fans to keep up to date with your site by "subscribing" to your feeds. If they have a feed reader, any time you publish a new post, they'll see it in their reader's dashboard. You might also know that you can use those feeds to automate publishing to 3rd party services such as Facebook (using RSS Graffiti), transform your feed using Feedburner, and lots of other neat functionality. But you can also turn around and integrate those feeds back into your site, creating cool slideshows, custom sections of content, and much more (for an example check out Pinch Gallery's featured section on their homepage and their news section in the left).

But before we go into creating cool functionalities for your blog it's best to understand the types of feeds that Blogger provides for you.


Full site feed:

Atom 1.0: http://YOURBLOG.blogspot.com/feeds/posts/default
RSS 2.0: http://YOURBLOG.blogspot.com/feeds/posts/default?alt=rss

Comments-only feed:

Atom 1.0: http://YOURBLOG.blogspot.com/feeds/comments/default
RSS 2.0: http://YOURBLOG.blogspot.com/feeds/comments/default?alt=rss

Label-specific site feed:

Atom 1.0: http://YOURBLOG.blogspot.com/feeds/posts/default/-/label1
RSS 2.0: http://YOURBLOG.blogspot.com/feeds/posts/default/-/label1?alt=rss

Posts having ALL of the labels specified feed:

Atom 1.0: http://YOURBLOG.blogspot.com/feeds/posts/default/-/label1/label2/etc
RSS 2.0: http://YOURBLOG.blogspot.com/feeds/posts/default/-/label1/label2/etc?alt=rss

Individual post comment feed:

Atom 1.0: http://YOURBLOG.blogspot.com/feeds/postId/comments/default
RSS 2.0: http://YOURBLOG.blogspot.com/feeds/postId/comments/default?alt=rss

Note: You can find the postId of an individual post from the Posting | Edit Posts tab. Simply mouseover the 'Edit' link next to a particular post, and that postId will be displayed in your browser's status bar.


Blogger does not provide the ability to
  • find all posts having either label 1 or label 2 (disjunction), or
  • find all posts having label 1 but not label 2 (negation)

In future posts we'll be discussing ways to use these feeds within your page to create all sorts of effects... stay tuned!

Comments

  1. Hello

    I m anxious to know the difference between

    http://YOURBLOG.blogspot.com/feeds/posts/default

    and

    http://www.blogger.com/feeds/BLOGID/posts/default

    Thanks in advances

    --

    prac

    --

    ReplyDelete
    Replies
    1. Hi Philippe, they're the same thing. Just two different ways of accessing the same content and functionality. Think of the method you posted as a way of accessing the feed independently of the domain that you choose.

      Delete
    2. Hello David

      Thanks for your answer. Why I ask the question, is, I m trying to use the feeds for a Google Sites page, which need to use https if we call an URL inside a Google Gadget.

      With IE9, this feed https://www.blogger.com/feeds/30801821/posts/default?redirect=false doesn't display pictures but, very strange, this one do it : https://viti-vino.blogspot.com/feeds/posts/default?redirect=false

      any ideas ?

      --

      prac

      --

      Delete
    3. Interestingly I believe this should work and display images: http://www.blogger.com/feeds/30801821/posts/default?redirect=false

      I think it's an issue with IE 9, HTTPS, and "external" resources (images).

      Delete
    4. Re

      Yes, without httpS, you right, there is apparently no diffrence

      Thanks for the interest

      --

      prac

      --

      Delete
  2. A random-posts widget that I found includes this code:

    script src='/feeds/posts/summary?max-results=10&alt=json-in-script&callback=getRandom'></script

    (opening curly brackets remove to make the editor happy)

    This makes me wonder - is there also a /summary feed?

    I would really like to use the random-posts widget (or some other one :-), but restrict it to posts that have one label. Any suggestions?

    ReplyDelete
    Replies
    1. Yes, there is a "summary", but I find it to be a waste, mainly in that you can't customize the length of the summary, and the summary will cut off in the middle of a sentence. That's fine if you only want the title and link and maybe the first sentence of the post, but beyond that I find that the summary usage is just problematic. In this case they seem to have used summary so as to cut down on the size of the returned RSS feed, but in that example it's only getting the last 10 results, then randomizing them. A random-posts widget would need to get ALL of the results, then select random posts from all.

      Delete

Post a Comment