JustSERPDocs
Google

Google Search

Google's web results for one results page, under the document-form parameters and answered as the document: `search_metadata`, `search_parameters`, `search_information`, the blocks the page has (`organic_results`, `ads`, `knowledge_graph`, `local_results`, `related_questions`, `related_searches`, `ai_overview`, `inline_videos`, `top_stories`, ...) and `pagination`.

GET
/v1/google/search

Google's web results for one results page, under the document-form parameters and answered as the document: search_metadata, search_parameters, search_information, the blocks the page has (organic_results, ads, knowledge_graph, local_results, related_questions, related_searches, ai_overview, inline_videos, top_stories, ...) and pagination. One request is one page. Sending api_version (v1 or v2) selects the deprecated earlier call instead, with its own parameters and answer.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
q?string

The search. Required unless kgmid is sent.

Length1 <= length
kgmid?string

A Knowledge Graph id to search for, e.g. /m/0cp0t.

device?string

mobile returns the phone version of the page. tablet is refused.

Default"desktop"
Value in"desktop""mobile"
location?string

Where the search is made from, as Google's canonical place name: "Austin,Texas,United States".

uule?string

A ready-made Google uule (w+... or a+...), sent as it is.

latitude?number

Where the search is made from; send with longitude.

Range-90 <= value <= 90
longitude?number
Range-180 <= value <= 180
gl?string

Country of the results, two letters.

hl?string

Interface language. Send one always; without it the page comes in the language of wherever the request is made from.

lr?string

Restrict results to languages, e.g. lang_en.

cr?string

Restrict results to countries, e.g. countryUS.

nfpr?string

1 excludes auto-corrected results.

Value in"0""1"
filter?string

0 turns off the duplicate and similar-results filter.

Value in"0""1"
safe?string

Adult-content filtering.

Value in"active""blur""off"
time_period?string

Only results from this period.

Value in"last_hour""last_day""last_week""last_month""last_year"
time_period_min?string

Earliest date, MM/DD/YYYY.

time_period_max?string

Latest date, MM/DD/YYYY.

page?integer

The results page.

Range1 <= value <= 100
Default1
verbatim?"true"

Search for the words as typed.

Value in"true"
optimization_strategy?string

Echoed in the answer only.

Value in"performance""ads"
google_domain?stringDeprecated

Legacy call only (with api_version): the Google to ask, e.g. google.co.uk or www.google.com.au. Ignored otherwise.

Match^(www\.)?google\.[a-z]{2,3}(\.[a-z]{2,3})?$
Default"www.google.com"
start?integerDeprecated

Legacy call only (with api_version). The result to start from.

Range0 <= value
tbs?stringDeprecated

Legacy call only (with api_version).

api_version?stringDeprecated

Deprecated. Sending it selects the legacy call and answer: v2 returns a different set of field names and more blocks, v1 the earlier names. Leave it out for the document.

Value in"v1""v2"

Response Body

The results page, as the document. With api_version, or when the page could not be parsed, the usual envelope.

application/json
  1. response

The Google Search document. A block is present only when the page has it.

search_metadata?
search_parameters?

The parameters the search ran with.

search_information?
pagination?
ai_overview?
ads?array<>
knowledge_graph?
organic_results?array<>
local_results?array<>

The local pack (position, title, place_id, data_id, kgmid, rating, reviews, address, phone, website ...).

related_questions?array<>
related_searches?array<>
inline_videos?array<>
top_stories?array<>
[key: string]?any
Example Request
curl -X GET 'https://api.justserp.com/v1/google/search?q=plumber+near+me&location=Austin%2CTexas%2CUnited+States&gl=us&hl=en'
Example Response
{  "search_metadata": {    "id": "string",    "status": "string",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {    "query_displayed": "string",    "total_results": 0,    "time_taken_displayed": 0,    "showing_results_for": "string",    "did_you_mean": "string",    "page": 0  },  "pagination": {    "current": 0,    "next": "string",    "previous": "string",    "other_pages": [      {        "page": 0,        "link": "string"      }    ]  },  "ai_overview": {},  "ads": [    {}  ],  "knowledge_graph": {},  "organic_results": [    {}  ],  "local_results": [    {}  ],  "related_questions": [    {}  ],  "related_searches": [    {}  ],  "inline_videos": [    {}  ],  "top_stories": [    {}  ]}