ScraperData

SERP API

Live search

Searches Google at the moment you call and returns the results page as JSON, usually in 2 to 4 seconds per page.
GEThttps://api.scraperdata.com/v1/search

Credits

Each results page costs one credit, so num_pages=3 costs three. Failed requests are free, and when only some pages come back you pay for those only.

Send the parameters in the query string and your key in the X-API-Key header. A request can take a few seconds; use a client timeout of at least 60 seconds. To send many searches at once without waiting, add a pingback_url.

Request parameters

FieldTypeDescription
qstringrequiredThe search query, up to 2,048 characters.Example: coffee shops
glstringoptionalCountry to search from, as a two-letter code.Default: usExample: in
hlstringoptionalLanguage of the results page.Default: enExample: de
locationstringoptionalCity or region to search from, in any words. It is matched to Google's own name for the place, the country in gl first (see Location matching).Example: Austin, Texas
google_domainstringoptionalThe Google domain to search on.Default: google.comExample: google.co.in
typestringoptionalWhat to search for. Each type has its own list in the answer (see Result types).Values:searchnewsimagesshoppingvideosDefault: search
pageintegeroptionalThe first results page to get, starting at 1.Default: 1Example: 2
num_pagesintegeroptionalHow many results pages to get in one request, from 1 to 10. The pages are fetched at the same time, and each one costs credits.Default: 1Example: 3
devicestringoptionalSearch as a desktop or a phone.Values:desktopmobileDefault: desktop
response_typestringoptionaljson for the parsed results, html for Google's own page, or both (see JSON and HTML).Values:jsonhtmlbothDefault: json
pingback_urlstringoptionalYour URL to call when the search is done. The search is queued instead of run while you wait, and the concurrency limit does not refuse it (see Queue a search).Example: https://example.com/hook
api_keystringoptionalYour API key, if you do not send it in the X-API-Key header.Example: sd_...

Response

A successful search returns status 200 and the JSON below. Blocks such as ads or the AI Overview are there only when Google shows them for the query.

FieldTypeDescription
search_metadataobjectAbout this request.
idstringA unique id for the search.
statusstringSuccess when Google's page came back.
created_atstringWhen the search ran, in ISO 8601.
pagesintegerHow many results pages came back.
credits_chargedintegerCredits this request cost: one per page that came back.
search_parametersobjectThe parameters the search used, after defaults were filled in.
qstringThe query.
gl, hl, device, typestringCountry, language, device and search type used.
page, num_pagesintegerThe first page and how many pages were asked for.
location_requestedstringThe location you sent, when you sent one.
location_usedstringGoogle's own name for the place that was searched from.
uulestringThe location code Google got for that place.
response_typestringjson, html or both.
search_informationobjectWhat Google showed about the search.
query_displayedstringThe query as Google shows it.
organic_results_statestringFully empty when Google found nothing.
organic_resultsarrayThe results, in order. With several pages the positions go on across pages.
positionintegerRank on the page, counted on across pages.
pageintegerThe results page it came from.
titlestringThe result's title.
linkstringThe page's real address, never a Google redirect.
displayed_linkstringThe address as Google prints it.
sourcestringThe site's name.
snippetstringThe text under the title.
datestringWhen Google shows a date in front of the snippet.
thumbnailstringThe result's picture: Google's image URL, or base64 data when the page carries only that.
rating, reviewsnumber, stringThe stars under the result and how many reviews they count.
sitelinksarrayExtra links under large results.
ads, local_results, top_stories, inline_videosarrayAds, the map pack, top stories and videos, when Google shows them (see Web results).
related_questions, related_searchesarrayPeople also ask, and related searches with a plain Google search link.
knowledge_graphobjectThe panel about a person, place or brand.
ai_overviewobjectGoogle's AI answer: its text blocks and the sources it cites (see AI Overview).
html, html_pagesstring, arrayGoogle's own HTML, with response_type=html or both.

Response headers

  • X-Credits-Charged: credits this request cost.
  • X-Credits-Used, X-Credits-Limit and X-Credits-Left: your credits this period.
  • X-Plan: your plan.