Ever wish you could pull real-time data from a website directly into your Google Sheets—like stock prices, live sports scores, or product listings—without copying and pasting? That’s exactly what IMPORTHTML lets you do. It’s one of the simplest but most powerful functions in Google Sheets for scraping tables or lists from public websites.
Even if you’re a beginner, IMPORTHTML can help automate your workflows and eliminate tedious data entry. In this guide, you’ll learn how it works, see real-life use cases, and get hands-on with step-by-step examples that make data tracking smarter and easier.

What is IMPORTHTML in Google Sheets?
IMPORTHTML is a function that pulls data from a table or list on any public webpage. As long as the page is accessible and the data is structured using HTML <table> or <ul>/<ol> tags, Google Sheets can read it.
Syntax:
=IMPORTHTML(url, query, index)
- url: The web address (in quotes or as a cell reference)
- query: Either
"table"or"list" - index: The position of the table or list on the page (starting from 1)
This function updates automatically, meaning your data stays fresh whenever the sheet recalculates.
Real-Life Example: Track Live Cryptocurrency Prices
Let’s say you want to monitor real-time crypto prices. CoinMarketCap or similar sites often display this in tables. Here’s how you can pull that into your sheet.
Step-by-Step:
- Go to a webpage that lists crypto prices (e.g., CoinGecko).
- Find the URL you want to extract data from.
- Use this formula in Google Sheets:
=IMPORTHTML("https://www.coingecko.com/", "table", 1)
Google Sheets will display the entire first table from the page, usually including coin names, prices, market caps, and more. No plugins, no code—just one formula!
Sample Output Table:
| # | Coin | Price | 24h Change |
|---|---|---|---|
| 1 | Bitcoin | $70,000 | +2.3% |
| 2 | Ethereum | $3,500 | +1.1% |
(Note: Real-time values will be updated when IMPORTHTML refreshes.)
Use Cases for IMPORTHTML
- Pull live stock market data into a finance dashboard
- Track sports scores from a table on ESPN or similar
- Import product listings or reviews for market research
- Monitor exchange rates or flight prices
Tips for Using IMPORTHTML Effectively
- Always use public URLs; it won’t work with login-required pages
- If a site has multiple tables, try increasing the
indexvalue until you get the one you want - Wrap your IMPORTHTML in
IFERROR()to avoid displaying errors
=IFERROR(IMPORTHTML("https://example.com", "table", 2), "Loading...")
Troubleshooting IMPORTHTML
Sometimes, IMPORTHTML may not load as expected. Here’s how to fix common issues:
- Error: “Resource not found”: Double-check the URL or table index
- Error: “Imported content is empty”: The table might not be public or is loaded with JavaScript (which IMPORTHTML can’t read)
- Slow updating: Try refreshing the sheet or editing the cell to force recalculation
Quick Reference Cheat Sheet
| Use Case | Formula |
|---|---|
| First table on a webpage | =IMPORTHTML("https://example.com", "table", 1) |
| Second list on a page | =IMPORTHTML("https://example.com", "list", 2) |
| Handle errors gracefully | =IFERROR(IMPORTHTML(...), "Try again later") |
IMPORTHTML is a hidden gem for Google Sheets users who want to automate website data collection. Whether you’re a finance tracker, a market researcher, or a curious hobbyist, it helps you turn public data into live, interactive dashboards.
Now that you know how to use it, try applying IMPORTHTML to a project of your own. You’ll be amazed at what you can automate with just one line of code!