How to Use IMPORTFEED in Google Sheets

How to Use IMPORTFEED in Google Sheets

In this tutorial, I am going to show you how to use IMPORTFEED in Google Sheets.

One important functionality of Google Sheets is its ability to be a database that automatically updates itself. When you want to take note of the latest news or updates for a certain website, you can’t help but check them all once at a time.

But if you’re working for a company that needs the information of thousands of articles from different websites, doing them manually can be impossible. This is where IMPORTFEED in Google Sheets works the best.

How to Use IMPORTFEED in Google Sheets

  1. Prepare the range where the results of the IMPORTFEED will be
  2. Decide if you want to apply a query search, headers, or number of items restriction on the results
  3. Use the formula: “=IMPORTFEED(URL, [query], [headers], [num_items])”
  4. Hit ENTER or click on another cell to finish
How to Use IMPORTFEED in Google Sheets
How to Use IMPORTFEED in Google Sheets

Using IMPORTFEED in Google Sheets

IMPORTFEED in Google Sheets lets you retrieve data from a publicly available RSS or Atom feed into your spreadsheet.

To use IMPORTFEED in Google Sheets, you’ll need to know the URL of the RSS or Atom feed you wish to be imported, the sheet you want the date to be stored into, and the range in the sheet where you want the data to be put into.

This will automatically import new data from the mentioned RSS or Atom feed each time it is updated through IMPORTFEED in Google Sheets.

The syntax of IMPORTFEED is:

=IMPORTFEED(URL, [query], [headers], [num_items])

Where

  • URL can either be enclosed in quotation marks inside the formula or be a reference to a cell containing the appropriate text (without quotation marks).
  • query  [OPT. – “ITEMS” by default] – Specifies what data to fetch from the URL, which must be enclosed in quotation marks
    • “FEED” returns a single row containing feed information including the title, author, description, and url
    • “FEED <TYPE>” returns a particular attribute of the feed; where <TYPE> can be TITLE, AUTHOR, DESCRIPTION, or URL
    • “ITEMS” returns a full table containing items from the feed including the title, author, url, date created, and summary
    • “ITEMS <TYPE>” returns a particular attribute of the requested item(s), where <TYPE> can be TITLE, AUTHOR, URL, CREATED, or SUMMARY
  • headers [OPT. – FALSE by default] – will include headers on top of the returned value/s as an extra row
  • num_items [OPT. – returns all items by default] – the number of items to be returned, beginning from the most recent.

If you are going to declare a value for the num_items parameter but not for the prior optional parameters, you must still include a spot for them by adding in commas like this

=IMPORTFEED(URL,,, [num_items])

Leaving a blank for these parameters will let IMPORTFEED use the default values instead.

The URL Parameter of IMPORTFEED in Google Sheets

The most important and only parameter that is required for IMPORTFEED in Google Sheets to function is the URL.

The most basic syntax of IMPORTFEED in Google Sheets is

=IMPORTFEED(URL)

Where the IMPORTFEED Function will show all ITEMS as the default option.

The URL here cannot be just any URL that you can grab from random websites but must be the URL for the website’s RSS or ATOM Feed.

To find this URL, you can go to a website with a feed and right-click anywhere on an empty space. On the context menu that shows up, click on ‘View page source’ and you’ll be taken to a different tab.

The homepage of techcrunch.com and the context menu where View page source is highlighted
The homepage of techcrunch.com and the context menu where View page source is highlighted

On the page source, hit CTRL + F and type in either “RSS” or “ATOM”.

On the results, you should see the URL for the 1st parameter of IMPORTFEED in Google Sheets as seen below.

The source page for the homepage of techcrunch.com where the instances of the term RSS are highlighted
The source page for the homepage of techcrunch.com where the instances of the term RSS are highlighted

This URL can then be used as the value for IMPORTFEED in Google Sheets but must be enclosed in quotation marks.

Alternatively, I can enter it as is in a cell and then use the reference to that cell as the value for the IMPORTFEED Function.

The IMPORTFEED Function with the techcrunch.com feed URL
The IMPORTFEED Function with the techcrunch.com feed URL

Here’s another example for the news.google.com ATOM Feed.

The IMPORTFEED Function with the news.google.com ATOM URL
The IMPORTFEED Function with the news.google.com ATOM URL

Depending on what you need, you may only need the RSS or ATOM URL to be used with IMPORTFEED in Google Sheets.

Using the Query Optional Parameter

If you need a specific set of data only from the IMPORTFEED in Google Sheets, you’ll need to use a query. I’ve detailed the query options at the start of this tutorial if you need more references.

The example below is the default FEED where you’ll get a single line containing the information about the feed’s title, author, description, and URL.

The IMPORTFEED Function with the news.google.com ATOM URL FEED query
The IMPORTFEED Function with the news.google.com ATOM URL FEED query

Below is an example of the query ITEMS which will display all items in that feed. By default, all items will be displayed unless a value for the num_items parameter is specified.

The IMPORTFEED Function with the news.google.com ATOM URL ITEMS query
The IMPORTFEED Function with the news.google.com ATOM URL ITEMS query

Below is another example for the techcrunch.com/feed where all items are displayed with the headers parameter set to TRUE showing the value of each column.

The IMPORTFEED Function with the techcrunch.com feed URL ITEMS query
The IMPORTFEED Function with the techcrunch.com feed URL ITEMS query

The next example is for the more specific query ITEMS TITLE where only titles on that feed are displayed.

The IMPORTFEED Function with the news.google.com ATOM URL ITEMS TITLE query
The IMPORTFEED Function with the news.google.com ATOM URL ITEMS TITLE query

Now, there will be times when a feed doesn’t contain all the information that can be captured by IMPORTFEED in Google Sheets.

Such as in this example where ITEM CREATED is being queried where the creation dates were supposed to be displayed.

In this case, though, the new.google.com feed either doesn’t have values for creation dates or its format is incompatible with IMPORTFEED in Google Sheets.

The IMPORTFEED Function with the news.google.com ATOM URL ITEMS CREATED query showing empty results
The IMPORTFEED Function with the news.google.com ATOM URL ITEMS CREATED query showing empty results

If the feed specified has creation date values, the results will be similar to what is shown below.

The IMPORTFEED Function with the techcrunch.com feed URL ITEMS CREATED query
The IMPORTFEED Function with the techcrunch.com feed URL ITEMS CREATED query

Knowing which query you need will make the most impact in how you use IMPORTFEED in Google Sheets.

Using the Headers Optional Parameter

Even if it’s optional, I often find the headers formula of IMPORTFEED in Google Sheets to be really useful, especially in how it adds labels to the columns that I have.

The IMPORTFEED Function with the news.google.com ATOM URL with headers
The IMPORTFEED Function with the news.google.com ATOM URL with headers

This works for all types of queries.

Using the Number of Items Optional Parameter

The last parameter, which is also optional is num_items.

This indicates how many items will be displayed by IMPORTFEED in Google Sheets.

Take note that this works even if you only have the URL parameter filled out but you need to consider the other parameters in the formula so that you won’t have an error as shown below.

The IMPORTFEED Function with the news.google.com ATOM URL where the syntax was poorly executed resulting in an error
The IMPORTFEED Function with the news.google.com ATOM URL where the syntax was poorly executed resulting in an error

What happened with the example above is that since the num_items value 1 took up the 2nd position of the parameters of IMPORTFEED in Googe Sheets, it was rejected, as the query parameter only accepts specific strings as its value.

To fix this, I only need to add commas to the formula bar until I get to the exact position of the num_items parameter in the IMPORTFEED syntax.

The IMPORTFEED Function with the techcrunch.com feed URL where only the num_items parameter was used from the optional ones
The IMPORTFEED Function with the techcrunch.com feed URL where only the num_items parameter was used from the optional ones

One more thing to remember is that num_items doesn’t have any effect if used with the FEED query. That said, it won’t cause any errors.

IMPORTFEED is an example of a function in Google Sheets that is extremely useful for specific niches and industries, like Digital Marketing.

For functions with a wider range of applications, you may refer to my other tutorials just like the one that I created for the INDEX and MATCH Functions.

Frequently Asked Questions about How to Use IMPORTFEED in Google Sheets

How can I use IMPORTFEED in Google Sheets?

To use IMPORTFEED in Google Sheets, you need the RSS or ATOM Feed URL and the IMPORTFEED Formula: “=IMPORTFEED(URL). Additionally, you may also use the optional parameters of IMPORTFEED in Google Sheets which are query, headers, and num_items.

How can I get the RSS or ATOM Feed URL to be used with IMPORTFEED in Google Sheets?

To get the URL parameter of IMPORTFEED in Google Sheets, you just need to get to the website for the RSS or ATOM Feed. Next, right-click on an empty space, click View page source, and search for the URL associated with search results of the term RSS or ATOM.

Conclusion on How to Use IMPORTFEED in Google Sheets

You can use IMPORTFEED in Google Sheets by first preparing the range where the results will be. Then, decide on the optional parameters if you want to apply a query search, headers, or a number of items restriction on the results. Next, use the formula: “=IMPORTFEED(URL, [query], [headers], [num_items])”. Lastly, hit ENTER or click on another cell to finish.