Web Data

Web Data Functions & Syntax

Overview

There are many useful data sets on the Web, including data tables, linked CSV files and the metadata embedded in every web page. With this spreadsheet integration for Google Sheets and Microsoft Excel, you can lookup and import current, on-demand data from the Web without leaving your spreadsheet.

What you can do

With this integration, you can:

  • Lookup and import the web links on a web page
  • Import embedded tweets on a web page, including Twitter handles and links
  • Import metadata for a web page, such as the page title and keywords
  • Import metadata for news articles, such as title, author and published date

What you need

You need to have a Flex.io account to use this integration. Also, if you haven't already installed the Flex.io add-on for Excel or Google Sheets, you need to set this up as well.

Functions and Syntax

This integration for Microsoft Excel or Google Sheets includes the following functions:

CSV Reader

Returns the data for the CSVs given by the URLs

Syntax

=FLEX("YOUR_TEAM_NAME/web-csv", url)

Sample Usage

=FLEX("YOUR_TEAM_NAME/web-csv", "https://raw.githubusercontent.com/flexiodata/data/master/sample/sample-contacts.csv")

Parameters

Property Type Description Required
url array Urls for which to get the info true

Returns

Returns information for all hyperlinks on one-or-more web pages matching a search string; information includes domain, link, and matching text.

Syntax

=FLEX("YOUR_TEAM_NAME/web-extract-link", url, search, [properties])

Sample Usage

=FLEX("YOUR_TEAM_NAME/web-extract-link", "https://www.flex.io", "Contact Us")
=FLEX("YOUR_TEAM_NAME/web-extract-link", "https://news.ycombinator.com/news?p=1,https://news.ycombinator.com/news?p=2,https://news.ycombinator.com/news?p=3","Show HN")

Parameters

Property Type Description Required
url array Urls of web pages to search; parameter can be a single url or a comma-delimited list of urls. true
search string The search string to use to find the corresponding links. true
properties array The properties to return (defaults to all properties). See "Returns" for a listing of the available properties. false

Returns

Property Type Description
domain string The domain of the link for the matched item
link string The link of the matched item
text string The text of the matched item

Website Summary

Returns content information from a web page article

Syntax

=FLEX("YOUR_TEAM_NAME/web-newspaper", url, [properties])

Sample Usage

=FLEX("YOUR_TEAM_NAME/web-newspaper", "https://www.flex.io")
=FLEX("YOUR_TEAM_NAME/web-newspaper", "https://www.flex.io", "text")
=FLEX("YOUR_TEAM_NAME/web-newspaper", "https://www.flex.io", "title, top_image")

Parameters

Property Type Description Required
url string Url for the article for which to get the info true
properties array The properties to return (defaults to all properties). See "Returns" for a listing of the available properties. false

Returns

Property Type Description
title string The main title of the page article
authors string The authors of the page article
publish_date string The publish date of the page article
text string The text of the page article
top_image string The top image url for the page article
images string A comma-delimited list of image urls for the page article
movies string A comma-delimited list of movie urls for the page article

RSS Reader

Returns the articles from the RSS feed given by the URLs

Syntax

=FLEX("YOUR_TEAM_NAME/web-rss", url)

Sample Usage

=FLEX("YOUR_TEAM_NAME/web-rss", "http://feeds.arstechnica.com/arstechnica/technology-lab")
=FLEX("YOUR_TEAM_NAME/web-rss", "http://feeds.arstechnica.com/arstechnica/technology-lab,https://www.technologyreview.com/feed/")
=FLEX("YOUR_TEAM_NAME/web-rss", "https://www.technologyreview.com/feed/","channel_title,item_title,item_author,item_link")

Parameters

Property Type Description Required
url array Urls for which to get the info true

Returns

Property Type Description
channel_title string The feed channel title
channel_link string The feed channel link
item_title string The article title
item_author string The article author
item_link string The article link
item_published string The date/time the article was published
item_description string A description for the article

Need help?

Have questions? Need help getting started? Need other Web Data templates or functions for Microsoft Excel or Google Sheets? Chat with us; we're happy to help!