Function syntax

The arguments

As its counterpart ImportXML, the =IMPORTFROMWEB( ) function extracts your data using 2 arguments : 

  • the data source, i.e. an URL that describes the source of your data
  • the selector, i.e. the path to the data you want to import (using built-in selectors, XPath or CSS selectors)

So, here is the simple syntax of the function :

=IMPORTFROMWEB(data_source, selector)

ImportFromWeb is luckily not limited to 1 single URL or 1 single data. You can extract with the same function up to 50 URLs (sharing the same layout) and as many data as you want. Just use a comma between each selector : =IMPORTFROMWEB([URLs], [selector 1], [selector 2], [selector 3])

Check out our articles to learn more about the data sources and the selectors

In Google Sheets, according to your locale settings, you may have to use commas or semicolons to separate parameters. Comma is usually the notation used in English speaking countries.


The options

The function allows a series of options like rendering Javascript content, choosing a location, setting up the duration of the cache, etc

Those options are listed in the “Options” menu and are easily integrated into your function as a 3d argument : 

=IMPORTFROMWEB(data_sources, selectors, options) 

Regular expressions

For advanced users, ImportFromWeb lets you manipulate the data with regular expressions. It’s especially useful to clean up text, replace commas in numbers or remove unwanted characters

=IMPORTFROMWEB(data_sources, selectors, regexps, replaceBy, options)