Search Google
Early access. Tell us what you're building and we'll set you up. Contact us
api.lempile.com/searchCreate a SerpApi-compatible Google Search through the Lempile browser-backed search pipeline. Fresh non-cached searches are queue-first and normally return HTTP 202 with a search_metadata.id plus archive endpoints. Poll search_metadata.json_endpoint until search_metadata.status becomes Success or Error. Cached successful searches may return HTTP 200 immediately. Authentication is accepted as either the api_key query parameter or the X-API-KEY header. This route requires the search.write scope.
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.uulestringGoogle encoded location token. Cannot be combined with
location,lat,lon, orradius.latnumberGPS latitude. Must be paired with
lonand cannot be combined withlocationoruule.lonnumberGPS longitude. Must be paired with
latand cannot be combined withlocationoruule.radiusintegerDistance in meters used to bias local results. Desktop accepts 1..199; mobile and tablet accept 1..1000.
≥ 1google_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.crstringCountry restriction, for example
countryFR|countryDE.lrstringLanguage restriction, for example
lang_fr|lang_de.tbsstringAdvanced Google filter string, such as
qdr:mfor the last month.safestringAdult content filter. Common values are
activeandoff.One ofactiveoffnfprintegerSet to
1to exclude auto-corrected query results when possible.One of01filterintegerSet to
0to disable similar-results and omitted-results filtering; defaults to Google behavior.One of01tbmstringGoogle vertical such as
isch,lcl,vid,nws,shop, orpts. Organic web search withtbmomitted is the current parity milestone; vertical module parity is best-effort.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.DefaultfalseasyncbooleanAccepted for SerpApi compatibility. Lempile is queue-first by default, so fresh non-cached searches return HTTP 202 whether or not
async=trueis provided.Defaultfalsezero_tracebooleanAccepted for SerpApi compatibility, but Lempile still archives requests for dashboard inspection and search retrieval.
DefaultfalseludocidstringGoogle place CID used for local or knowledge graph result variants.
lsigstringGoogle local result signature when Google requires it for a specific view.
kgmidstringGoogle Knowledge Graph machine id.
sistringGoogle cached search parameter token.
ibpstringGoogle layout or expansion parameter for selected modules.
udsstringGoogle filter token captured from a previous result page.
api_keystringAPI key with
search.writefor search creation routes orsearch.readfor archive routes.X-API-KEYmay be used instead.outputstringRequested output format.
jsonreturns SerpApi-shaped JSON.htmlreturns raw Google HTML only when a successful cached run is available; fresh browser runs still return HTTP 202 with polling metadata.One ofjsonhtmlDefaultjson
Responses
200A cached successful search was returned immediately, or output=html returned cached raw Google HTML.
›
output=html returned cached raw Google HTML.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. Poll search_metadata.json_endpoint until the public status changes from Processing to Success or Error.
›
search_metadata.json_endpoint until the public status changes from Processing to Success or Error.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?