The Complete Guide to Web Scraping in Sheets
Pull data from Google Maps, YouTube, Amazon, LinkedIn, and any website straight into your spreadsheet. No code, just formulas and scrapers.
Phil Nguyen · 14 min read · Updated

Why scrape from inside a spreadsheet?
Most web scraping tools make you write Python scripts or pay for expensive software. And the data always ends up in the same place: a spreadsheet. You export a CSV, import it into Google Sheets, clean the columns, then start working.
That is a lot of steps just to get data into cells. Google Sheets does ship one native scraper, IMPORTXML, and it works until the page uses JavaScript or rate-limits you. IMPORTXML vs SheetMagic walks through where the built-in function stops.
SheetMagic skips all of that. You write a formula. You point it at a URL or keyword. The data shows up in your cells. No code. No CSV imports. No jumping between apps.
And with 43 platform scraper formulas, you can pull structured data from tricky platforms too. Google Maps, YouTube, Amazon, LinkedIn, and more. On a paid plan, the AI Chat Agent can run them for you: just describe what you want in plain English.
This guide covers every scraping formula SheetMagic offers. It also covers the platform scrapers, how credits work, and real workflows you can start using today.
Part 1: Formula-based scraping
SheetMagic has a whole family of scraping formulas. They all work the same way: point them at a URL or keyword, tell them what to pull, and get structured data back.
=SERP() -- Search engine results
Formula
=SERP("best crm software for startups")Returns up to 20 DuckDuckGo search results with titles, snippets, and URLs, in result order. Free, no integration credits.
=SERP() is your starting point for keyword research, competitive analysis, and prospecting. Put your keywords in column A. Put =SERP(A2) in column B. Drag it down. Now you have structured SERP data for your entire keyword list.
Real use case: finding prospects
Formula
=SERP("saas companies series A funding 2026")Pull a list of recently funded companies from search results. Use the URLs in the next step for deeper research.
=BULKSERP() -- Horizontal SERP layout
Formula
=BULKSERP(A2)Same data as =SERP() but laid out horizontally -- one row per keyword, results spread across columns. Better for comparing multiple keywords.
Use =BULKSERP() when you want to compare SERP results across keywords. Each keyword stays on one row. That makes it easy to scan your whole keyword list at a glance. For paginated pulls, geo-targeting, and the full keyword-research build, see bulk SERP scraping in Google Sheets.
=VISIT() -- Full page content
Formula
=VISIT(A2)Retrieves up to 50,000 characters of text content from the URL in A2. Supports JavaScript-rendered pages.
=VISIT() pulls the raw text content of a webpage. Use it when you need the full page for summarization, content analysis, or feeding into an =AITEXT() formula.
Real use case: competitor content analysis
Pull competitor URLs from SERP data
Run =SERP("your target keyword") and extract the top 10 URLs.
Scrape each page's full content
Put the URLs in column A and run =VISIT(A2) in column B. You now have the full text of every competitor page.
Analyze with AI
Use =AITEXT("Summarize this page in 3 sentences. What is its main argument and what audience is it targeting?", B2) in column C to process each page.
=PAGEDATA() -- Bulk page metadata
Formula
=PAGEDATA("https://example.com/about")Returns structured metadata: URL, Title, Description, H1, and HTTP Status.
=PAGEDATA() grabs page metadata (title tag, meta description, H1 heading, HTTP status) from one or more URLs at once. You can pass multiple URLs to get a table of metadata in a single call:
Formula
=PAGEDATA(A2, A3, A4, A5)Returns one row per URL with Title, Description, H1, and Status columns. Great for bulk SEO audits.
For targeted data extraction, combine =VISIT() with =AITEXT():
Formula
=AITEXT("Extract: company description in one sentence, main product or service, pricing page URL if visible, contact email if visible. Format as pipe-separated values.", VISIT(A2))Scrapes the page with =VISIT() and uses AI to extract specific fields. Use =SPLIT() afterward to break the result into columns.
Tip
Format your extraction instructions with pipe-separated output (using the | character). Then use =SPLIT(B2, "|") in adjacent columns to break the result into clean, separate cells. This turns messy web pages into neat spreadsheet data.
=GETSELECTOR() -- CSS selector scraping
Formula
=GETSELECTOR(A2, "div.product-price span.amount")Extracts content matching a specific CSS selector. For developers or anyone who inspects page elements.
If you know the exact HTML element you need, =GETSELECTOR() targets it directly with a CSS selector. This is the most precise scraping method. It works great when you need a specific price, rating, or data point that lives in a consistent HTML structure.
=GETIMG() -- Extract image URLs
Formula
=GETIMG(A2)Returns image URLs found on the page at A2.
Use this for cataloging product images, building visual mood boards, or checking image assets across a website.
=DOMAINCHECK() -- Domain availability
Formula
=DOMAINCHECK("mybrandname.com")Returns whether the domain is available for registration.
This is handy for brand naming projects. Generate name ideas with =AILIST(), then check domain availability for each one. Checking domain availability in bulk covers the full naming sweep, including TLD variations:
Formula
=DOMAINCHECK(A2&".com")Checks .com availability for the brand name in A2. Combine with =AILIST() to generate and check names in bulk.
Page metadata formulas
These are single-purpose formulas built for speed. Each one extracts one specific piece of metadata per call:
| Formula | What it extracts | Example use |
|---|---|---|
=GETMETATITLE(A2) | Title tag | SEO audit, competitor analysis |
=GETMETADESCRIPTION(A2) | Meta description | SERP preview, content gap analysis |
=GETH1(A2) | H1 heading | Content structure analysis |
=GETH2(A2) | All H2 headings | Outline extraction, topic mapping |
=GETHEADINGS(A2) | All headings (H1-H6) | Full content structure audit |
=GETP(A2) | Paragraph text | Content extraction, word count |
Real use case: SEO site audit
Set up your sheet with a list of your page URLs in column A. Then:
- Column B:
=GETMETATITLE(A2)to check for missing or duplicate titles - Column C:
=GETMETADESCRIPTION(A2)to find pages without meta descriptions - Column D:
=GETH1(A2)to verify every page has an H1 - Column E:
=AITEXT("Is this meta description under 160 characters? Does it include a call to action? Return Yes/No for each.", C2)for an automated quality check
For more SEO workflows, see the complete SEO guide.
Part 2: Platform scrapers, structured data from major platforms
Some platforms are really hard to scrape with basic formulas. Google Maps, YouTube, Amazon, and LinkedIn all have complex page structures and anti-scraping measures. SheetMagic handles this with 43 platform scraper formulas, which the AI Chat Agent can also run for you. Every one of them works the same way: the cell shows a ⏳ Scraping... placeholder, and the results are written into a new tab named after the function once the job finishes.
Note
Platform scrapers are formulas on every plan, including Free: for example =GMAPS(), =GSEARCH(), =YTSEARCH(), =AMAZONPRODUCT(), and =LINKEDINCOMPANY(). On Solo, Team, and Business plans you can also open the AI Chat sidebar, describe what data you need in plain English, and the agent picks the right scraper, sets the parameters, and writes results directly into your sheet. Each scrape uses integration credits.
Google Maps scraper
Pull business listings for any location and category. Great for lead generation, market research, and competitive analysis.
What you can extract:
- Business name, address, phone number
- Rating, review count
- Website URL
- Business category
Example conversation with AI Chat:
You: "Find all Italian restaurants in Austin, TX with at least 4 stars. Put the results in a new sheet."
AI: Runs the Google Maps scraper, returns a structured table with business names, addresses, ratings, phone numbers, and websites.
Google Search SERP scraper
A more powerful alternative to the =SERP() formula for large-scale keyword research. It handles complex queries, geo-targeted results, and returns richer data.
YouTube video scraper
Extract video metadata, channel names, and view counts.
What you can extract:
- Video titles, descriptions, view counts
- Channel name and URL
- Duration and publish date
Example use: Build a creator outreach list by scraping videos in your niche. Filter by view count. Then generate personalized outreach emails with =AITEXT().
Amazon product scraper
Pull product data including prices, ratings, review counts, and product descriptions. Really useful for e-commerce competitive research. Amazon product research in Google Sheets turns this into a full research sheet, with a template you can copy.
What you can extract:
- Product title, price, rating
- Number of reviews
- Best Seller Rank
- ASIN
LinkedIn company scraper
Extract company profile data for sales prospecting and market research.
What you can extract:
- Company name, industry, size
- Headquarters location
- Description, specialties
- Website URL
Additional platform scrapers
SheetMagic includes dozens more platform scrapers (Instagram, TikTok, Reddit, Trustpilot, Zillow, Indeed, and others), 43 in total. They all work as formulas, and through the same AI Chat interface on paid plans. Just describe what you need and the AI takes care of the rest.
Part 3: How credits work
Web scraping formulas and platform scrapers use integration credits. These are separate from the AI tokens used by formulas like =AITEXT().
Credit costs
| Operation | Credits used |
|---|---|
=SERP() query | Free |
=BULKSERP() query | Free |
=DOMAINCHECK() | Free |
=VISIT() page | 1 credit per URL (2 for JavaScript-rendered pages) |
=PAGEDATA() extraction | 1 credit per URL |
=GETSELECTOR() | 1 credit per URL |
=GETMETATITLE(), =GETMETADESCRIPTION(), etc. | 1 credit per URL |
=GETIMG() | 1 credit per URL |
=GSEARCH(), =GNEWS(), =GMAPS(), =YTSEARCH() | 3 credits per query |
Platform scrapers (=LINKEDINCOMPANY(), =INSTAGRAM(), etc.) | Per row returned; rates on the pricing page |
=SERP(), =BULKSERP(), and =DOMAINCHECK() are free on every plan and never touch your credit pool. The Google and YouTube formulas run on a paid structured-data API, which is why those cost 3 credits.
Credit limits by plan
| Plan | Integration credits/month | Price |
|---|---|---|
| Free | 100 | Free |
| Solo | 10,000 | $20/mo |
| Team | 50,000 | $80/mo |
| Business | 135,000 | $200/mo |
You can also purchase additional integration credit packs from the dashboard. See the pricing page for details.
Tip
Check your remaining credits anytime: open the SheetMagic sidebar under Extensions > SheetMagic, or visit the dashboard. Credits reset monthly on your billing cycle.
Smart credit usage
SheetMagic has 30-minute smart caching. If you scrape the same URL twice within 30 minutes, the second request uses cached data. No extra credits. This means you can tweak your extraction instructions and try again without burning through your quota.
Part 4: Complete workflows
Here are three end-to-end workflows that combine scraping and AI formulas.
Workflow 1: Lead generation from Google Maps
Scrape business listings
Open the AI Chat sidebar and ask: "Find all marketing agencies in Denver, CO. Include name, website, phone, and rating."
The Google Maps platform scraper returns results directly into your sheet.
Enrich with website data
With website URLs in column D, run =AITEXT("What does this company specialize in? One sentence.", VISIT(D2)) in column E.
Qualify leads
Use =AITEXT("Based on this company description, rate the likelihood they need a CRM tool on a scale of 1-5. Return only the number.", E2) in column F.
Generate personalized outreach
For qualified leads (rating 4-5), generate email openers: =AITEXT("Write a 2-sentence cold email opener for a marketing agency that specializes in "&E2&". Reference something specific about their work.", "") in column G.
Workflow 2: E-commerce price monitoring
List competitor product URLs
Put competitor product page URLs in column A.
Extract pricing data
=AITEXT("Extract: product name, current price, original price if on sale, availability status. Pipe-separated.", VISIT(A2)) in column B.
Split into columns
=SPLIT(B2, "|") in columns C through F to get structured data.
Set up price comparison
Add your own prices in column G. Use =IF(C2<G2, "Competitor is cheaper by "&TEXT(G2-C2, "$0.00"), "You are competitive") in column H.
Generate price analysis
=AITEXT("Based on these prices, suggest a competitive pricing strategy: My price: "&G2&", Competitor price: "&C2&". Keep it to 2 sentences.", "") in column I.
Workflow 3: Content research and planning
Research top-ranking content
=SERP("your target keyword") to get the top-ranking URLs.
Extract content structure
=GETHEADINGS(A2) to pull the heading structure of each competitor page.
Analyze content gaps
=AITEXT("These are the heading structures from 5 articles ranking for the keyword 'your keyword'. Identify 3 subtopics that none of them cover well: "&B2&" | "&B3&" | "&B4&" | "&B5&" | "&B6, "") in a separate cell.
Generate a content brief
Feed the gap analysis into a brief: =AITEXT("Create a content brief for an article that covers these underserved subtopics: "&C2&". Include 8 suggested headings, target audience, and recommended word count.", "")
For the full version of this SEO workflow, see the SEO guide.
Best practices for reliable scraping
1. Be specific about what you want. When using =VISIT() + =AITEXT() for targeted extraction, "Extract the price" works better than "Get all data." Name the exact fields you need.
2. Use pipe-separated output. Ask for results formatted with | separators. Then use =SPLIT() to break them into columns. This is the fastest way to turn messy web data into clean spreadsheet data.
3. Process in batches. When scraping hundreds of URLs, don't run all formulas at once. Work in batches of 50 to 100 rows. This avoids timeouts and makes it easier to spot issues early.
4. Take advantage of caching. SheetMagic caches scraping results for 30 minutes. If you need to adjust your extraction instructions, you can rerun formulas against the same URLs without using extra credits.
5. Check your results. Spot-check extracted data against the source page. This is especially true for pricing and contact information. If results look off, refine your extraction instructions or try =GETSELECTOR() with a specific CSS selector.
6. Combine scraping with AI. The best workflows use scraping to gather data and AI to process it. =VISIT() grabs the page content. =AITEXT() analyzes, classifies, or extracts specific fields. Use =PAGEDATA() when you just need metadata (titles, descriptions, H1s) in bulk. See the workflows above for examples.
Caveat
Web scraping results depend on the structure and accessibility of the target website. Some sites block automated access or load content dynamically. If a formula returns incomplete data, try =VISIT() (which supports JavaScript-rendered pages) or use a platform scraper formula (or the AI Chat sidebar on a paid plan) for platforms with complex structures.
Start scraping today
Web scraping in Google Sheets works right now. You can write these formulas in seconds. You can try all of this on the free tier. No credit card needed. You get 100 integration credits (a one-time allowance that never expires), which is enough to run a few scrapes and see how it fits your work.
Install SheetMagic, open a sheet, and try =SERP("your keyword") or =PAGEDATA("any-url.com") to pull page metadata right away. If you want structured data from Google Maps, YouTube, Amazon, or LinkedIn, try =GMAPS(), =YTSEARCH(), =AMAZONSEARCH(), or =LINKEDINCOMPANY(), or open the AI Chat sidebar on a paid plan and describe what you need.
For more on combining scraping with AI: How to use AI formulas | SEO workflows | Getting started guide
Questions about web scraping, credits, or specific integrations? Visit the FAQ.
Every formula in this article runs on the free allowance. Install from the Google Workspace Marketplace, no card, no expiry.
Install free for Google SheetsAbout the author
Phil NguyenPhil builds SheetMagic, the Google Sheets add-on that brings AI and web scraping into the spreadsheet, used by 6,300+ people. He writes these guides from the formulas he runs on his own sheets.
