Skip to content
Docs

Search Google

Early access. Tell us what you're building and we'll set you up. Contact us

GETapi.lempile.com/search

Create 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

  • enginestring

    Search engine to use. Defaults to google; other engines return a SerpApi-style error.

    One ofgoogleDefaultgoogle
  • qstringrequired

    Google search query. Supports normal Google operators such as site:, inurl:, and quoted phrases. For LinkedIn discovery, use queries such as site:linkedin.com/posts/ "business inspiration".

    ≥ 1 chars
  • locationstring

    Human-readable origin location. Cannot be combined with uule, lat, or lon.

  • uulestring

    Google encoded location token. Cannot be combined with location, lat, lon, or radius.

  • latnumber

    GPS latitude. Must be paired with lon and cannot be combined with location or uule.

  • lonnumber

    GPS longitude. Must be paired with lat and cannot be combined with location or uule.

  • radiusinteger

    Distance in meters used to bias local results. Desktop accepts 1..199; mobile and tablet accept 1..1000.

    ≥ 1
  • google_domainstring

    Google domain to use. Defaults to google.com.

    Defaultgoogle.com
  • hlstring

    Google interface language, such as en or fr.

  • glstring

    Country code used for Google search localization, such as us, uk, or fr.

  • crstring

    Country restriction, for example countryFR|countryDE.

  • lrstring

    Language restriction, for example lang_fr|lang_de.

  • tbsstring

    Advanced Google filter string, such as qdr:m for the last month.

  • safestring

    Adult content filter. Common values are active and off.

    One ofactiveoff
  • nfprinteger

    Set to 1 to exclude auto-corrected query results when possible.

    One of01
  • filterinteger

    Set to 0 to disable similar-results and omitted-results filtering; defaults to Google behavior.

    One of01
  • tbmstring

    Google vertical such as isch, lcl, vid, nws, shop, or pts. Organic web search with tbm omitted is the current parity milestone; vertical module parity is best-effort.

  • startinteger

    Result offset for pagination. 0 is page 1, 10 is page 2, and so on.

    Default0≥ 0
  • devicestring

    Browser profile type used for the run.

    One ofdesktopmobiletabletDefaultdesktop
  • no_cacheboolean

    Set to true to bypass the 1-hour normalized-parameter cache and force a fresh queued browser-backed Google run. Cached successful searches may return immediately.

    Defaultfalse
  • asyncboolean

    Accepted for SerpApi compatibility. Lempile is queue-first by default, so fresh non-cached searches return HTTP 202 whether or not async=true is provided.

    Defaultfalse
  • zero_traceboolean

    Accepted for SerpApi compatibility, but Lempile still archives requests for dashboard inspection and search retrieval.

    Defaultfalse
  • ludocidstring

    Google place CID used for local or knowledge graph result variants.

  • lsigstring

    Google local result signature when Google requires it for a specific view.

  • kgmidstring

    Google Knowledge Graph machine id.

  • sistring

    Google cached search parameter token.

  • ibpstring

    Google layout or expansion parameter for selected modules.

  • udsstring

    Google filter token captured from a previous result page.

  • api_keystring

    API key with search.write for search creation routes or search.read for archive routes. X-API-KEY may be used instead.

  • outputstring

    Requested output format. json returns SerpApi-shaped JSON. html returns raw Google HTML only when a successful cached run is available; fresh browser runs still return HTTP 202 with polling metadata.

    One ofjsonhtmlDefaultjson

Responses

200

A cached successful search was returned immediately, or output=html returned cached raw Google HTML.

›

application/json

  • errorstring
  • search_metadataSerpApiSearchMetadatarequired

    SerpApi-compatible lifecycle metadata. Internal Queued and Running states are exposed as public Processing plus detail fields.

    ›Show fields
    • idstringrequired
    • statusstringrequired
      One ofProcessingSuccessError
    • status_detailstring

      Internal state such as Queued, Running, or a final status detail.

    • runner_status_detailstring

      Runner detail such as queued, runner_claimed, lease_renewed, completed, search_queue_timeout, or runner_lease_expired.

    • json_endpointstring · uri
    • pixel_position_endpointstring · uri
    • raw_html_filestring · uri
    • created_atstring
    • queued_atstring
    • started_atstring
    • lease_expires_atstring
    • processed_atstring | null
    • google_urlstring | null
    • total_time_takennumber | null
    • captcha_autosolveobject

      Safe CAPTCHA autosolve summary when a Google block page required solving.

  • search_parametersSerpApiSearchParametersrequired

    Normalized search parameters used for the Google request.

    ›Show fields
    • enginestringrequired
      One ofgoogle
    • qstringrequired
    • location_requestedstring | null
    • location_usedstring | null
    • google_domainstringrequired
    • hlstring | null
    • glstring | null
    • tbsstring | null
    • startinteger | null
    • devicestringrequired
      One ofdesktopmobiletablet
  • search_informationSerpApiSearchInformation

    High-level information extracted from the Google results page.

    ›Show fields
    • query_displayedstring | null
    • total_resultsinteger | null
    • time_taken_displayednumber | null
    • organic_results_statestring | null
    • page_numberinteger | null
  • organic_resultsarray of SerpApiOrganicResult
    ›Show fields
    • positionintegerrequired
    • titlestring | null
    • linkstring · uri | null
    • displayed_linkstring | null
    • snippetstring | null
    • snippet_highlighted_wordsarray of string
    • sourcestring | null
  • related_searchesarray of object

    Real Google related-search suggestions only.

  • paginationSerpApiPagination
    ›Show fields
    • currentinteger
    • previousstring · uri | null
    • nextstring · uri | null
    • other_pagesobject
  • serpapi_paginationSerpApiPagination
    ›Show fields
    • currentinteger
    • previousstring · uri | null
    • nextstring · uri | null
    • other_pagesobject
  • error_diagnosticsobject

    Safe failure diagnostics, including CAPTCHA provider metadata when available. Raw secrets, cookies, tokens, proxy credentials, and API keys are not included.

202

Fresh search accepted and queued. Poll search_metadata.json_endpoint until the public status changes from Processing to Success or Error.

›

application/json

  • search_metadataSerpApiSearchMetadatarequired

    SerpApi-compatible lifecycle metadata. Internal Queued and Running states are exposed as public Processing plus detail fields.

    ›Show fields
    • idstringrequired
    • statusstringrequired
      One ofProcessingSuccessError
    • status_detailstring

      Internal state such as Queued, Running, or a final status detail.

    • runner_status_detailstring

      Runner detail such as queued, runner_claimed, lease_renewed, completed, search_queue_timeout, or runner_lease_expired.

    • json_endpointstring · uri
    • pixel_position_endpointstring · uri
    • raw_html_filestring · uri
    • created_atstring
    • queued_atstring
    • started_atstring
    • lease_expires_atstring
    • processed_atstring | null
    • google_urlstring | null
    • total_time_takennumber | null
    • captcha_autosolveobject

      Safe CAPTCHA autosolve summary when a Google block page required solving.

  • search_parametersSerpApiSearchParameters

    Normalized search parameters used for the Google request.

    ›Show fields
    • enginestringrequired
      One ofgoogle
    • qstringrequired
    • location_requestedstring | null
    • location_usedstring | null
    • google_domainstringrequired
    • hlstring | null
    • glstring | null
    • tbsstring | null
    • startinteger | null
    • devicestringrequired
      One ofdesktopmobiletablet
400

Invalid search parameters.

›

application/json

  • errorstringrequired

    SerpApi-compatible error message.

  • error_codestring

    Machine-readable Lempile error code when available.

401

Missing or invalid API key.

›

application/json

  • errorstringrequired

    SerpApi-compatible error message.

  • error_codestring

    Machine-readable Lempile error code when available.

403

The API key does not include the required search.write scope.

›

application/json

  • errorstringrequired

    SerpApi-compatible error message.

  • error_codestring

    Machine-readable Lempile error code when available.

429

Workspace has reached the pending Google search queue cap.

›

application/json

  • errorstringrequired

    SerpApi-compatible error message.

  • error_codestring

    Machine-readable Lempile error code when available.

503

Platform, configuration, or storage dependency is temporarily unavailable. New searches normally queue when the runner is at capacity or briefly unavailable.

›

application/json

  • errorstringrequired

    SerpApi-compatible error message.

  • error_codestring

    Machine-readable Lempile error code when available.

Was this page helpful?