SerperMatrix
API Reference

Search API

Execute Search queries and retrieve real-time search results.
POST
/api/v1/search
Try it

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:

OperatorFunctionalityExamples
""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 domainsite:github.com
filetype:Restricts search results to a specific file extensionfiletype:pdf, -filetype:pdf
inurl:Matches results that contain a specific word in the URL pathinurl:docs
allinurl:Matches results that contain multiple words in the URL pathallinurl:api documentation
intitle:Matches results with a specific word in the page titleintitle:Nuxt
allintitle:Matches results with multiple words in the page titleallintitle: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 press
  • images: Image thumbnails, dimensions, and source web pages
  • places: Local business listings, maps coordinates, ratings, and addresses
  • shopping: Product listings, prices, merchants, and e-commerce deals
  • videos: Video hosts, durations, snippets, and published dates
  • scholar: Academic research papers, citations, and authors
  • patents: Global patent filings, inventors, and grant dates
  • autocomplete: 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 hour
  • qdr:d: Past 24 hours
  • qdr:w: Past week
  • qdr:m: Past month
  • qdr:y: Past year
  • sbd: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
      }
    ]
  }
}
{
  "q": [
    "This field is required."
  ]
}
{
  "detail": "Invalid or inactive API key."
}
{
  "error": "Insufficient credits",
  "credits_remaining": 0,
  "upgrade_url": "/billing/plans/"
}
{
  "detail": "Request was throttled."
}
{
  "error": "Something went wrong"
}
Copyright © 2026