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.
Endpoint
Section titled “Endpoint” GET https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | Your SERP API key |
engine | string | yes | Must be google |
q | string | yes | The search query |
cookie | string | no | Custom cookie for the request. Must be URL encoded |
tbm | string | no | Search vertical: isch (images), vid (videos), nws (news), shop (shopping) |
sort_by | string | no | Sort results by relevance or date |
time_period | string | no | last_hour, last_day, last_week, last_month, last_year, or custom |
time_period_min | string | no | Minimum date when time_period=custom. Format MM/DD/YYYY |
time_period_max | string | no | Maximum date when time_period=custom. Format MM/DD/YYYY |
flatten_results | int | no | 1 to flatten results, 0 otherwise |
empty_results | int | no | 0 to hide empty results, 1 to display them |
device | string | no | desktop, mobile, or tablet |
location | string | no | Geotargeting location name |
google_domain | string | no | Google domain to use (for example google.co.uk) |
uule | string | no | Google encoded location string |
lr | string | no | Language restriction, format lang_xx |
hl | string | no | Interface language code |
gl | string | no | Country code |
start | int | no | Result offset for pagination |
num | int | no | Number of results per page |
ijn | int | no | Page number for Google Images (100 images per page) |
safe | string | no | Safe search: active or off |
filter | int | no | Similar and omitted results filter: 1 on, 0 off |
nfpr | int | no | 1 to exclude auto-corrected queries, 0 otherwise |
tbs | string | no | Advanced search parameters (patents, dates, etc.) |
ludocid | string | no | Google My Business CID (Place ID) |
lsig | int | no | Force Knowledge Graph map view |
Example request
Section titled “Example request”curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=history"import requests
params = { "engine": "google", "api_key": "YOUR_API_KEY", "q": "history",}r = requests.get("https://serp.shifter.io/v1", params=params)data = r.json()import fetch from 'node-fetch';
const url = 'https://serp.shifter.io/v1?' + new URLSearchParams({ engine: 'google', api_key: 'YOUR_API_KEY', q: 'history',});const data = await (await fetch(url)).json();Example response
Section titled “Example response”{ "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": "..." }}