Get website data into Google Sheets: 3 ways
The best method depends on how the data sits on the page. Start with the simplest one that works.
1. Use IMPORTHTML for plain tables and lists
If the page shows a real HTML table, Google Sheets can pull it with a formula. The last number picks which table on the page to use.
=IMPORTHTML("https://example.com/page", "table", 1)
This works best on simple public pages. It may not see content that loads after the page opens.
2. Use IMPORTXML for one specific value
IMPORTXML reads parts of a page with an XPath query, which is useful for items such as headings.
=IMPORTXML("https://example.com/page", "//h2")
It takes a little more setup, and the formula can break when the site changes its layout.
3. Use a browser extension for everything else
Lists that load as you scroll, or that spread across many pages, are hard to reach with formulas. A browser extension works on the page you can see, so it can handle them. Instant Web Scraper is a free option that can clean your table and copy it into Google Sheets. The user guide shows the steps.
Which should you pick?
- A simple table: IMPORTHTML.
- One value you want to refresh: IMPORTXML.
- A long or scrolling list: a browser extension.