Google Sheets SEO Scraper | Extract SEO Data With Custom Function

SEO Shades

SEO Scraper for Google Sheets

SEO Scraper for Google Sheets

This Google Sheets script lets you quickly extract SEO-related information from any website. You can use it directly in your spreadsheet with a custom function to get important SEO metrics without leaving Google Sheets.

How It Works

The seoscraper function takes a website URL as input and gathers key SEO data like:

  • Page Title

  • Meta Description

  • Headings (H1, H2, H3)

  • Word Count

  • Robots Meta Tag

  • Canonical URL

  • Internal and External Links

  • Indexability Status

  • Structured Data Schema Types

  • Custom Content from a CSS Selector

You can choose to get all headings, display all links, or scrape a specific part of the page using a CSS selector.

Using the Script

  1. URL Input: Provide the website URL you want to scrape. Make sure to include http:// or https://.

  2. Optional Parameters:

    • allHeadings – Set to true if you want all H2 or H3 headings as a comma-separated list. Default is false.

    • displayLinks – Set to true if you want internal and external links listed. Default is false.

    • selector – Add a CSS selector if you want to extract a specific section of the page (like .product-description). Default is "body".

  3. Get SEO Data: The script will return a table of SEO attributes for the page, including link counts, word count, and indexability.

What Makes This Tool Useful

  • Quickly check the SEO health of any page.

  • Analyze headings, meta tags, and content structure.

  • Track internal and external links for better link-building decisions.

  • Identify indexability issues like redirects, noindex tags, or canonical conflicts.

  • Extract structured data (schema) to see what rich snippets a page is using.

Example Usage in Google Sheets

SEO Scraper for Google Sheets

=seoscraper("https://keywordsinsheets.com", TRUE, TRUE, "body")

This will return:

  • Page title and meta description

  • All H2 and H3 headings

  • Internal and external links (up to Google Sheets limit)

  • Word count and robots tag

  • Schema types and content from the body

Error Handling

  • If the URL is missing or invalid, the script will notify you.

  • If the page cannot be scraped due to server issues or restrictions, it will return “Cannot scrape URL.”

With this script, you can turn Google Sheets into a lightweight SEO analysis tool without leaving your spreadsheet. It’s perfect for quick audits, tracking SEO changes, or compiling SEO data across multiple pages.