Skip to content
Docs

Search Yahoo as JSON

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

GETapi.lempile.com/search.json

Creates a Yahoo search. A fresh search returns HTTP 202; poll search_metadata.json_endpoint until search_metadata.status is Success or Error. Once a search has finished, the same search within the hour returns its stored result with HTTP 200 unless no_cache=true; while the first is still Processing, the same request starts another search.

Authentication

X-API-KEY header·A Lempile API key, made in the dashboard under Access tokens.

Query parameters

  • enginestringrequired

    Search engine: yahoo for this API.

    One ofyahoo
  • pstringrequired

    The query, as typed on Yahoo. Operators such as site: and quotes work. Yahoo's name for the query (not q).

    ≥ 1 chars
  • binteger

    Position of the page's first result, from 1. A Yahoo page has 7 results: page 2 starts at b=8, page 3 at b=15 (the b of pagination.next).

    Default1≥ 1
  • yahoo_domainstring

    search.yahoo.com or a country's Yahoo such as fr.search.yahoo.com.

    Defaultsearch.yahoo.comPattern^([a-z]{2}\.)?search\.yahoo\.com$
  • vcstring

    Country of the results, 2 letters (fr). Sent to Yahoo as given.

    Pattern^[A-Za-z]{2}$
  • vlstring

    Language of the results, such as lang_fr. Sent to Yahoo as given.

  • vmstring

    Adult filter: r (strict), i (moderate) or p (off).

    One ofrip
  • vsstring

    Only results from these domains or endings, comma-separated (.fr,.com).

    ≤ 200 chars
  • vfstring

    Only this file type, such as pdf.

    ≤ 200 chars
  • devicestring

    desktop, the only device for now.

    One ofdesktopDefaultdesktop
  • outputstring

    json or html (the page as Yahoo showed it).

    One ofjsonhtmlDefaultjson
  • no_cacheboolean

    Set to true to run a new Yahoo search instead of returning the same finished search from the last hour.

    Defaultfalse
  • asyncboolean

    Accepted for SerpApi compatibility; a new search always answers 202 and is polled.

    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

The same search, finished within the last hour.

›

application/json

  • search_metadataYahooSearchMetadatarequired
    ›Show fields
    • idstringrequired
    • statusstringrequired
      One ofProcessingSuccessError
    • status_detailstring

      On a failed search: why (yahoo_blocked, yahoo_consent_wall, yahoo_search_failed, search_queue_timeout).

    • json_endpointstring · uri
    • raw_html_filestring · uri
    • yahoo_urlstring · uri

      The Yahoo address the search opened.

    • created_atstring
    • processed_atstring
    • total_time_takennumber
  • search_parametersobjectrequired

    engine, p, yahoo_domain, device and the parameters given.

  • search_informationobject
    ›Show fields
    • query_displayedstring
    • organic_results_statestring
  • organic_resultsarray of YahooOrganicResult
    ›Show fields
    • positionintegerrequired

      1-based position on this page.

    • titlestringrequired
    • linkstring · urirequired

      The result's own address, read from Yahoo's page.

    • redirect_linkstring · uri

      Yahoo's click link for the same result, when Yahoo's page wraps it (most results have none).

    • displayed_linkstring

      The address as Yahoo shows it, parts separated by ›. Read link for the address.

    • sourcestring

      The site's name as Yahoo shows it.

    • snippetstring
  • paginationobject

    The pages Yahoo offers, with Yahoo's own addresses: current, next, previous, other_pages. For the next page, send the same search with the b of next.

  • serpapi_paginationYahooPagination
    ›Show fields
    • currentinteger
    • nextstring · uri
    • next_linkstring · uri
    • previousstring · uri
    • previous_linkstring · uri
    • other_pagesobject
  • errorstring

    On a failed search: what happened.

202

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
    • total_time_takennumber | null
  • search_parametersSerpApiSearchParameters

    The search's stored parameters: engine, p, yahoo_domain, device and the parameters given.

400

Invalid search parameters (for example no p, a b below 1, a device other than desktop, a yahoo_domain that is not Yahoo's).

›

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

The workspace already has too many Yahoo searches queued or running.

›

application/json

  • errorstringrequired

    SerpApi-compatible error message.

  • error_codestring

    Machine-readable Lempile error code when available.

503

Lempile has no IP that can run a Yahoo search right now. Retry later.

›

application/json

  • errorstringrequired

    SerpApi-compatible error message.

  • error_codestring

    Machine-readable Lempile error code when available.

Was this page helpful?