Skip to content
Docs

Search Google as JSON

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

GETapi.lempile.com/search.json

JSON-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

  • 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.

  • 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.

  • tbsstring

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

  • 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
  • api_keystring

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

Responses

200

A cached successful search was returned immediately.

›

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.

›

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?