Over 60 million real residential IPs from genuine users across 190+ countries.
Over 60 million real residential IPs from genuine users across 190+ countries.
PROXY SOLUTIONS
Over 60 million real residential IPs from genuine users across 190+ countries.
Reliable mobile data extraction, powered by real 4G/5G mobile IPs.
Guaranteed bandwidth — for reliable, large-scale data transfer.
For time-sensitive tasks, utilize residential IPs with unlimited bandwidth.
Fast and cost-efficient IPs optimized for large-scale scraping.
A powerful web data infrastructure built to power AI models, applications, and agents.
High-speed, low-latency proxies for uninterrupted video data scraping.
Extract video and metadata at scale, seamlessly integrate with cloud platforms and OSS.
6B original videos from 700M unique channels - built for LLM and multimodal model training.
Get accurate and in real-time results sourced from Google, Bing, and more.
Execute scripts in stealth browsers with full rendering and automation
No blocks, no CAPTCHAs—unlock websites seamlessly at scale.
Get instant access to ready-to-use datasets from popular domains.
PROXY PRICING
Full details on all features, parameters, and integrations, with code samples in every major language.
LEARNING HUB
ALL LOCATIONS Proxy Locations
TOOLS
RESELLER
Get up to 50%
Contact sales:partner@thordata.com
Proxies $/GB
Over 60 million real residential IPs from genuine users across 190+ countries.
Reliable mobile data extraction, powered by real 4G/5G mobile IPs.
For time-sensitive tasks, utilize residential IPs with unlimited bandwidth.
Fast and cost-efficient IPs optimized for large-scale scraping.
Guaranteed bandwidth — for reliable, large-scale data transfer.
Scrapers $/GB
Fetch real-time data from 100+ websites,No development or maintenance required.
Get real-time results from search engines. Only pay for successful responses.
Execute scripts in stealth browsers with full rendering and automation.
Bid farewell to CAPTCHAs and anti-scraping, scrape public sites effortlessly.
Dataset Marketplace Pre-collected data from 100+ domains.
Data for AI $/GB
A powerful web data infrastructure built to power AI models, applications, and agents.
High-speed, low-latency proxies for uninterrupted video data scraping.
Extract video and metadata at scale, seamlessly integrate with cloud platforms and OSS.
6B original videos from 700M unique channels - built for LLM and multimodal model training.
Pricing $0/GB
Starts from
Starts from
Starts from
Starts from
Starts from
Starts from
Starts from
Starts from
Docs $/GB
Full details on all features, parameters, and integrations, with code samples in every major language.
Resource $/GB
EN
代理 $/GB
数据采集 $/GB
AI数据 $/GB
定价 $0/GB
产品文档
资源 $/GB
简体中文$/GB
IMPORTXML. GAS allows you to set custom headers (User-Agent) to bypass basic blocks.JSON.parse() in GAS to fetch data directly from hidden API endpoints, which is faster and more reliable than parsing HTML.Google Sheets is more than just a spreadsheet; it is a cloud-based development platform. For growth hackers and data analysts, the ability to pull live data from the web directly into a cell is a superpower.
Most tutorials stop at =IMPORTXML. But if you have tried using it on Amazon, LinkedIn, or any modern website in 2026, you have likely stared at the dreaded #N/A error. This happens because target websites detect the request coming from Google’s data centers and block it instantly.
In this guide, I will start with the basics, but quickly move to the professional solution: writing custom Apps Script functions that utilize proxies and handle JSON data.
For simple, static blogs or Wikipedia pages, the built-in function works fine. It uses XPath to select elements.
=IMPORTXML("https://example.com", "//h1")
To bypass these limits, we need to write a small script. Go to Extensions > Apps Script in your Google Sheet.
We will create a custom function =EXTRACT_HTML() that mimics a real Chrome browser using UrlFetchApp.
/**
* Fetches HTML content using a custom User-Agent.
* @param {string} url The URL to scrape.
* @return The HTML content.
* @customfunction
*/
function EXTRACT_HTML(url) {
var options = {
'method': 'get',
'headers': {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/124.0.0.0 Safari/537.36'
},
'muteHttpExceptions': true
};
try {
var response = UrlFetchApp.fetch(url, options);
return response.getContentText();
} catch (e) {
return "Error: " + e.toString();
}
}
Save this script, then type =EXTRACT_HTML("https://httpbin.org/headers") in a cell. You will see your custom User-Agent reflected back.
Modern web scraping often involves internal APIs, not HTML. If you can find the JSON endpoint a website uses (via Chrome DevTools > Network Tab), you can pull structured data directly.
function GET_CRYPTO_PRICE(coin) {
var url = "https://api.coingecko.com/api/v3/simple/price?ids=" + coin + "&vs_currencies=usd";
var response = UrlFetchApp.fetch(url);
var json = JSON.parse(response.getContentText());
// Access nested data: json['bitcoin']['usd']
if (json[coin] && json[coin]['usd']) {
return json[coin]['usd'];
} else {
return "N/A";
}
}
Even with custom headers, requests from Google’s servers share a limited range of IP addresses (AS15169). Target websites know this and block high-volume traffic from Google Cloud.
To scrape at scale (e.g., tracking 1,000 product prices daily), you must route traffic through residential proxies. Since you cannot configure proxy settings directly in UrlFetchApp, you use the Thordata Web Unlocker API as a gateway.
This method offloads the heavy lifting. Thordata handles the proxy rotation, JavaScript rendering, and CAPTCHA solving, returning clean HTML or JSON to your sheet.
function FETCH_VIA_THORDATA(targetUrl) {
var apiToken = "YOUR_THORDATA_SCRAPER_TOKEN";
// Thordata Universal Endpoint
var endpoint = "https://universalapi.thordata.com/request";
var payload = {
"url": targetUrl,
"js_render": "True", // Handles dynamic sites
"country": "us" // Geo-target the request
};
var options = {
'method': 'post',
'headers': { 'Authorization': 'Bearer ' + apiToken },
'payload': payload
};
var response = UrlFetchApp.fetch(endpoint, options);
var json = JSON.parse(response.getContentText());
// Return the rendered HTML content
return json.html;
}
Google Sheets is an incredibly powerful prototyping tool. While IMPORTXML is fine for hobbyists, serious data acquisition requires Apps Script. By adding custom headers and integrating high-quality residential proxies via Thordata, you can turn a simple spreadsheet into a live data dashboard monitoring prices, SEO rankings, and financial metrics.
Frequently asked questions
Why does IMPORTXML return #N/A errors?
This usually happens because Google’s crawler is blocked by the target website (403 Forbidden), or the content is rendered via JavaScript (which IMPORTXML cannot execute).
Can I use proxies with Google Sheets?
Directly? No. Google Apps Script runs on Google servers. However, you can use GAS to call an external API (like Thordata’s Scraper API) which routes your request through millions of residential proxies.
How do I scrape data behind a login?
Google Sheets cannot handle session cookies effectively. For scraping behind a login, you should use the Thordata SDK (Python/Node.js) to perform the login and extraction, and then push the data to Sheets via the Google Sheets API.
About the author
Kael is a Senior Technical Copywriter at Thordata. He works closely with data engineers to document best practices for bypassing anti-bot protections. He specializes in explaining complex infrastructure concepts like residential proxies and TLS fingerprinting to developer audiences. All code examples in this article have been tested in real-world scraping scenarios.
The thordata Blog offers all its content in its original form and solely for informational intent. We do not offer any guarantees regarding the information found on the thordata Blog or any external sites that it may direct you to. It is essential that you seek legal counsel and thoroughly examine the specific terms of service of any website before engaging in any scraping endeavors, or obtain a scraping permit if required.
Looking for
Top-Tier Residential Proxies?
您在寻找顶级高质量的住宅代理吗?
5 Best Etsy Scraper Tools in 2026
This article evaluates the top ...
Yulia Taylor
2026-02-09
What is a Headless Browser? Top 5 Popular Tools
A headless browser is a browse ...
Yulia Taylor
2026-02-07
Best Anti-Detection Browser
Xyla Huxley Last updated on 2025-01-22 10 min read […]
Unknown
2026-02-06
What is a UDP proxy?
Xyla Huxley Last updated on 2025-01-22 10 min read […]
Unknown
2026-02-06
What is Geographic Pricing?
Xyla Huxley Last updated on 2025-01-22 10 min read […]
Unknown
2026-02-05
How to Use Proxies in Python: A Practical Guide
Xyla Huxley Last updated on 2025-01-28 10 min read […]
Unknown
2026-02-05
What Is an Open Proxy? Risks of Free Open Proxies
Xyla Huxley Last updated on 2025-01-22 10 min read […]
Unknown
2026-02-04
What Is a PIP Proxy? How It Works, Types, and Configuration?
Xyla Huxley Last updated on 2025-01-22 10 min read […]
Unknown
2026-02-04
TCP and UDP: What’s Different and How to Choose
Xyla Huxley Last updated on 2026-02-03 10 min read […]
Unknown
2026-02-04