Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

You can pull website data into Google Sheets with a built-in import formula when the page exposes a table, list, structured markup, CSV/TSV file, or RSS/Atom feed. Match the formula to the source, check that the returned fields are the ones you need, and move to Apps Script or the Sheets API when formulas cannot handle the job. These methods retrieve content available in supported formats; they do not work on every website or bypass login and access controls.

Choose the right Google Sheets import function

First identify what the source actually serves. Use the simplest formula that fits its format:

Source format Function What to supply
HTML table or list IMPORTHTML Page URL, "table" or "list", and the item’s index starting at 1
Structured data in HTML or another supported format IMPORTXML Page URL and an XPath expression selecting the data
CSV or TSV file IMPORTDATA URL serving comma-separated or tab-separated values
RSS or Atom feed IMPORTFEED Feed URL and, where needed, options for the desired feed fields

Google describes Sheets import functions as suitable for importing small amounts of dynamic data. For custom ingestion or more complex logic, its guidance points to Apps Script or the Sheets API. See Google’s data-ingestion guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use IMPORTHTML for a visible table or list

Syntax: =IMPORTHTML(url, query, index). The query must be "table" or "list"; the index starts at 1. For example, Google documents =IMPORTHTML("http://en.wikipedia.org/wiki/Demographics_of_India","table",4). Replace the example URL and index with the page and table you want.

Start with the table or list that visibly contains your target data, then inspect the imported columns and rows. Page structure can include several tables, including navigation or layout tables, so a matching index does not by itself prove that the result is useful.

Use IMPORTXML when XPath can select the fields

Syntax: =IMPORTXML(url, xpath_query, locale). The XPath expression identifies the elements or attributes to import. For example, Google documents =IMPORTXML("https://en.wikipedia.org/wiki/Moon_landing", "//a/@href") for importing link targets. Google says the function can import structured data including XML, HTML, CSV, TSV, RSS, and Atom XML. See the IMPORTXML function reference.

XPath is tied to the structure returned by the page. If a site changes its markup, an expression that used to work can stop matching. Test the output against the actual page and select only the content you need.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use IMPORTDATA for CSV or TSV

Syntax: =IMPORTDATA(url). Use it when the URL serves a CSV or tab-separated file. A downloadable data endpoint is a better fit than trying to extract the same records from a rendered HTML page. See the IMPORTDATA function reference.

Use IMPORTFEED for RSS or Atom

When the source is a feed rather than a web page, use IMPORTFEED, Google’s purpose-built option for RSS and Atom. Feed data is often more stable to consume than scraping a page layout, but the returned fields still depend on what the feed publishes. See Google’s import-function guidance.

Build and check an import formula

  1. Identify the source shape. Open the URL and determine whether it provides an HTML table or list, structured markup, a CSV/TSV endpoint, or a feed.
  2. Put the URL in a cell if you expect to change it. For example, place it in A1 and refer to that cell from the formula. This makes it easier to update the URL without rewriting the rest of the expression.
  3. For IMPORTHTML, test the query and index. Try "table" or "list" and an index starting at 1. Check the imported rows and columns against the source.
  4. For IMPORTXML, keep the XPath in a cell if you need to adjust it. For example, if the URL is in A1 and the XPath is in B1, use =IMPORTXML(A1,B1). Confirm that the selected result contains the intended fields rather than unrelated page elements.
  5. Check whether the source requires something Sheets cannot provide. A formula is not a substitute for an unavailable login, user interaction, or content that only appears after client-side rendering. Google’s documentation describes supported import types, not guaranteed access to every website.
  6. Keep the import purposeful. Avoid duplicating the same request across many cells or frequently changing the formula’s source arguments. Excessive traffic can trigger import-function throttling.

When formulas are not enough

Formula imports are convenient when the source is public and the data can be selected with a supported import function. Consider another approach when you need custom request handling, transformations, control over collection logic, or a workflow that a formula cannot express. Google identifies Apps Script for custom ingestion and the Sheets API for more complex logic or preferred programming languages.

Approach Good fit Trade-off
Sheets import formula Small amounts of dynamic data exposed as a supported table, markup, file, or feed Limited control over requests and refresh behavior; can be throttled
Apps Script Custom HTTP requests and processing within a Google Apps Script workflow Requires script authorization and is subject to account-dependent quotas and runtime limits
Sheets API More complex ingestion logic or a workflow built in a preferred programming language Requires a program and API-based integration rather than a formula in a cell

Apps Script and URL Fetch

Apps Script’s UrlFetchApp can make HTTP and HTTPS requests. If you explicitly declare script authorization scopes, URL Fetch requires the external-request scope https://www.googleapis.com/auth/script.external_request. See Google’s UrlFetchApp reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Google’s quota page currently lists URL Fetch at 20,000 calls per day for consumer accounts and 100,000 per day for Google Workspace, plus a six-minute script runtime per execution. The quotas are per user, reset 24 hours after the first request, and may change or be eliminated without notice. They are limits on Apps Script usage—not a promise that a third-party website will accept that many requests. Check the current Apps Script quotas before building a process around those figures.

Request volume and refresh behavior

Google warns that import functions may be throttled when they create too much traffic. Its help page gives this message as an example: “Error: Loading data may take a while because of the large number of requests. Try to reduce the amount of IMPORTHTML, IMPORTDATA, IMPORTFEED or IMPORTXML functions across spreadsheets you’ve created.” Google recommends reducing the number of import functions and limiting frequent changes to their arguments; it does not state one universal maximum that applies to every spreadsheet. See Google Sheets Help on import functions.

If a formula-based workflow is making many repeated requests, reduce duplicate imports and avoid needless argument churn before adding more formulas. For high-volume or custom jobs, assess Apps Script or the Sheets API and the applicable usage constraints.

Respect site access rules

Before automating collection, review the site’s terms and access rules. A formula or script does not override a login, technical restriction, or the site’s requirements. Google Search Central explains that robots.txt is used to manage crawler access and traffic; it is not a security mechanism and does not ensure that a page cannot appear in search results. Do not treat it as permission to scrape or as a universal legal standard. See Google’s robots.txt guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common import problems

  • The result is the wrong table or list: change the IMPORTHTML index and verify the output fields. Indexing starts at 1, and a page can expose multiple tables or lists.
  • IMPORTXML returns no useful values: check the XPath against the page’s current structure and confirm it selects the desired elements or attributes. Markup changes can break a selector.
  • The content is missing even though it appears in a browser: check whether it depends on a login, interaction, or client-side rendering step. A visible browser page does not establish that Sheets can import its data.
  • The formula shows a large-number-of-requests error: reduce the number of import formulas and avoid frequently changing their arguments, as Google recommends.
  • Apps Script fails authorization: authorize the script’s external request access. If scopes are declared explicitly, include https://www.googleapis.com/auth/script.external_request.
  • A script stops at a quota or runtime limit: check the current Google Apps Script quotas for the account type and execution. The published quotas can change; do not assume a daily allowance guarantees access by the target site.
  • A request is denied by the website: a Sheets formula or Apps Script request does not grant access. Review the site’s rules and use only access the site permits.

Or skip the browser setup

If your goal is a screenshot rather than structured rows and columns, ScreenshotNeo is a website screenshot API and MCP server; it captures a page as PNG, JPEG, WebP, or PDF. It is not a replacement for extracting table data into cells.

One GET request returns a screenshot. See the ScreenshotNeo documentation for the API parameters and options:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.

Sign up for 1,000 free screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Can Google Sheets scrape any website?

No. Import formulas work with supported content and access patterns; a page that requires unavailable authentication, interaction, or client-side rendering may not import.

Can I use Google Sheets formulas to get data behind a login?

The import formulas described here do not provide a way to bypass a login or other access controls.

Should I use a screenshot API to put website data into spreadsheet cells?

No. A screenshot API returns an image or PDF, not structured rows and columns for a spreadsheet.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.