Skip to content
Gridlode
Docs · Reference

Custom Search API Replacement

GET /v1/search/cse2 credits / requestcache 60 min

A drop-in replacement for Google's Custom Search JSON API, which shuts down on 1 January 2027. Send the same parameters (q, num, start, gl, hl, lr, safe, siteSearch, siteSearchFilter; cx and key are accepted and ignored) and get the same response shape with items[]. Answers come from Google through a licensed results feed, or from Bing when that feed is not available; the gridlode.source field says which.

Query parameters

q
string · required
Search query (searchTerms).
num
integer
Number of results to return (1-10).
Default: 10
start
integer
Index of the first result (1-91).
Default: 1
gl
string
Country to search from, e.g. us.
Default: null
hl
string
Interface language, e.g. en.
Default: null
lr
string
Restrict to documents in a language, e.g. lang_en.
Default: null
safe
string
SafeSearch: active or off.
Default: "off"
Allowed: active, off
siteSearch
string
Site to include or exclude.
Default: null
siteSearchFilter
string
i = only results from siteSearch (default), e = exclude them.
Default: null
cx
string
Accepted for compatibility and ignored.
Default: null
key
string
Accepted for compatibility and ignored (never stored or echoed). Authenticate with your Gridlode key.
Default: null
max_age
integer
Accept a cached answer up to this many seconds old, billed at 50%.

Response data fields

    Example

    curl "https://api.gridlode.com/v1/search/cse?q=python%20programming%20language&num=5" \
      -H "Authorization: Bearer $GRIDLODE_KEY"

    Try it without code on the Custom Search API Replacement API page.