Search Google as JSON
Early access. Tell us what you're building and we'll set you up. Contact us
api.lempile.com/search.jsonJSON-suffixed alias for GET /search. Fresh non-cached searches are queue-first and return HTTP 202 with polling endpoints. Poll search_metadata.json_endpoint until search_metadata.status becomes Success or Error.
Authentication
X-API-KEY header·A Lempile API key, made in the dashboard under Access tokens.Query parameters
enginestringSearch engine to use. Defaults to
google; other engines return a SerpApi-style error.One ofgoogleDefaultgoogleqstringrequiredGoogle search query. Supports normal Google operators such as
site:,inurl:, and quoted phrases. For LinkedIn discovery, use queries such assite:linkedin.com/posts/ "business inspiration".≥ 1 charslocationstringHuman-readable origin location. Cannot be combined with
uule,lat, orlon.google_domainstringGoogle domain to use. Defaults to
google.com.Defaultgoogle.comhlstringGoogle interface language, such as
enorfr.glstringCountry code used for Google search localization, such as
us,uk, orfr.tbsstringAdvanced Google filter string, such as
qdr:mfor the last month.startintegerResult offset for pagination.
0is page 1,10is page 2, and so on.Default0≥ 0devicestringBrowser profile type used for the run.
One ofdesktopmobiletabletDefaultdesktopno_cachebooleanSet to
trueto bypass the 1-hour normalized-parameter cache and force a fresh queued browser-backed Google run. Cached successful searches may return immediately.Defaultfalseapi_keystringAPI key with
search.writefor search creation routes orsearch.readfor archive routes.X-API-KEYmay be used instead.
Responses
200A cached successful search was returned immediately.
›
application/json
errorstringsearch_metadataSerpApiSearchMetadatarequiredSerpApi-compatible lifecycle metadata. Internal
QueuedandRunningstates are exposed as publicProcessingplus detail fields.›Show fieldsHide fields
idstringrequiredstatusstringrequiredOne ofProcessingSuccessErrorstatus_detailstringInternal state such as
Queued,Running, or a final status detail.runner_status_detailstringRunner detail such as
queued,runner_claimed,lease_renewed,completed,search_queue_timeout, orrunner_lease_expired.json_endpointstring · uripixel_position_endpointstring · uriraw_html_filestring · uricreated_atstringqueued_atstringstarted_atstringlease_expires_atstringprocessed_atstring | nullgoogle_urlstring | nulltotal_time_takennumber | nullcaptcha_autosolveobjectSafe CAPTCHA autosolve summary when a Google block page required solving.
search_parametersSerpApiSearchParametersrequiredNormalized search parameters used for the Google request.
›Show fieldsHide fields
enginestringrequiredOne ofgoogleqstringrequiredlocation_requestedstring | nulllocation_usedstring | nullgoogle_domainstringrequiredhlstring | nullglstring | nulltbsstring | nullstartinteger | nulldevicestringrequiredOne ofdesktopmobiletablet
search_informationSerpApiSearchInformationHigh-level information extracted from the Google results page.
›Show fieldsHide fields
query_displayedstring | nulltotal_resultsinteger | nulltime_taken_displayednumber | nullorganic_results_statestring | nullpage_numberinteger | null
organic_resultsarray of SerpApiOrganicResult›Show fieldsHide fields
positionintegerrequiredtitlestring | nulllinkstring · uri | nulldisplayed_linkstring | nullsnippetstring | nullsnippet_highlighted_wordsarray of stringsourcestring | null
related_searchesarray of objectReal Google related-search suggestions only.
paginationSerpApiPagination›Show fieldsHide fields
currentintegerpreviousstring · uri | nullnextstring · uri | nullother_pagesobject
serpapi_paginationSerpApiPagination›Show fieldsHide fields
currentintegerpreviousstring · uri | nullnextstring · uri | nullother_pagesobject
error_diagnosticsobjectSafe failure diagnostics, including CAPTCHA provider metadata when available. Raw secrets, cookies, tokens, proxy credentials, and API keys are not included.
202Fresh search accepted and queued.
›
application/json
search_metadataSerpApiSearchMetadatarequiredSerpApi-compatible lifecycle metadata. Internal
QueuedandRunningstates are exposed as publicProcessingplus detail fields.›Show fieldsHide fields
idstringrequiredstatusstringrequiredOne ofProcessingSuccessErrorstatus_detailstringInternal state such as
Queued,Running, or a final status detail.runner_status_detailstringRunner detail such as
queued,runner_claimed,lease_renewed,completed,search_queue_timeout, orrunner_lease_expired.json_endpointstring · uripixel_position_endpointstring · uriraw_html_filestring · uricreated_atstringqueued_atstringstarted_atstringlease_expires_atstringprocessed_atstring | nullgoogle_urlstring | nulltotal_time_takennumber | nullcaptcha_autosolveobjectSafe CAPTCHA autosolve summary when a Google block page required solving.
search_parametersSerpApiSearchParametersNormalized search parameters used for the Google request.
›Show fieldsHide fields
enginestringrequiredOne ofgoogleqstringrequiredlocation_requestedstring | nulllocation_usedstring | nullgoogle_domainstringrequiredhlstring | nullglstring | nulltbsstring | nullstartinteger | nulldevicestringrequiredOne ofdesktopmobiletablet
400Invalid search parameters.
›
application/json
errorstringrequiredSerpApi-compatible error message.
error_codestringMachine-readable Lempile error code when available.
401Missing or invalid API key.
›
application/json
errorstringrequiredSerpApi-compatible error message.
error_codestringMachine-readable Lempile error code when available.
403The API key does not include the required search.write scope.
›
search.write scope.application/json
errorstringrequiredSerpApi-compatible error message.
error_codestringMachine-readable Lempile error code when available.
429Workspace has reached the pending Google search queue cap.
›
application/json
errorstringrequiredSerpApi-compatible error message.
error_codestringMachine-readable Lempile error code when available.
503Platform, configuration, or storage dependency is temporarily unavailable. New searches normally queue when the runner is at capacity or briefly unavailable.
›
application/json
errorstringrequiredSerpApi-compatible error message.
error_codestringMachine-readable Lempile error code when available.
Was this page helpful?