Google Search API
The Autom Google Search API returns Google results — organic results, knowledge graph, related questions and pagination — as structured JSON.
- Google Search API — Scrape Google Search results via API and retrieve structured SERP data with pagination.
- Google Search Light API — Scrape lightweight Google Search results via API: fast, cost-efficient, organic results only.
Use it for rank tracking, SEO audits, market research or grounding LLMs with fresh search results.
Table of contents
How it works
- Create a Autom account and copy your API key from the dashboard.
- Call
https://api.autom.dev with the header x-api-key: YOUR_API_KEY.
- Use the result in your app — no infrastructure to run.
export AUTOM_API_KEY="your-api-key"
pip install requests # Python
# TypeScript: Node.js 18+ (native fetch), run with `npx tsx file.ts`
Google Search API
Scrape Google Search results via API and retrieve structured SERP data with pagination.
GET https://api.autom.dev/v1/google/search · 1 credit per request · API reference
Request parameters
| Parameter |
In |
Type |
Required |
Description |
query |
query |
string |
✅ |
The search query you want to run on Google (supports advanced operators like site:, inurl:, intitle:). |
tbs |
query |
string |
— |
Advanced search filters string (e.g. time ranges: qdr:h last hour, qdr:d last day, qdr:w last week, qdr:m last month, qdr:y last year). |
safe |
query |
string |
— |
Adult content filter. active enables Google SafeSearch; off disables it. Omit to use Google default. |
location |
query |
string |
— |
Human-readable location to originate the search from (e.g. New York, NY, Paris, France). If several locations match, the most popular one is used. Note: location and uule cannot be used together. |
uule |
query |
string |
— |
Google encoded location parameter. Use for precise geo targeting. Note: uule and location cannot be used together. |
google_domain |
query |
string |
— |
Google domain to use for the search. Defaults to google.com. |
gl |
query |
string |
— |
Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France). |
hl |
query |
string |
— |
Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419). |
cr |
query |
string |
— |
Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE). |
lr |
query |
string |
— |
Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de). |
page |
query |
number |
— |
Page number / offset used for pagination. |
num |
query |
number |
— |
Maximum number of results to return per page (deprecated). |
Python example
import os
import requests
API_KEY = os.environ["AUTOM_API_KEY"]
HEADERS = {"x-api-key": API_KEY}
response = requests.get(
"https://api.autom.dev/v1/google/search",
headers=HEADERS,
params={
"query": "Airbus Company",
},
timeout=120,
)
response.raise_for_status()
data = response.json()
print(data)
TypeScript example
type GoogleSearchApi = {
pagination?: {
next?: number;
current?: number;
other_pages?: number[];
has_next_page?: boolean;
};
knowledge_graph?: {
type?: string;
title?: string;
website?: string;
};
organic_results?: {
link?: string;
title?: string;
domain?: string;
source?: string;
snippet?: string;
position?: number;
}[];
search_parameters?: {
q?: string;
gl?: string;
hl?: string;
page?: number;
engine?: string;
};
};
const headers = { "x-api-key": process.env.AUTOM_API_KEY!, "Content-Type": "application/json" };
const params = new URLSearchParams({
"query": "Airbus Company",
});
const response = await fetch(`https://api.autom.dev/v1/google/search?${params}`, { headers });
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const data = (await response.json()) as GoogleSearchApi;
console.log(data);
Output example
Example response from the API reference, abridged.
{
"pagination": {
"next": 2,
"current": 1,
"other_pages": [
2,
3
],
"has_next_page": true
},
"knowledge_graph": {
"type": "Aircraft manufacturing commercial company",
"title": "Airbus SE",
"website": "https://www.airbus.com/en"
},
"organic_results": [
{
"link": "https://www.airbus.com/en",
"title": "Airbus: Pioneering sustainable aerospace",
"domain": "www.airbus.com",
"source": "Airbus",
"snippet": "Airbus designs, manufactures and delivers industry-leading commercial aircraft, helicopters, military transports, satellites, launchers a…",
"position": 1
}
],
"search_parameters": {
"q": "Airbus Company",
"gl": "us",
"hl": "en",
"page": 1,
"engine": "google"
}
}
Response fields
| Field |
Type |
Description |
pagination |
object |
|
pagination.next |
integer |
|
pagination.current |
integer |
|
pagination.other_pages |
integer[] |
|
pagination.has_next_page |
boolean |
|
knowledge_graph |
object |
|
knowledge_graph.type |
string |
|
knowledge_graph.title |
string |
|
knowledge_graph.website |
string |
|
organic_results[] |
object[] |
|
organic_results[].link |
string |
|
organic_results[].title |
string |
|
organic_results[].domain |
string |
|
organic_results[].source |
string |
|
organic_results[].snippet |
string |
|
organic_results[].position |
integer |
|
search_parameters |
object |
|
search_parameters.q |
string |
|
search_parameters.gl |
string |
|
search_parameters.hl |
string |
|
search_parameters.page |
integer |
|
search_parameters.engine |
string |
|
Google Search Light API
Scrape lightweight Google Search results via API: fast, cost-efficient, organic results only.
GET https://api.autom.dev/v1/google/search/light · 1 credit per request · API reference
Request parameters
| Parameter |
In |
Type |
Required |
Description |
query |
query |
string |
✅ |
The search query you want to run on Google (supports advanced operators like site:, inurl:, intitle:). |
google_domain |
query |
string |
— |
Google domain to use for the search. Defaults to google.com. |
gl |
query |
string |
— |
Country to use for the Google search. Two-letter country code (e.g. us for the United States, uk for United Kingdom, or fr for France). |
hl |
query |
string |
— |
Language to use for the Google search. Two or three-letter language code (e.g. en, es, fr), optionally followed by a region code (e.g. en-gb, es-419). |
cr |
query |
string |
— |
Limit results to one or more countries. Use country{XX} with | as delimiter (e.g. countryFR|countryDE). |
lr |
query |
string |
— |
Limit results to one or more languages. Use lang_{xx} with | as delimiter (e.g. lang_fr|lang_de). |
Python example
import os
import requests
API_KEY = os.environ["AUTOM_API_KEY"]
HEADERS = {"x-api-key": API_KEY}
response = requests.get(
"https://api.autom.dev/v1/google/search/light",
headers=HEADERS,
params={
"query": "new york",
},
timeout=120,
)
response.raise_for_status()
data = response.json()
print(data)
TypeScript example
type GoogleSearchLightApi = {
organic_results?: {
link?: string;
title?: string;
source?: string;
snippet?: string;
position?: number;
}[];
search_parameters?: {
q?: string;
gl?: string;
hl?: string;
engine?: string;
};
};
const headers = { "x-api-key": process.env.AUTOM_API_KEY!, "Content-Type": "application/json" };
const params = new URLSearchParams({
"query": "new york",
});
const response = await fetch(`https://api.autom.dev/v1/google/search/light?${params}`, { headers });
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const data = (await response.json()) as GoogleSearchLightApi;
console.log(data);
Output example
Example response from the API reference, abridged.
{
"organic_results": [
{
"link": "https://www.facebook.com/newyorktimessquare1/photos/times-square-new-york-/1207893114725830/",
"title": "Times Square, New York | Facebook",
"source": "Facebook",
"snippet": "Facebook · Happy Valentines day from Times Square #newyork #newyorkcity #nyc · Still magnificent amidst the fog. @vuralelibol · The magni…",
"position": 1
},
{
"link": "https://www.reddit.com/r/nyc/comments/1r4vwp3/1970s_new_yorkers_are_asked_what_they_dislike_the/",
"title": "1970s New Yorkers are asked what they dislike the most about living in New York City : r/nyc - Reddit",
"source": "Reddit",
"snippet": "468 votes, 55 comments. People saying some things never change weren't around NYC in the 1970s. I was. And I live here now.",
"position": 2
}
],
"search_parameters": {
"q": "new york",
"gl": "us",
"hl": "en",
"engine": "google"
}
}
Response fields
| Field |
Type |
Description |
organic_results[] |
object[] |
|
organic_results[].link |
string |
|
organic_results[].title |
string |
|
organic_results[].source |
string |
|
organic_results[].snippet |
string |
|
organic_results[].position |
integer |
|
search_parameters |
object |
|
search_parameters.q |
string |
|
search_parameters.gl |
string |
|
search_parameters.hl |
string |
|
search_parameters.engine |
string |
|
Code examples in other languages
Ready-to-run examples live in examples/; each reads your key from AUTOM_API_KEY.