SheetMagicSheetMagic
Function Reference

SERP Functions

Get search engine results with SERP and BULKSERP functions

Overview

SheetMagic provides search engine results page (SERP) scraping functions for SEO research, competitive analysis, and content discovery. Results are powered by DuckDuckGo for reliable, consistent data.

SERP

Search the web and get results in a structured table format.

Syntax

=SERP(searchQuery, [numResults], [region], [timeFilter])

Parameters

ParameterTypeRequiredDefaultDescription
searchQuerystringYes-Search term or phrase
numResultsnumberNo20Number of results to return (max 20)
regionstringNo-Search region code (e.g., "us-en", "fr-fr")
timeFilterstringNo-Time filter for results

Time Filter Options

ValueDescription
dPast day
wPast week
mPast month
yPast year

Region Codes

CodeRegion
us-enUnited States (English)
uk-enUnited Kingdom (English)
ca-enCanada (English)
au-enAustralia (English)
de-deGermany (German)
fr-frFrance (French)
es-esSpain (Spanish)
it-itItaly (Italian)
jp-jpJapan (Japanese)
br-ptBrazil (Portuguese)

Returns

A table with three columns:

ColumnDescription
TitleThe page title
SnippetDescription/excerpt from the result
URLThe full URL of the result

Examples

Basic search:

=SERP("best coffee makers 2024")

With result limit:

=SERP("best coffee makers 2024", 10)

Regional search:

=SERP("best coffee makers", 20, "uk-en")

Recent results only:

=SERP("AI news", 20, "us-en", "w")

Dynamic search from cell:

=SERP(A1 & " reviews", 15, "us-en")

BULKSERP

Search the web and get results in a single horizontal row.

Syntax

=BULKSERP(searchQuery, [numResults], [region], [timeFilter])

Parameters

ParameterTypeRequiredDefaultDescription
searchQuerystringYes-Search term or phrase
numResultsnumberNo5Number of results to return
regionstringNo-Search region code
timeFilterstringNo-Time filter for results

Returns

A single row in the format:

[title1] [snippet1] [url1] [title2] [snippet2] [url2] ...

This format is useful for quick comparisons or when you want results in a compact horizontal layout.

Examples

Basic bulk search:

=BULKSERP("project management tools")

With limit:

=BULKSERP("CRM software", 3)

Regional bulk search:

=BULKSERP("marketing agencies", 5, "uk-en")

Use Cases

SEO Research

Keyword ranking analysis:

=SERP(A1, 20, "us-en")

Check where competitors rank for specific keywords.

Content gap analysis:

=SERP("how to " & A1, 10)

Find content opportunities based on search queries.

Competitive Analysis

Competitor monitoring:

=SERP(A1 & " site:" & B1, 10)

Search for specific content on competitor sites.

Market research:

=SERP("best " & A1 & " alternatives", 20)

Find competitors and alternatives in your market.

Content Discovery

Trending topics:

=SERP(A1 & " news", 10, "us-en", "d")

Find the latest news on specific topics.

Research sources:

=SERP(A1 & " research study", 15)

Find academic and research sources on topics.

Lead Generation

Find businesses:

=SERP(A1 & " companies " & B1, 20)

Find businesses in specific industries and locations.


Combining with Other Functions

With AI Analysis

=AITEXT("Analyze these search results and identify the top 3 trends: " & JOIN(", ", SERP(A1, 10)))

With Web Scraping

// Get top result URL
=INDEX(SERP(A1, 1), 1, 3)

// Then scrape that URL
=VISIT(INDEX(SERP(A1, 1), 1, 3))

Batch Processing

Create a column of keywords and use SERP with each:

=SERP(A1, 5)  // In B1
=SERP(A2, 5)  // In B2
=SERP(A3, 5)  // In B3

Best Practices

1. Use Specific Queries

// Less effective - too broad
=SERP("software")

// More effective - specific query
=SERP("project management software for small teams 2024")

2. Leverage Time Filters

For news and trending content:

=SERP(A1, 20, "us-en", "w")  // Past week

For evergreen research:

=SERP(A1, 20)  // No time filter

3. Use Regional Targeting

For local SEO research:

=SERP(A1 & " near me", 20, "us-en")

For international markets:

=SERP(A1, 20, "de-de")  // German market

4. Extract Specific Data

Get just the URLs:

=INDEX(SERP(A1, 10), 0, 3)  // All URLs from column 3

Get just the titles:

=INDEX(SERP(A1, 10), 0, 1)  // All titles from column 1

Error Handling

Common errors and solutions:

ErrorCauseSolution
#ERROR!Search failedCheck query syntax and try again
#EMPTY!No results foundTry broader search terms
#TIMEOUT!Request timed outWait and retry
#RATE_LIMIT!Too many requestsSpace out your searches

Limitations

  • Maximum 20 results per query for SERP
  • Search engine limitations apply (DuckDuckGo policies)
  • Rate limiting may occur with excessive usage
  • Geographic accuracy depends on region code support