Search Yahoo as JSON
Early access. Tell us what you're building and we'll set you up. Contact us
api.lempile.com/search.jsonCreates 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
enginestringrequiredSearch engine:
yahoofor this API.One ofyahoopstringrequiredThe query, as typed on Yahoo. Operators such as
site:and quotes work. Yahoo's name for the query (notq).≥ 1 charsbintegerPosition of the page's first result, from 1. A Yahoo page has 7 results: page 2 starts at
b=8, page 3 atb=15(thebofpagination.next).Default1≥ 1yahoo_domainstringsearch.yahoo.comor a country's Yahoo such asfr.search.yahoo.com.Defaultsearch.yahoo.comPattern^([a-z]{2}\.)?search\.yahoo\.com$vcstringCountry of the results, 2 letters (
fr). Sent to Yahoo as given.Pattern^[A-Za-z]{2}$vlstringLanguage of the results, such as
lang_fr. Sent to Yahoo as given.vmstringAdult filter:
r(strict),i(moderate) orp(off).One ofripvsstringOnly results from these domains or endings, comma-separated (
.fr,.com).≤ 200 charsvfstringOnly this file type, such as
pdf.≤ 200 charsdevicestringdesktop, the only device for now.One ofdesktopDefaultdesktopoutputstringjsonorhtml(the page as Yahoo showed it).One ofjsonhtmlDefaultjsonno_cachebooleanSet to
trueto run a new Yahoo search instead of returning the same finished search from the last hour.DefaultfalseasyncbooleanAccepted for SerpApi compatibility; a new search always answers 202 and is polled.
Defaultfalseapi_keystringAPI key with
search.writefor search creation routes orsearch.readfor archive routes.X-API-KEYmay be used instead.
Responses
200The same search, finished within the last hour.
›
application/json
search_metadataYahooSearchMetadatarequired›Show fieldsHide fields
idstringrequiredstatusstringrequiredOne ofProcessingSuccessErrorstatus_detailstringOn a failed search: why (
yahoo_blocked,yahoo_consent_wall,yahoo_search_failed,search_queue_timeout).json_endpointstring · uriraw_html_filestring · uriyahoo_urlstring · uriThe Yahoo address the search opened.
created_atstringprocessed_atstringtotal_time_takennumber
search_parametersobjectrequiredengine, p, yahoo_domain, device and the parameters given.
search_informationobject›Show fieldsHide fields
query_displayedstringorganic_results_statestring
organic_resultsarray of YahooOrganicResult›Show fieldsHide fields
positionintegerrequired1-based position on this page.
titlestringrequiredlinkstring · urirequiredThe result's own address, read from Yahoo's page.
redirect_linkstring · uriYahoo's click link for the same result, when Yahoo's page wraps it (most results have none).
displayed_linkstringThe address as Yahoo shows it, parts separated by ›. Read
linkfor the address.sourcestringThe site's name as Yahoo shows it.
snippetstring
paginationobjectThe 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 fieldsHide fields
currentintegernextstring · urinext_linkstring · uripreviousstring · uriprevious_linkstring · uriother_pagesobject
errorstringOn a failed search: what happened.
202Search accepted and queued.
›
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 | nulltotal_time_takennumber | null
search_parametersSerpApiSearchParametersThe search's stored parameters: engine, p, yahoo_domain, device and the parameters given.
400Invalid search parameters (for example no p, a b below 1, a device other than desktop, a yahoo_domain that is not Yahoo's).
›
p, a b below 1, a device other than desktop, a yahoo_domain that is not Yahoo's).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.
429The workspace already has too many Yahoo searches queued or running.
›
application/json
errorstringrequiredSerpApi-compatible error message.
error_codestringMachine-readable Lempile error code when available.
503Lempile has no IP that can run a Yahoo search right now. Retry later.
›
application/json
errorstringrequiredSerpApi-compatible error message.
error_codestringMachine-readable Lempile error code when available.
Was this page helpful?