Data Scraping From Website to Excel: 4 Methods Tested (2026)

I tested 4 ways to scrape website data to Excel. Power Query, IMPORTXML, extensions, and API — only one gives you clean, auto-updating data.

14,000 people search “data scraping from website to excel” every month. I was one of them a year ago. You want data from a website, you want it in a spreadsheet, you figure it can’t be that complicated. Right?

It can. I tested all four methods people recommend. Three of them are fragile, manual, or both.

You can get website data into Excel or Google Sheets. But the way most tutorials teach it (Power Query, IMPORTXML, browser extensions) breaks on 80% of modern websites. The one that actually works at scale: call an API that returns clean JSON and pipe it into your spreadsheet.

We process over 2 million API requests per month across our Google Search API , Amazon product data API , Google Maps API , Crunchbase API , Translator API , and Jobs Search API . So I’ve watched, firsthand, where spreadsheet scraping falls apart. And I’ll show you the approach that doesn’t.

I’m covering all four methods here, telling you straight what each one can and can’t do. Then I’ll walk you through the full setup for the one I’d actually pick.

4

Methods tested

1

That actually scales

10 min

Setup time (API method)

Free

200 req/month to start

All 4 methods at a glance

Before we get into each one, here’s the comparison table. I rated them on what actually matters when you need web data in a spreadsheet:

MethodDifficultyReliabilityAutomationJS sites?Cost
Excel Power QueryEasyLowLimitedFree
Google Sheets IMPORTXMLMediumLowNoneFree
Browser extensionsEasyMediumNonePartialFree / $10+/mo
API → Spreadsheet ⭐EasyHighFullFree tier / $9.99+

Let me walk through each one. What it does, when it works, where it breaks.


Method 1: Excel Power Query (free, built-in, limited)

Power Query is built into Excel. It’s the first thing most people try, because it’s right there: Data → Get Data → From Web, paste a URL, and Excel tries to detect tables on the page.

How it works

  1. Open Excel, click Data → From Web
  2. Paste the URL of the page you want to scrape
  3. Excel loads the page and shows you any HTML <table> elements it finds
  4. Select the table, click Load, and the data lands in your spreadsheet

When it works, it feels great. The thing is, it doesn’t work very often.

The catch

Power Query reads the raw HTML that the server sends back. In 2016, that was fine, most websites rendered content server-side. In 2026? The majority of commercial sites load their data through JavaScript after the initial page load.

Try it on Amazon. Zero product tables. Google search results? Nothing. Any React, Vue, or Angular app? Empty.

The real limitation

Power Query works on static HTML tables — things like Wikipedia data tables, government statistics pages, and simple price lists hosted on older websites. If the site loads data via JavaScript (which includes Amazon, Google, eBay, LinkedIn, and most modern web apps), Power Query sees an empty page.

And there’s no scheduling in desktop Excel. You can hit refresh manually, but there’s no “check this page every morning at 8 AM” unless you’re on Excel Online or Power BI.

When Power Query makes sense: a one-time grab from a simple site with visible HTML tables. Government data, university research pages, static price lists. Don’t fight it for anything beyond that.


Method 2: Google Sheets IMPORTXML (free, fragile)

If you use Google Sheets, you’ve probably seen IMPORTXML mentioned. It’s a built-in function that fetches a web page and extracts data using XPath expressions.

How it works

In any cell, type:

1
=IMPORTXML("https://example.com/products", "//div[@class='price']")

First argument is the URL. Second is an XPath expression that tells Sheets which HTML elements to pull. Google fetches the page, parses the HTML, and drops matching elements into your cells.

For about 10 minutes, it feels like magic. Then reality shows up.

The problems

First: XPath is fragile. The website changes its HTML structure (and every website does, constantly), your formula breaks. That div[@class='price'] becomes span[@data-testid='product-price'] overnight, and your sheet fills with #N/A errors. I’ve seen people rebuild their formulas every two weeks. That’s not a workflow, that’s a chore.

Second: no JavaScript rendering. Same problem as Power Query. IMPORTXML fetches raw HTML, not the rendered page. Amazon, Google, any modern SPA, nothing useful comes back.

Third: rate limits. Google caps IMPORTXML at roughly 50 calls per spreadsheet. Need 100 product pages? Half your formulas return errors.

When IMPORTXML is worth using

Grabbing a single data point from a simple page, like a stock price from a static finance page or an exchange rate from a government site. For anything involving multiple pages, dynamic content, or data you need to actually rely on, look elsewhere.


Method 3: Browser extensions (easy but manual)

Chrome scraping extensions sit in your toolbar and try to auto-detect tabular data on whatever page you’re viewing. Click the icon, it highlights the data it found, export to CSV or Excel.

How they work

  1. Install the extension from the Chrome Web Store
  2. Navigate to the page with the data you want
  3. Click the extension icon, it scans the page for tables and lists
  4. Review what it found, adjust if needed
  5. Click Export to CSV or Export to Excel

The nice thing: extensions do see JavaScript-rendered content because they read the page after the browser has fully loaded it. So they can grab data from Amazon product listings, Google results, other dynamic pages.

The problem

It’s completely manual. Every time you want fresh data, you open the browser, navigate to the page, click the extension, wait, export. There’s no “run this every morning.” One-time grab? Sure. Ongoing monitoring? Not happening.

Accuracy varies a lot too. The auto-detection guesses which part of the page is “the table.” Sometimes it nails it. Sometimes it grabs the navigation menu or sidebar ads. You end up cleaning the output longer than it took to export.

And there’s a privacy angle. These extensions can read every page you visit. Some of the free ones monetize by collecting your browsing data. Worth checking the privacy policy before you install one.

The verdict on extensions

Good for a quick, one-time data grab from a page you're already looking at. Not a solution for anything you need to do more than once, and definitely not for anything you want to automate.


Method 4: API → Google Sheets (the one that actually works)

Do you see the pattern with the first three methods? They all try to reverse-engineer a webpage’s visual layout. Websites change their HTML, JavaScript rendering makes the raw source useless, and you’re always one site update away from broken data.

An API flips the whole thing. Instead of parsing messy HTML, you call an endpoint that returns clean, structured JSON. Every field labeled, every value typed, same format every single time.

Getting JSON into a spreadsheet is a solved problem.

Think of it this way: you’re not “scraping” anymore. You’re requesting data from a service that has already solved the hard parts (rendering, parsing, anti-bot handling) and hands you a clean response. Your spreadsheet just receives it.

ApproachWhat you getExample output
HTML scrapingRaw HTML tags, mixed content, broken fragments<div class="a-price"><span>$29</span>...
API → JSONLabeled fields, typed values, consistent structure{"product_price": "$29.99", "rating": 4.5}

JSON

Structured, clean data

Apps Script / Power Query

📊

Your spreadsheet

I’ll walk you through two tutorials: Google search results (using the Google Search API ) and Amazon product data, both into Google Sheets via Apps Script.

Apps Script is Google’s built-in scripting language. Free, runs in the cloud, nothing to install. If you prefer Excel, I cover that at the end.

Step 1: Get your API key (2 minutes)

You need a free RapidAPI account and an API key. Same key works for both the Google Search API and the Amazon scraping API .

  1. Go to the FlyByAPIs Google Search API on RapidAPI
  2. Click Subscribe to Test and pick the free plan (200 requests/month, no credit card)
  3. Copy your API key from the header parameters section

Keep this key handy. You’ll paste it into the script next.

Step 2: Open Apps Script

  1. Open a new Google Sheet (or the one where you want the data)
  2. Go to Extensions → Apps Script
  3. Delete any code in the editor
  4. You’re ready to paste

Tutorial A: Google search results → Google Sheets

This script calls the FlyByAPIs Google search endpoint with your keyword and writes the top 10 results (position, title, URL, domain) directly into your sheet.

Paste this into the Apps Script editor:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function scrapeGoogleResults() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();

  var keyword = "best wireless headphones 2026";
  var apiKey  = "YOUR_RAPIDAPI_KEY";
  var host    = "google-serp-search-api.p.rapidapi.com";

  var url = "https://" + host + "/search"
    + "?q=" + encodeURIComponent(keyword)
    + "&num=10&gl=us";

  var response = UrlFetchApp.fetch(url, {
    headers: {
      "x-rapidapi-key": apiKey,
      "x-rapidapi-host": host
    }
  });

  var results = JSON.parse(response.getContentText())
    .data.organic_results;

  sheet.clear();
  sheet.appendRow(["Position", "Title", "URL", "Domain"]);

  results.forEach(function(r) {
    sheet.appendRow([r.position, r.title, r.link, r.domain]);
  });

  sheet.getRange(1, 1, 1, 4).setFontWeight("bold");
}

Click Run (the play button). Google will ask you to authorize the script, click through the permissions. First run takes 5-10 seconds.

Check your sheet. You should see 10 rows of Google search results with position, title, URL, and domain. Clean, structured, no cleanup needed.

20 lines of code. No XPath, no CSS selectors, no HTML parsing. The API did the hard work and your script just put the results where you wanted them.

What you can do with this

Change the keyword variable to track your own brand's rankings, monitor competitor positions, or research which pages rank for any term. You can add multiple keywords by looping through a list in column A, one API call per keyword.

Want to track rankings for several keywords at once? Here’s a version that reads keywords from column A and writes results to separate sheets:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function scrapeMultipleKeywords() {
  var ss     = SpreadsheetApp.getActiveSpreadsheet();
  var source = ss.getSheetByName("Keywords");
  var apiKey = "YOUR_RAPIDAPI_KEY";
  var host   = "google-serp-search-api.p.rapidapi.com";

  var keywords = source.getRange("A2:A")
    .getValues()
    .flat()
    .filter(String);

  keywords.forEach(function(keyword) {
    var sheetName = keyword.slice(0, 30);
    var sheet = ss.getSheetByName(sheetName)
      || ss.insertSheet(sheetName);

    var url = "https://" + host + "/search"
      + "?q=" + encodeURIComponent(keyword)
      + "&num=10&gl=us";

    var response = UrlFetchApp.fetch(url, {
      headers: {
        "x-rapidapi-key": apiKey,
        "x-rapidapi-host": host
      }
    });

    var results = JSON.parse(response.getContentText())
      .data.organic_results;

    sheet.clear();
    sheet.appendRow(["Position", "Title", "URL", "Domain",
                     "Checked"]);

    results.forEach(function(r) {
      sheet.appendRow([
        r.position, r.title, r.link, r.domain,
        new Date().toISOString().slice(0, 10)
      ]);
    });

    sheet.getRange(1, 1, 1, 5).setFontWeight("bold");
    Utilities.sleep(1000);
  });
}

Create a sheet called “Keywords”, list your keywords in column A starting from row 2, and run it. Each keyword gets its own tab with fresh ranking data.

💡 Pro tip

The same API key works across all FlyByAPIs endpoints — Google Search, Amazon, Google Maps, Crunchbase, Translator, and Jobs Search. One key, six data sources, all clean JSON into your spreadsheet.

Tutorial B: Amazon product data → Google Sheets

This one might be even more useful if you’re in e-commerce. The Amazon data extraction API returns structured product data (titles, prices, ratings, review counts, ASINs) as clean JSON.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function scrapeAmazonProducts() {
  var sheet  = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();

  var query  = "wireless headphones";
  var apiKey = "YOUR_RAPIDAPI_KEY";
  var host   = "real-time-amazon-data-the-most-complete.p.rapidapi.com";

  var url = "https://" + host + "/search"
    + "?query=" + encodeURIComponent(query)
    + "&marketplace=com&page=1";

  var response = UrlFetchApp.fetch(url, {
    headers: {
      "x-rapidapi-key": apiKey,
      "x-rapidapi-host": host
    }
  });

  var products = JSON.parse(response.getContentText())
    .data.products;

  sheet.clear();
  sheet.appendRow([
    "Title", "Price", "Original Price",
    "Rating", "Reviews", "ASIN"
  ]);

  products.forEach(function(p) {
    sheet.appendRow([
      p.title,
      p.price,
      p.original_price || "—",
      p.rating,
      p.reviews_count,
      p.asin
    ]);
  });

  sheet.getRange(1, 1, 1, 6).setFontWeight("bold");
  sheet.autoResizeColumns(1, 6);
}

Run it. Your sheet fills with Amazon product data: real prices, real ratings, real review counts. Not scraped HTML fragments that might be the product title or might be a breadcrumb. Structured data, every time.

FieldWhat it containsSpreadsheet column
titleFull product nameA — Title
priceCurrent sale priceB — Price
ratingAverage rating (1.0–5.0)D — Rating
reviews_countTotal review countE — Reviews
asinAmazon Standard IDF — ASIN

Why the API approach wins for spreadsheet users

Same format every time

The API returns the same JSON structure on every call. Your columns don't shift, your data doesn't garble. Compare that to HTML scraping, where one site redesign breaks everything.

Works on JavaScript-heavy sites

Amazon, Google, every modern SPA. The API handles rendering, anti-bot protection, and data extraction on its side. You just get clean JSON back.

Runs on a schedule

Set up a time trigger and your data refreshes itself. Every hour, every day, every week. No browser to open, no buttons to click.

Step 3: Set up automatic updates

This is where the setup goes from “useful one-time thing” to “system that runs itself.”

In the Apps Script editor:

  1. Click the clock icon on the left sidebar (Triggers)
  2. Click + Add Trigger
  3. Choose your function (e.g., scrapeAmazonProducts)
  4. Set event source to “Time-driven”
  5. Set the interval (hourly, daily, or weekly)
  6. Click Save

That’s all. Your Google Sheet now pulls fresh data from the Amazon product API or the FlyByAPIs search endpoint on whatever schedule you pick. No human needed.

We have a sheet tracking competitor prices on Amazon for one of our clients. Runs every morning at 6 AM, and by the time the team opens it at 9, fresh data is already there. Took maybe 15 minutes to set up.

Try it free on RapidAPI — 200 requests/month →

No credit card required · Works with Google Sheets and Excel


What about Excel? (Yes, it works too)

Everything above uses Google Sheets because Apps Script makes API calls simple and free.

But if you’re an Excel person, you have two options:

FeatureGoogle Sheets + Apps ScriptExcel Power QueryExcel VBA
Setup time5 min10 min15 min
Auto-scheduleBuilt-in triggersExcel 365 onlyTask Scheduler
Runs in cloud
Extra librariesNoneNoneVBA-JSON

Option A: Power Query with a web API

Excel’s Power Query can also fetch data from any URL that returns JSON, including API endpoints.

  1. Go to Data → Get Data → From Other Sources → From Web
  2. Select Advanced
  3. In the URL field, paste your API endpoint: https://google-serp-search-api.p.rapidapi.com/search?q=your+keyword&num=10&gl=us
  4. Add HTTP headers:
    • x-rapidapi-key: your API key
    • x-rapidapi-host: google-serp-search-api.p.rapidapi.com
  5. Click OK and Power Query opens the JSON response
  6. Expand the dataorganic_results column, select the fields you want, and click Close & Load

The data loads as an Excel table. Refresh manually with Data → Refresh All, or schedule automatic refreshes if you’re on Excel 365 with a Microsoft account.

Option B: VBA macro

If you want full control, a VBA macro works too. More code than Apps Script, same result:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
' Requires VBA-JSON: github.com/VBA-tools/VBA-JSON
Sub FetchSearchResults()
    Dim http As Object
    Set http = CreateObject("MSXML2.XMLHTTP")

    Dim url As String
    url = "https://google-serp-search-api.p.rapidapi.com" _
        & "/search?q=best+wireless+headphones&num=10&gl=us"

    http.Open "GET", url, False
    http.setRequestHeader "x-rapidapi-key", "YOUR_KEY"
    http.setRequestHeader "x-rapidapi-host", _
        "google-serp-search-api.p.rapidapi.com"
    http.Send

    Dim json As Object
    Set json = JsonConverter.ParseJson(http.responseText)

    Dim ws As Worksheet
    Set ws = ActiveSheet
    ws.Cells.Clear

    ws.Cells(1, 1) = "Position"
    ws.Cells(1, 2) = "Title"
    ws.Cells(1, 3) = "URL"

    Dim i As Long: i = 2
    Dim result As Variant
    For Each result In json("data")("organic_results")
        ws.Cells(i, 1) = result("position")
        ws.Cells(i, 2) = result("title")
        ws.Cells(i, 3) = result("link")
        i = i + 1
    Next
End Sub

You’ll need the VBA-JSON library for JSON parsing. Import the JsonConverter.bas module into your VBA project. One extra step, but after that it works the same way.

VBA is more code than Apps Script, but you get the same structured data, the same reliability, same API key. Pick whichever spreadsheet your team already lives in.

My recommendation: Google Sheets + Apps Script is easier for most people. Runs in the cloud, triggers are built in, code is simpler. Use Excel if your workflow already lives there.


What to build next

The same pattern (API call → JSON → spreadsheet) works for any data source with an API. Here are things people have built with this:

📊 SEO rank tracker

Monitor 50 keywords daily. The Google Search API returns position, title, URL, and featured snippets — one call per keyword.

🏷️ Amazon price monitor

Track competitor prices across 200 ASINs with the Amazon data API. Trigger twice daily, conditional-format price drops. Full guide: building a price tracker.

📍 Local business monitor

Pull Google Maps listings for specific searches using the Maps extraction API. Track which competitors show up in the local pack.

🔎 Lead generation

Extract business data from Google Maps into a sheet — names, addresses, phones, ratings, websites. Sales teams love this one.

If spreadsheets aren’t enough and you want to go full code, we have guides for web scraping with Python and scraping with Node.js .


Bottom line

You can get web data into Excel or Google Sheets. But the tutorials that tell you it’s “easy” with Power Query or IMPORTXML leave out the part where those methods break on 80% of modern websites.

What actually holds up: call a web data API that returns structured JSON, pipe it into your spreadsheet with a simple script, set a trigger to keep it fresh. 10 minutes of setup.

The FlyByAPIs free tier gives you 200 requests per month to test it. No credit card, no commitment. If it works for you (and I think it will), paid plans start at $9.99/month for 15,000 requests.

I know I’m biased. This is what we sell. But I spent a year watching the other methods break before I built this, and the API approach is the one that doesn’t.

Get your free API key on RapidAPI →

200 requests/month free · Google Search, Amazon, and Maps APIs

P.S. If you build something cool with this approach, send me a message. I collect the creative use cases. Some of the best product ideas I’ve seen started as “I just needed this data in a spreadsheet.”

Oriol.

FAQ

Frequently Asked Questions

Q Can you scrape website data directly into Excel?

Yes, but only from simple websites with visible HTML tables. Excel's Power Query (Data → From Web) can import structured tables from static pages. For JavaScript-rendered sites like Amazon, Google, or most modern web apps, Power Query returns empty results. The workaround is an API that returns JSON data. FlyByAPIs returns structured product, search, and maps data that you can import into any spreadsheet.

Q What is the easiest way to scrape data from a website to Excel?

The easiest reliable method is calling a JSON API from Google Sheets using Apps Script. You paste about 20 lines of code, hit Run, and get structured results in your sheet. No XPath, no HTML parsing, no browser extensions. FlyByAPIs offers a free tier with 200 requests/month so you can test it without paying.

Q How do I pull data from a website into Google Sheets?

Open your Google Sheet, go to Extensions → Apps Script, paste a UrlFetchApp function that calls an API endpoint (like FlyByAPIs Google Search or Amazon), and run it. The response comes back as JSON, the script parses it, and writes each field into columns. You can set up a time trigger to refresh automatically every hour or every day.

Q Is IMPORTXML good for getting data into Google Sheets?

IMPORTXML works for simple, static pages where you know the XPath. But it breaks whenever the website changes its HTML structure, it cannot read JavaScript-rendered content, and Google rate-limits it to about 50 calls per sheet. For anything beyond a quick one-off grab, an API call via Apps Script is more reliable.

Q Can I automate data collection from a website on a schedule?

In Google Sheets, yes. Apps Script supports time-driven triggers that run your fetch automatically (hourly, daily, weekly). In Excel, you can use Power Query's scheduled refresh or VBA with Windows Task Scheduler. Google Sheets is easier since triggers run in the cloud with no local machine needed.

Q Is it legal to pull data from websites into a spreadsheet?

Collecting publicly available information is generally legal, but you should respect each site's terms of service and robots.txt. Using an API like FlyByAPIs is a safer option because APIs are built for programmatic access, return authorized results, and handle rate limiting on their end.

Q How do I get Amazon product data into a spreadsheet?

Use the FlyByAPIs Amazon Product API with Google Sheets Apps Script. The API returns structured JSON with title, price, rating, and reviews_count for every product. A 15-line Apps Script function fetches this data and writes it directly into your sheet. You can track competitor prices by running the script daily with a time trigger.
Share this article
Oriol Marti
Oriol Marti
Founder & CEO

Computer engineer and entrepreneur based in Andorra. Founder and CEO of FlyByAPIs, building reliable web data APIs for developers worldwide.

Free tier available

Ready to stop maintaining scrapers?

Production-ready APIs for web data extraction. Whatever you're building, up and running in minutes.

Start for free on RapidAPI