Page Data Functions
Extract meta titles, descriptions, headings, and paragraphs with dedicated scraping functions
Overview
SheetMagic provides specialized functions for extracting specific page elements like meta tags, headings, and paragraphs. These functions are optimized for SEO analysis, content auditing, and data extraction.
PAGEDATA
Get comprehensive page data for multiple URLs at once.
Syntax
=PAGEDATA(url1, [url2], [url3], ...)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url1 | string | Yes | First URL to scrape |
url2... | string | No | Additional URLs (variadic) |
Returns
An array with columns:
| Column | Description |
|---|---|
| URL | The scraped URL |
| Title | Meta title |
| Description | Meta description |
| H1 | First H1 heading |
| Status | HTTP status code |
Examples
Single URL:
=PAGEDATA("https://example.com")Multiple URLs:
=PAGEDATA(A1, A2, A3, A4, A5)Range of URLs:
=PAGEDATA(A1:A100)Use Cases
- SEO audits
- Content inventory
- Competitor analysis
- Site migration checks
GETMETATITLE
Get the meta title from a URL.
Syntax
=GETMETATITLE(url)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to scrape |
Returns
The meta title text from the page's <title> tag.
Examples
=GETMETATITLE("https://example.com")=GETMETATITLE(A1)GETMETADESCRIPTION
Get the meta description from a URL.
Syntax
=GETMETADESCRIPTION(url)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to scrape |
Returns
The meta description text from the page's <meta name="description"> tag.
Examples
=GETMETADESCRIPTION("https://example.com")=GETMETADESCRIPTION(A1)GETH1
Get the first H1 heading from a URL.
Syntax
=GETH1(url)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to scrape |
Returns
The text content of the first <h1> element on the page.
Examples
=GETH1("https://example.com/article")=GETH1(A1)GETH2
Get all H2 headings from a URL.
Syntax
=GETH2(url)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to scrape |
Returns
An array of all <h2> heading text on the page.
Examples
=GETH2("https://example.com/article")=GETH2(A1)GETHEADINGS
Get all headings from a URL.
Syntax
=GETHEADINGS(url)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to scrape |
Returns
An array with two columns:
| Column | Description |
|---|---|
| Level | Heading level (H1, H2, H3, H4, H5, H6) |
| Text | Heading content |
Examples
Get all headings:
=GETHEADINGS("https://example.com/article")From cell:
=GETHEADINGS(A1)Use Cases
- Content structure analysis
- SEO heading hierarchy audits
- Outline generation
- Accessibility checks
GETP
Get all paragraphs from a URL.
Syntax
=GETP(url)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to scrape |
Returns
An array of all paragraph text (<p> elements) from the page.
Examples
=GETP("https://example.com/article")=GETP(A1)Use Case Examples
SEO Audit Workflow
Create a comprehensive SEO audit for a list of URLs:
| Column | Formula | Purpose |
|---|---|---|
| A | URLs | Source URLs |
| B | =GETMETATITLE(A1) | Check title tags |
| C | =LEN(B1) | Title length |
| D | =GETMETADESCRIPTION(A1) | Check meta descriptions |
| E | =LEN(D1) | Description length |
| F | =GETH1(A1) | Check H1 presence |
Content Inventory
// In a single formula
=PAGEDATA(A1:A50)Returns a complete inventory of all pages with their key metadata.
Heading Structure Analysis
=GETHEADINGS(A1)Use to verify proper heading hierarchy (H1 → H2 → H3).
Title Tag Optimization
=IF(LEN(GETMETATITLE(A1)) > 60, "Too long", IF(LEN(GETMETATITLE(A1)) < 30, "Too short", "Good"))Check if title tags meet SEO best practices.
Meta Description Check
=IF(LEN(GETMETADESCRIPTION(A1)) > 160, "Too long", IF(LEN(GETMETADESCRIPTION(A1)) < 70, "Too short", "Good"))Check if meta descriptions are optimal length.
Combining with AI
Generate Improved Titles
=AITEXT("Write a better SEO title for this page. Current: " & GETMETATITLE(A1) & ". Page content: " & VISIT(A1))Analyze Content Structure
=AITEXT("Analyze the heading structure and suggest improvements: " & JOIN(", ", GETHEADINGS(A1)))Competitive Analysis
=AITEXT("Compare these competitor meta descriptions and identify best practices: " & JOIN(" | ", GETMETADESCRIPTION(A1), GETMETADESCRIPTION(A2), GETMETADESCRIPTION(A3)))Best Practices
1. Batch Processing
For large URL lists, process in batches to avoid timeouts:
=PAGEDATA(A1:A20) // First batch
=PAGEDATA(A21:A40) // Second batch2. Error Handling
Wrap in IFERROR for cleaner output:
=IFERROR(GETMETATITLE(A1), "Failed to fetch")3. Combine Functions
Create comprehensive audits by combining multiple functions:
={GETMETATITLE(A1), LEN(GETMETATITLE(A1)), GETMETADESCRIPTION(A1), LEN(GETMETADESCRIPTION(A1)), GETH1(A1)}Error Handling
| Error | Cause | Solution |
|---|---|---|
#ERROR! | URL not accessible | Verify URL is valid |
#EMPTY! | Element not found | Page may not have that element |
#TIMEOUT! | Request timed out | Try again later |
#BLOCKED! | Site blocking requests | Some sites block scrapers |