Skip to content
Login Sign up

Google Search API

Fetch Google Search organic results, ads, related searches, knowledge graph, and more. Set engine=google and pass a query string to retrieve structured results that bypass captchas and anti-bot protections.

GET https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY
ParameterTypeRequiredDescription
api_keystringyesYour SERP API key
enginestringyesMust be google
qstringyesThe search query
cookiestringnoCustom cookie for the request. Must be URL encoded
tbmstringnoSearch vertical: isch (images), vid (videos), nws (news), shop (shopping)
sort_bystringnoSort results by relevance or date
time_periodstringnolast_hour, last_day, last_week, last_month, last_year, or custom
time_period_minstringnoMinimum date when time_period=custom. Format MM/DD/YYYY
time_period_maxstringnoMaximum date when time_period=custom. Format MM/DD/YYYY
flatten_resultsintno1 to flatten results, 0 otherwise
empty_resultsintno0 to hide empty results, 1 to display them
devicestringnodesktop, mobile, or tablet
locationstringnoGeotargeting location name
google_domainstringnoGoogle domain to use (for example google.co.uk)
uulestringnoGoogle encoded location string
lrstringnoLanguage restriction, format lang_xx
hlstringnoInterface language code
glstringnoCountry code
startintnoResult offset for pagination
numintnoNumber of results per page
ijnintnoPage number for Google Images (100 images per page)
safestringnoSafe search: active or off
filterintnoSimilar and omitted results filter: 1 on, 0 off
nfprintno1 to exclude auto-corrected queries, 0 otherwise
tbsstringnoAdvanced search parameters (patents, dates, etc.)
ludocidstringnoGoogle My Business CID (Place ID)
lsigintnoForce Knowledge Graph map view
Terminal window
curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=history"
{
"search_metadata": {
"id": "...",
"status": "Success",
"created_at": "2024-01-01T00:00:00Z"
},
"search_parameters": {
"engine": "google",
"q": "history",
"google_domain": "google.com",
"device": "desktop"
},
"search_information": {
"total_results": 10500000000,
"time_taken_displayed": 0.52
},
"organic_results": [
{
"position": 1,
"title": "History - Wikipedia",
"link": "https://en.wikipedia.org/wiki/History",
"displayed_link": "https://en.wikipedia.org > wiki > History",
"snippet": "History is the systematic study of the past..."
}
],
"related_searches": [ { "query": "world history" } ],
"pagination": { "current": 1, "next": "..." }
}