AI Content Creation

How to Pull Data From a Website Into Google Sheets

You want a table or a list off a web page and into your sheet. The import formulas can grab it. Then the mess begins.

By FITS TeamJuly 13, 20264 min read

People pull web data for a few reasons. Tracking competitor prices. Copying a stats table. Grabbing a list of items. Google Sheets has built-in functions for this, and they are the right tool for the fetch itself.

The hard part is never the download. It is turning the raw result into columns you can actually use.

The Old Way (IMPORT Functions and XPath)

For a plain HTML table or list, IMPORTHTML is the simplest option. Point it at a URL and pick the table number.

=IMPORTHTML("https://example.com/pricing", "table", 1)

For a single value buried in the page, you need IMPORTXML and an XPath query.

=IMPORTXML("https://example.com/product", "//span[contains(@class, 'price')]")

For a hosted CSV, IMPORTDATA grabs the whole file.

=IMPORTDATA("https://example.com/report.csv")

These work, but they are brittle. Rename a CSS class and your XPath returns #N/A. Writing a path like //div[@id='content']/div[2]/ul/li[1] means digging through page source by hand. And when a table imports with merged headers, junk columns, and stray symbols, you still have to clean it.

The FITS Way (Clean the Import in Plain English)

FITS does not replace the import step. IMPORTHTML still fetches the page. What FITS removes is the parsing and cleanup, which is where most people get stuck.

Import the raw table into a tab, then describe the columns you actually want.

=FITS("From this imported table, return only the product name and price columns, cleaned: " & Import!A1:F50)

Prices came in as "$1,299.00 USD" and you want plain numbers? Say that instead of nesting SUBSTITUTE and REGEXEXTRACT.

=FITS("Strip currency symbols and text from these prices, return numbers only: " & A2:A50)

You skip the XPath surgery on the messy half. The import brings the data in. FITS shapes it into something usable.

When to Use Each

Use IMPORTHTML or IMPORTXML to fetch the page, since only native functions pull live URLs. Then reach for =FITS() to parse and clean what came back. For the cleanup side, see our messy data extraction guide, the definitive guide to AI data cleaning, or more AI formulas for content marketers. Scraped data is the messiest data there is. Our guide to automating Google Sheets tasks you used to need regex for shows the same pattern applied to every kind of cleanup.

Turn Messy Imports Into Clean Data

FITS adds plain-English AI formulas to Google Sheets, so cleaning imported web data takes one sentence. Free tier included.