The IMPORTFEED function in Google Sheets helps to fetch or import RSS or ATOM feeds in a human-readable format to the desired Google Spreadsheet. The IMPORTFEED function comes in handy if you want to know the latest blog posts or new items of a particular website.
Let us understand how to use the IMPORTFEED function with the help of Google Sheet tips provided on this page. Read on to find more.
Table of Contents
Google Sheets IMPORTFEED Function Syntax
The syntax of IMPORTFEED function in Google Sheets is:
=IMPORTFEED(url, [query], [headers], [num_items])
- url – The RSS or ATOM feed’s URL, including the protocol (e.g., http://). The value for the URL must be either enclosed in quotation marks or a reference to a cell containing the relevant text.
- query – [ OPTIONAL – “items” is the default value ] – Indicates what data should be retrieved from the URL.
- “feed” returns a single row with feed information such as the title, description, and URL.
- “items” returns a full table containing feed items. If num items are not specified, the feed returns all currently published items.
- headers – [ OPTIONAL – by default FALSE ] – Whether column headers should be added as an extra row on top of the returned value.
- num items – [ OPTIONAL ] – The number of items to return for item queries, starting with the most recent. If num items are not specified, the feed returns all currently published items.
Now let us understand how to use the IMPORTFEED function in Google Sheets with examples.
- How to Use IMPORTDATA function in Google Sheets? (Fetch CSV/TSV File)
- How to VLOOKUP from Another Sheet in Google Sheets: Vlookup Between Two Sheets
- How to Insert an Image in a Cell in Google Sheets (Add/Customize/Delete)
Fetching All Items from FEED URL using IMPORTFEED
Let us say that, I want to fetch all the latest published blog posts of www.sheetstips.com into a Google Spreadsheet. The steps to achieve the same are given below:
- Step 1: Open the empty Google Spreadsheet.
- Step 2: Move to the blank where you would like to import the data.
- Step 3: Now type the formula as =IMPORTFEED(“https://sheetstips.com/feed”,,TRUE).
- Step 4: Press the “Enter” button and you will see the results as shown below.
In the above example, we have used TRUE which is meant for headings, resulting in an additional row with the heading in the results.
Alternatively, you can also use the formula =IMPORTFEED(A1,,TRUE) to fetch the same feed. To get this done, you will have to paste the domain URL of the page that you would like to fetch into the sheet. For example, If I place the “https://sheetstips.com/” URL in cell 1 (A1) and use the formula “=IMPORTFEED(A1,,TRUE)” in another cell, it gives the same results that we got in the above section. Refer to the image below to see the example.
Fetching Specified Number of Items using IMPORTFEED in Google Sheets
In the previous section, the IMPORTFEED formula fetched all the data from the specified website.
What if you want to fetch only a specified number of feeds or items?
Google Sheets IMPORTFEED also allows us to fetch only a specified number of items. For example, If I want to fetch the latest 10 posts of sheetstips.com. We can get this done by following the steps given below:
- Step 1: Move to the empty cell on the Google Spreadsheet.
- Step 2: Now type the formula “=IMPORTFEED(“https://sheetstips.com/feed”,,TRUE,10)“.
- Step 3: Press the “Enter” button.
Now you will see the results as shown below.
Fetching Specific Items from Feed URL using IMPORTFEED
Google Sheets IMPORTFEED function allows us to specify which items from a feed we want to fetch. For example, you might only need the post title or URL but not the other columns like the author, creation date, or summary. We can get this done by following the steps as listed below:
- Step 1: Move to an empty cell of Google Sheets where you would like to fetch the data.
- Step 2: Now enter the formula “=IMPORTFEED(“https://sheetstips.com/feed”,“items title”,TRUE)“.
- Step 3: Press the “Enter” button and you will see the results as shown in the image below.