IMPORTFEED function in Google Sheets can be used to import the RSS feed in the worksheet.
This can be useful if you want to keep track of new blog posts or news items on your favorite website. For example, you can create a list of websites that you want to follow and quickly get the updated list of new at one place.
This Tutorial Covers
Here is the syntax of IMPORTFEED in Google Sheets:
IMPORTFEED(url, [query], [headers], [num_items])
Now let’s have a look at some useful examples of using the IMPORTFEED function in Google Sheets.
Suppose you want to get the latest blog posts on Tech Crunch website (which is one of the popular tech sites).
Here is the formula that will fetch the items from the feed of Tech Crunch:
Note that I have provided two arguments in the above formula:
Below is the result output.
I can also have the URL in a cell and use the cell reference in the formula.
Suppose I have the feed URL of Tech Crunch in cell A1, I can use the below formula:
Here is the result output:
Note that the default number of items that you get in the worksheet would vary depending on the feed settings. For example, in the case of Tech Crunch, the above formula would return 20 items, as that’s what has been set by the webmaster of Tech Crunch. On the other side, I have set 10 items as default for Productivity Spot, and hence the formula would only return the latest 10 posts.
In the above example, the formula extracted all the items in the feed.
However, if you want to fetch only the latest five or latest 3 posts, you can do that specifying it in the formula.
Here is the formula that will fetch the top five results from the feed:
In the above formula, I have specified the number of items as 5 (which is the last argument of the formula).
Note that if you specify a number that is more than that of the number of items in the feed, it will return the default number only. For example, in this Productivity Spot’s feed, the maximum number of items to be displayed is set to 10. Even if you make the num_items argument as 20, it will still show only 10 feeds.
You can also specify what items you want from a feed. For example, you may only want the post title or the post URL and not the other columns (such as author, date created, and summary).
Here is the formula that will fetch the post title from the feed URL:
The “items title” part of the formula returns the post titles of the items in the feed.
The output will look as shown below:
Note that you can not specify multiple queries in the same formula. So for example, if you want the post title in one column and post URL in second, you need to use two separate IMPORTFEED formulas.
Here is the formula that will return the URL from the feed:
You can use the IMPORTFEED function to create a template that will quickly show you the latest posts from your favorite websites.
For example, if you want to keep track of the latest posts from major websites, you can create a table with the site name, and it’s feed URL (as shown below):
Note that the feed URL may differ for websites. Major websites often list their feed URL on their website.
Now, on a separate sheet, you can create a drop-down that shows the names of these websites (as shown below).
Adjacent to it, you can use the IMPORTFEED formula to fetch the feed title and URL. Below is the formula I have used to get the feed title:
=IMPORTFEED(VLOOKUP(A1,'Website Names'!$A$2:$B$6,2,0),"items title",TRUE,10)
I have used the VLOOKUP formula to fetch the feed URL based on the website name (the table array for the VLOOKUP function is on another sheet ‘Website Names’). This URL is then used in the IMPORTFEED function to fetch the titles.
Similarly, another IMPORTFEED function is used in the adjacent cell to fetch the post URL from the feed.
You can read more about the IMPORTFEED function here.
You May Also find the following Google Sheets Tutorial Useful:
Using FILTER Function in Google Sheets (explained with Examples)
How to Search in Google Sheets and Highlight the Matching Data
How to Use OR Function in Google Sheets (with Examples)
How to Use IMPORTRANGE Function in Google Sheets (with Examples)
How to Use IMPORTDATA function in Google Sheets