Docs · Reference
Custom Search API Replacement
GET /v1/search/cse2 credits / requestcache 60 minA 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
qstring · required | Search query (searchTerms). |
numinteger | Number of results to return (1-10). Default: 10 |
startinteger | Index of the first result (1-91). Default: 1 |
glstring | Country to search from, e.g. us. Default: null |
hlstring | Interface language, e.g. en. Default: null |
lrstring | Restrict to documents in a language, e.g. lang_en. Default: null |
safestring | SafeSearch: active or off. Default: "off" Allowed: active, off |
siteSearchstring | Site to include or exclude. Default: null |
siteSearchFilterstring | i = only results from siteSearch (default), e = exclude them. Default: null |
cxstring | Accepted for compatibility and ignored. Default: null |
keystring | Accepted for compatibility and ignored (never stored or echoed). Authenticate with your Gridlode key. Default: null |
max_ageinteger | 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.