Import RSS or Atom Feeds into Google Sheets

There are lots of RSS and ATOM feeds out there on the internet, covering just about every subject imaginable.

Sometimes it’s handy to be able to pull information from such feeds into a speadsheet, forming a kind of personal feed reader, and in Google Sheets it’s pretty easy to do.

What you need is the IMPORTFEED function. Here’s the basic syntax:

IMPORTFEED(url, [query], [headers], [num_items])

The only obligatory field is (as you’d imagine) the url of the feed, including protocol (e.g. http://). It can be either a full URL enclosed in quotation marks, or it can be a reference to another cell containing the appropriate string.

The optional query parameter specifies what data to fetch from the specified url. It defaults to “items”, but other valid values include feed [type] and items [type]:

“feed” (without parameter [type]) returns one row containing feed information like title, description, and url. The parameter [type] can be title, description, author, or url.

“items” (without [type]) returns a table containing items from the feed. The parameter [type]  can be title, summary, url (of the single item), or created (the creation date o the item).

The optional headers parameter determines whether to include column headers as an additional row above the returned feed value(s).

The optional num_items argument defines, where appropriate, the number of items to return, starting with the most recent. Where num_items is not specified, any items currently published on the feed are returned.

As an example, let’s get information about Drive Bunny’s Feedburner feed. In cell A1 is the code:

=ImportFeed("", "feed", TRUE)

I’ve specified TRUE for the headers parameter, so we get titles for the columns. Here’s the result:

Click image to enlarge

Click image to enlarge

Here’s another example, this time returning the last 8 of the article titles from the same feed. Here the query parameter is “items title”:

Click image to enlarge

Click image to enlarge

As you can see, with just a little work you can easily import data from your favourite feeds; if you want to, you can even aggregate news feeds from different sources into the same spreadsheet.


Leave a Reply

Your email address will not be published. Required fields are marked *