Skip to content
Docs

Create Search

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

Use GET /search.json for JSON clients. GET /search is also supported for SerpApi compatibility.

Fresh non-cached searches are queue-first and normally return 202 Accepted.

For Yahoo results, send engine=yahoo with the query as p: see Yahoo Search API.

Request#

Shell
curl -sS "https://api.lempile.com/search.json?engine=google&q=Coffee&location=Austin%2C+Texas%2C+United+States&hl=en&gl=us" \
  -H "X-API-KEY: your-api-key"

Normal Fresh Response#

JSON
{
  "search_metadata": {
    "id": "search_id",
    "status": "Processing",
    "status_detail": "Queued",
    "json_endpoint": "https://api.lempile.com/searches/search_id.json",
    "raw_html_file": "https://api.lempile.com/searches/search_id.html",
    "pixel_position_endpoint": "https://api.lempile.com/searches/search_id.json_with_pixel_position"
  },
  "search_parameters": {
    "engine": "google",
    "q": "Coffee",
    "google_domain": "google.com",
    "device": "desktop"
  }
}

Cached Response#

If an identical successful search is still cached, Lempile may return 200 OK immediately with final organic_results.

Queue Full Response#

If the workspace already has too many pending searches, Lempile returns 429.

JSON
{
  "error": "Workspace Google search queue is full.",
  "error_code": "workspace_search_queue_full"
}

Important Parameters#

Parameter Purpose
q Google query. Supports operators such as site:, inurl:, and quoted phrases.
location Human-readable location. Do not combine with uule, lat, or lon.
gl Country localization, such as us, ca, or fr.
hl Interface language, such as en or fr.
tbs Google filter string, such as qdr:m.
as_sitesearch Results from one site only, such as linkedin.com/in. See below.
device desktop, mobile, or tablet. Defaults to desktop.
no_cache Set to true to force a fresh queued browser run.

async is still accepted for compatibility, but fresh searches are queue-first by default whether or not async=true is sent.

Advanced Search Parameters#

Lempile accepts SerpApi's advanced Google parameters and sends them to Google unchanged. They are part of the cache key, so the same query with a different as_sitesearch is a different search.

Parameter Purpose
as_sitesearch Results from this site only, such as linkedin.com/in.
as_dt With as_sitesearch: i keeps only that site (the default), e leaves it out.
as_epq A phrase every result must contain.
as_eq A word or phrase no result may contain.
as_oq Extra words: every result contains at least one of them.
as_q More words to look for.
as_qdr Recent results only: d, w, m or y, with an optional count such as d10.
as_rq Results related to a URL.
as_lq Results that link to a URL.
as_nlo, as_nhi A number range, from as_nlo to as_nhi.

For LinkedIn profile searches, use as_sitesearch=linkedin.com/in rather than site:linkedin.com/in inside q: Google now ignores that site: filter for profile searches, but honours as_sitesearch.

Shell
curl -sS "https://api.lempile.com/search.json?engine=google&q=%22Head+of+Growth%22+Paris&as_sitesearch=linkedin.com%2Fin&hl=en&gl=us" \
  -H "X-API-KEY: your-api-key"

Was this page helpful?