July 23, 2009

How to Get Feeds For Specific Labels in Blogger

Blogger generates feeds for various items on your blog including posts and comments. Not many people know that these feeds can accept certain filters. The labels filter is one of them.

You might want to publish feeds for specific labels for various purposes. As an example, Aspin.com allows coders to submit RSS file of asp related resources into their database. You can label ASP specific posts from your blog as "asp" and publish its feed. You can label php related posts as "php" and publish its RSS to another resource. You may also want to publish specific feeds for targeted audience. Labels are the suitable method to group your posts by topic. These topics can then have their individual feeds. Your visitors can subscribe to feeds of their choice. All you have to do is to publish appropriate feed URLs on a suitable location.

Here is how you can get post feeds for specific labels.

The Basics

To begin with, site feeds must be enabled in your Blogger powered blog. The posts feed URL of a Blogger blog (such as this one) looks something like this:


Append /-/<labelname> at the end of this URL; thats it!


Tips and Tricks

If your label contains special characters, you must URL-encode them properly. For example, the label might contain spaces. The spaces should be encoded as %20:


If you want to filter posts by multiple labels, simply specify the list of labels separated by slash. The following feed will contain posts that contain labels "php" and "asp":


It is also possible to specify more than two labels. The following feed will contain posts that contain labels "php" and "image manipulation" and "gd library":