API Reference
Search API
Execute Search queries and retrieve real-time search results.
The search endpoint combines real-time search indexing with SerperMatrix's scraping capabilities to return structured, high-accuracy results for any search query.
Include sources to retrieve results across multiple verticals in a single call (e.g. ["web", "news", "images"]). You can also target specific geographic regions, host languages, or apply time-based filters.
Supported Query Operators
We support a wide variety of query operators that allow you to filter and refine your search queries:
| Operator | Functionality | Examples |
|---|---|---|
"" | Non-fuzzy exact match for a specific text string | "SerperMatrix" |
- | Excludes specific keywords or negates other operators | -spam, -site:example.com |
site: | Restricts search results to a specific domain | site:github.com |
filetype: | Restricts search results to a specific file extension | filetype:pdf, -filetype:pdf |
inurl: | Matches results that contain a specific word in the URL path | inurl:docs |
allinurl: | Matches results that contain multiple words in the URL path | allinurl:api documentation |
intitle: | Matches results with a specific word in the page title | intitle:Nuxt |
allintitle: | Matches results with multiple words in the page title | allintitle:Nuxt playground |
Location & Country Parameters
Use location for hyper-targeted location boundaries, or country for ISO 3166-1 country code filtering.
location: Canonical string format (e.g."San Francisco, California, United States","London, United Kingdom").country: 2-letter ISO country code (e.g."us","uk","de","fr","jp","ca"). Default is"us".
{
"query": "best coffee shops",
"location": "Seattle, Washington, United States",
"country": "us"
}
Sources Parameter
Filter search results by specifying one or more verticals in the sources array:
web: General web search results (organic rank, titles, snippets, URLs)news: Live news articles, publication timestamps, and media pressimages: Image thumbnails, dimensions, and source web pagesplaces: Local business listings, maps coordinates, ratings, and addressesshopping: Product listings, prices, merchants, and e-commerce dealsvideos: Video hosts, durations, snippets, and published datesscholar: Academic research papers, citations, and authorspatents: Global patent filings, inventors, and grant datesautocomplete: Real-time search query auto-completion suggestions
{
"query": "artificial intelligence",
"sources": ["web", "news"],
"limit": 10
}
Time-Based Search (tbs)
Use tbs to restrict results to specific time periods or sort by date:
qdr:h: Past hourqdr:d: Past 24 hoursqdr:w: Past weekqdr:m: Past monthqdr:y: Past yearsbd:1: Sort results strictly by date
Authorizations
X-API-KEYstringheaderrequired
Passed via request headers. Your secret API key for SerperMatrix (e.g.
sm_live_...).Body
application/json
querystringrequired
The search query string you want to execute (e.g.,
"nuxt documentation").sourcesarraydefault: ["web"]
List of search source types to query (
"web", "news", "images", "places", "shopping", "videos", "scholar", "patents", "autocomplete").limitintegerdefault: 10
Maximum number of search results to retrieve per source (range:
1 to 100).countrystring
ISO 3166-1 country code for geographic targeting (e.g.,
"us", "uk", "de").langstring
Host language code for localized search results (e.g.,
"en", "es", "fr").locationstring
Canonical location string for highly-targeted geographic results (e.g.,
"New York, United States").tbsstring
Time-period search filters (e.g.,
"qdr:d" for past 24 hours, "qdr:m" for past month).autocorrectbooleandefault: true
Enable or disable search query autocorrect suggestions.
use_cachebooleandefault: true
Retrieve cached response if available (caches up to 1 hour). Set to
false to force a fresh search. Request
curl -X POST https://serpermatrix.com/api/v1/search \
-H "X-API-KEY: sm_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"query":"nuxt documentation","sources":["web"],"limit":10,"country":"us","lang":"en"}'{
"success": true,
"data": {
"web": [
{
"title": "Nuxt: The Intuitive Web Framework",
"url": "https://nuxt.com",
"description": "Nuxt is an open source framework that makes web development intuitive and powerful.",
"position": 1
},
{
"title": "Nuxt 3 Documentation - Installation",
"url": "https://nuxt.com/docs/getting-started/installation",
"description": "Get started with Nuxt 3 by installing the core packages and running your dev server.",
"position": 2
}
]
}
}