Saturday, November 12, 2016

The secret, 500-item Blogger feed.

Feeds are broadly useful ways to share your blog posts, and I make use of feeds in some of the tricks in this blog.

Unfortunately, Blogger keeps messing with them.

In 2011, Blogger started paginating its feeds at 500 posts The entire feed was still available, but in chunks. You had to hack the url parameters to get the whole feed, one 500-post segment at a time.

Recently, Blogger ratcheted that down to a mingy 150 posts per chunk, a real pain in the neck for some of us who have been cranking out blog posts for a while. (Don't snicker: I have been very busy on my main blog.)

However, there is an alternative feed for your blog that still goes up to 500. If you use your entire feed the larger size can be a lot easier to work with.

Note however that most people don't need the whole feed. If you are just using your RSS feed as most people do, to broadcast your content to newsreaders and subscribers, the standard feed should do the trick. If so, don't worry about any of this.

An example of a newsreader is the "Reading List" feature that is part of Blogger, where you can subscribe to other blogs and even web sites and feeds from social media. That is done with feeds

If you use feeds to make sidebar gadgets like this one, though, using the alternative, 500-item feed could be helpful.

The standard feed, now maxed out at 150 posts, is based on your blog's url as follows:
BLOG-URL/feeds/posts/default
Put in your blog url where indicated. The feed for Too Clever, for instance, is
too-clever-by-half.blogspot.com/feeds/posts/default
It can be extended to 150 posts, but no more, by adding the "max-result" parameter to the url as follows:
too-clever-by-half.blogspot.com/feeds/posts/default?max-results=150
Note that (1) You can specify a greater max-results number than 150, but it will not change the result displayed, also (2) I do not actually have 150 posts on this blog.

If I did I could specify the second 150-post chunk by using the "start-index" parameter as follows:
too-clever-by-half.blogspot.com/feeds/posts/default?max-results=150&start-index=151
which would show items 151 through 300, and so on.

The alternative feed is based on your blog ID number as follows:
www.blogger.com/feeds/ID_NUMBER/posts/default
Adding "?max-results=500" cranks it up to 500 posts, but no more. "start-index" will give you access to the next chunk or chunks as needed.

If you are dealing with a lot of posts, it's an improvement.

Here's how to find your blog's ID number.

Go to your blogger dashboard, www.blogger.com, and select any of the dashboard sections that control the blog you want (such as posts or settings). Look in the browser bar for the url of that page.

Where the url says "blogID=" followed by a long number—that's the number. Plug it in to the above and you have your feed.

Blogger blogs have many standard feeds, including several comments feeds, and all have their blog-ID equivalents. Most of these do not have any size differences from the regular feeds that I have been able to find.

However, there is a size advantage to using the ID-based label feeds. Those feeds, with "?max-results=500," can similarly include as many as 500 posts at one go. Each shows all the posts with the specified label.

The form for that feed is
www.blogger.com/feeds/ID_NUMBER/posts/default/-/LABEL-NAME?max-results=500
where "LABEL-NAME" is the label. You have to swap that in too.

Remember that labels are case sensitive; a url for "Cheese" will not find posts labeled "cheese."

This is not going to make a difference to most bloggers. But for some of us, this is a real improvement over the latest feed restrictions.

The blog-ID-based feed is also an alternative if you are forwarding your regular feed to a service like Feedburner.

4 comments:

  1. hi,,,
    I used the max-results=500 for each feed request (three years ago), the code still works with no problems.

    ReplyDelete
  2. Hello, I used the code and iTunes only shows 300 items. Also how do I find my label name on Blogger?

    ReplyDelete
    Replies
    1. Hi Josh,

      I suppose Blogger might have broken this recently. But I do not follow your "iTunes" remark. Does that refer to a label? Can you post the feed?

      Delete
  3. Thanks so much! This fixed my podcast feed perfectly.

    ReplyDelete