ScavioScavio
Pricing
Tools
Sign InsGet Startedg
Quick StartAPI & SDKsEcosystem

Google

Google Custom Search compatible API

A drop-in replacement for the Google Custom Search JSON API (cse.list). Same query parameters, same customsearch#search response with items[], searchInformation and queries.nextPage, so existing Custom Search code keeps working after you change the host to api.scavio.dev and use your Scavio key. 1 credit per request.

GET/customsearch/v1

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).

Parameters

query string (GET) or JSON body (POST)
qstringrequired

The search query. Up to 500 characters once the operator parameters below are appended.

Example: how to make cold brew coffee

keystringquery

Your Scavio API key, accepted in the query string on the Custom Search paths only, because every Custom Search client sends it there. An Authorization: Bearer header wins if both are sent. Prefer the header in new code: a key in a URL can end up in proxy logs. Scavio never logs or stores it.

cxstring

Accepted and echoed back in queries.request[0].cx. Results always come from the whole web; restrict to a site with siteSearch. Engine refinements, weighting and promotions have no equivalent.

numintegerdefault:10

Results to return, 1-10. Sliced from one Google results page, so fewer can come back when Google shows fewer organic results. Outside 1-10 is a 400.

startintegerdefault:1

1-based index of the first result, as in Custom Search. start + num cannot exceed 100 (400), and queries.nextPage stops at that limit, so a while-nextPage loop costs what it cost on Custom Search. For deeper pages use POST /api/v2/google.

glstring

Two-letter country code to geolocate results.

Example: us

hlstring

Interface language.

Example: en

lrstring

Language restrict, a single value such as lang_en.

crstring

Country restrict, a single value such as countryUS. Boolean expressions longer than 20 characters return 400.

safeenum<string>default:off

active filters explicit results; off (or omitted) does not. Legacy high and medium mean active.

filterenum<string>

0 turns off duplicate-content filtering, 1 keeps it.

dateRestrictstring

d[N], w[N], m[N] or y[N]. d1, w1, m1 and y1 map to Google's past day / week / month / year filter; any other window becomes an after:YYYY-MM-DD bound (UTC) on the query.

Example: m6

siteSearchstring

Site to include or exclude, e.g. stackoverflow.com. Added to the query as site: and also enforced on the returned results, because Google loosens site: for some queries. Off-site results are dropped, so items can be fewer than num, even zero, and the request still costs 1 credit.

siteSearchFilterenum<string>default:i

i includes siteSearch, e excludes it (-site: plus the same result filter).

exactTermsstring

A phrase every result must contain, appended as "phrase".

excludeTermsstring

A word or phrase no result may contain, appended as -word or -"phrase".

orTermsstring

Space-separated terms, at least one of which must appear, appended as a OR b.

hqstring

Extra terms ANDed onto the query.

fileTypestring

Adds filetype:<ext> to the query (e.g. filetype:pdf). Google usually honours it, but it is not enforced on the returned results, so a non-matching page can appear.

Example: pdf

googlehoststring

Google domain to search, e.g. google.co.uk.

locationstring

Scavio extension: canonical location name for city-level results.

Example: Austin,Texas,United States

deviceenum<string>

Scavio extension: desktop or mobile results.

nfprboolean

Scavio extension: true turns off Google's spelling autocorrection.

no_cacheboolean

Scavio extension: true skips the 24-hour result cache.

Notes

Three paths, one handler. GET /customsearch/v1 and GET /customsearch/v1/siterestrict sit at Google's own paths, so swapping www.googleapis.com (or customsearch.googleapis.com) for api.scavio.dev is the whole migration. The canonical path is GET or POST /api/v1/google/customsearch; POST takes the same parameter names as a JSON body.

Google's own client works unchanged with client_options={"api_endpoint": "https://api.scavio.dev"} and your Scavio key as developerKey, for both cse().list() and cse().siterestrict().list().

# pip install google-api-python-client
# Your existing Custom Search code. Only the endpoint and the key change.
from googleapiclient.discovery import build

service = build(
    "customsearch",
    "v1",
    developerKey="sk_live_your_scavio_key",
    client_options={"api_endpoint": "https://api.scavio.dev"},
)
res = service.cse().list(q="how to make cold brew coffee", cx="your-cx", num=3).execute()
for item in res.get("items", []):
    print(item["title"], item["link"])

Ignored, never an error: alt=json, prettyPrint, fields, quotaUser, userIp, $.xgafv, c2coff. cx is echoed back.

Rejected with 400, never silently dropped: searchType (image search), imgSize, imgType, imgColorType, imgDominantColor, rights, linkSite, relatedSite, sort, lowRange, highRange, a cr expression over 20 characters, and any parameter not listed on this page. The error names the parameter in error.details.param. A 400 costs nothing.

Response fields.

  • items[]: kind, title, htmlTitle, link, displayLink (the host of link, www. kept), snippet (always present, "" when Google shows none), htmlSnippet, formattedUrl, htmlFormattedUrl. htmlTitle and htmlSnippet are HTML-escaped with Google's highlighted words in <b>.
  • pagemap.cse_thumbnail[0].src only when the result has a real thumbnail URL.
  • searchInformation.totalResults is a string, as in Custom Search. queries.request, queries.nextPage and queries.previousPage carry startIndex, count and the parameters you sent; searchTerms is your original q.
  • items is omitted when there are no results, as Custom Search does.
  • Not returned: cacheId, mime, fileFormat, labels, image, spelling, context, promotions.
  • scavio: credits_used, credits_remaining, cached and response_time. Not part of the Custom Search format; parsers ignore it.

Errors use Google's envelope (error.code, error.message, error.errors[0].reason, error.status) with Scavio's HTTP status: 400 invalid, 401 keyInvalid, 402 dailyLimitExceeded (out of credits), 429 rateLimitExceeded (plan concurrency, with a Retry-After header), 502/503 backendError. Extra fields such as plan and billing_url sit in error.details.

Billing and cache. 1 credit per request, the same as POST /api/v2/google, and the two share one 24-hour result cache. There is no daily cap; your plan's concurrency limit applies.

Need more than Custom Search ever returned? The knowledge graph, AI Overview, People Also Ask, ads and related searches come back from POST /api/v2/google, which takes query instead of q and returns organic_results[]. The migration guide maps every parameter and field.

SDKs and agents. Python client.google.custom_search(), JavaScript client.google.customSearch() and the MCP tool google_custom_search call this endpoint.

Request

curl 'https://api.scavio.dev/customsearch/v1?q=how+to+make+cold+brew+coffee&cx=your-cx&num=3' \
  -H 'Authorization: Bearer sk_live_your_key'

Response

"kind": "customsearch#search",
"type": "application/json",
"template": "https://api.scavio.dev/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&orTerms={orTerms?}&dateRestrict={dateRestrict?}&fileType={fileType?}&alt=json"
},
},
"searchTime": 0.31,
"formattedSearchTime": "0.31",
"totalResults": "108",
"formattedTotalResults": "108"
},
],
"credits_used": 1,
"credits_remaining": 34506,
"cached": false,
"response_time": 4196
}
}
PreviousGoogle Search APINextGoogle AI Mode API
ScavioScavio

One scraper API for every social, search, e-commerce and real estate platform. Built for AI agents.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative
  • Serper Alternative
  • Tavily vs Scavio
  • SerpAPI vs Scavio
  • All alternatives
  • Compare Scavio vs alternatives

Search APIs

  • Google Search API
  • Amazon Product API
  • YouTube API
  • Reddit API
  • Walmart Product API
  • TikTok API
  • Instagram API

Tools

  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy