Yahoo Search is the world's third most-popular search engine, according to StatCounter. Yahoo's search results can provide data for market research, valuable insights into trends and popular topics, SEO strategies, competitive analyses, and more.

The Yahoo Search API from SerpApi gives you a way to pull organic search results, related questions, trending searches, top stories, knowledge graphs, shopping results, and more data from Yahoo. SerpApi handles the HTML parsing, proxy network, captcha puzzles, and other challenges for you, so you can spend more time on your actual project or business.

What can you scrape from Yahoo?

Here's everything you can pull from Yahoo Search using SerpApi:

  • Ad results: Search results that are paid advertisements.
  • Answer box: Answer boxes for flight statuses, dictionary definitions, birthdays, holidays, and other information that appear at the top of search results.
  • Inline images: The image results that appear alongside text search results.
  • Inline shopping: The product results that appear alongside text results, including the titles, images, and prices of each product.
  • Inline videos: The results for videos in text search results, including thumbnails, titles, links, and publish dates for each video.
  • Knowledge graph: The information cards that appear for searches about companies, people, countries, movies, and other topics. These are usually on the right side of the page in a desktop view.
  • Local pack: The location results that appear for searches like "coffee shops near Atlanta, Georgia," and the map image with their locations marked.
  • Organic results: The main search results, including the position, title, link, snippet, and other data for each individual result.
  • Refine this search: The list of queries under "Refine this search" that Yahoo provides for some searches.
  • Related questions: The questions in the "People also ask" block in some Yahoo searches, including text snippets and links.
  • Related searches: Yahoo's search query suggestions, usually in the "Also try" section of search results.
  • Related topics: The list of topics under the "Related topics" block that can appear on some search pages.
  • Related trending searches: The trending searches block that can appear on some search pages.
  • Top stories: Articles that appear as "Top stories" on some search pages, including their titles, thumbnails, snippets, links, and other information.
  • Trending searches: The trending "Top 10 searches" block that appears on some search pages.
A screenshot of a Yahoo search results page for "coffee mug" next to the parsed JSON data
SerpApi fetches and parses Yahoo search results into structured JSON.

Getting started with SerpApi

You need a free SerpApi account to fetch results from Yahoo. SerpApi also provides APIs for pulling data from Google Search, TripAdvisor, Bing, DuckDuckGo, eBay, Facebook, and other search engines. You can upgrade to a paid account later if you need more search capacity, faster speeds, or other features.

If you haven't already, create an account and verify your email and other details. After that, you need to grab your API key, which can be found in your account dashboard.

If you are sharing or publishing your code, remember to store your API key in a safe location! If your key is leaked or stolen, you can regenerate it from the account dashboard.

Install the SerpApi library (optional)

You can use SerpApi's official libraries for Python, JavaScript, Ruby, Java, and other languages. They provide a simple wrapper around the API requests.

You can also use a simple GET request, using cURL, fetch() in Node.js, and other similar methods. This guide will cover both the GET method and several of the official integrations.

Review the Yahoo API documentation

Each API at SerpApi has extensive documentation, covering all the supported parameters and filters, code examples for popular languages, and example JSON responses. Check out the Yahoo Search API page for the exact details.

Yahoo! Search Engine Results API - SerpApi
Scrape Yahoo! search results in JSON format automatically using custom parameters. Search for keywords by location, date and more with SerpApi.

Some of the parameters and features for Yahoo's engine are similar to other APIs from SerpApi, like the Google Search API and Bing Search API. If you are using multiple APIs in the same project, you may need make small adjustments for each engine.

How to scrape Yahoo Search results

If you have your API key, you're ready to start pulling data from Yahoo Search. The parameters and results for the API will not differ between integrations and platforms.

GET request

This will search Yahoo for "Commodore 64" with no region, language, or other parameters specified:

https://serpapi.com/search?engine=yahoo&p=commodore+64&api_key=API_KEY_GOES_HERE

If you wanted to see the search results from Canada with the language set to English, you could add the vc (country) and vl (language) parameters, like this:

https://serpapi.com/search?engine=yahoo&p=commodore+64&vc=ca&vl=lang_en&api_key=API_KEY_GOES_HERE

You can use SerpApi's JSON Restrictor feature to filter the API response, which might be helpful for more efficient parsing or smaller context windows in LLMs. This would return only the knowledge graph, if one exists:

https://serpapi.com/search?engine=yahoo&p=commodore+64&json_restrictor=knowledge_graph&api_key=API_KEY_GOES_HERE

This uses the JSON Restrictor to only return Yahoo's related searches, if any exist:

https://serpapi.com/search?engine=yahoo&p=commodore+64&json_restrictor=related_searches&api_key=API_KEY_GOES_HERE

Python

This will fetch a Yahoo search page for "macintosh plus" with no region, language, or other parameters specified, using the official Python library:

import serpapi

client = serpapi.Client(api_key=YOUR_KEY_GOES_HERE)
results = client.search({
  "engine": "yahoo",
  "p": "macintosh plus",
})

print(results)

You can add additional parameters, such as vc (country) and vl (language). Here's the same search again, but from Canada with English language results:

import serpapi

client = serpapi.Client(api_key=YOUR_KEY_GOES_HERE)
results = client.search({
  "engine": "yahoo",
  "p": "macintosh plus",
  "vc": "ca",
  "vl": "lang_en"
})

print(results)

For more complex projects and production code, make sure to add error handling.

Ruby

This will search Yahoo for "Apple IIGS" with no region, language, or other parameters specified, using the official Ruby gem:

require "serpapi"

client = SerpApi::Client.new(
    engine: "yahoo",
    p: "apple iigs",
    api_key: YOUR_KEY_GOES_HERE
)

results = client.search
p results

If you wanted to perform the search from Canada with the language set to English, you could add the vc (country) and vl (language) parameters, like this:

require "serpapi"

client = SerpApi::Client.new(
    engine: "yahoo",
    p: "apple iigs",
    vc: "ca",
    vl: "lang_en",
    api_key: YOUR_KEY_GOES_HERE
)

results = client.search
p results

It's also important to add error handling for more complex projects or production code.

JavaScript and Node.js

This performs a Yahoo search for "Amiga 500" with no region, language, or other parameters specified, in a Node.js script using the official JavaScript library:

import { getJson } from 'serpapi';

const search = await getJson({
    engine: "yahoo",
    p: "amiga 500",
    api_key: YOUR_KEY_GOES_HERE
});

console.log(search)

You can add more parameters to adjust the settings, like vc for changing the country to Canada, and vl to make sure the results are in English:

import { getJson } from 'serpapi';

const search = await getJson({
    engine: "yahoo",
    p: "amiga 500",
    vc: "ca",
    vl: "lang_en",
    api_key: YOUR_KEY_GOES_HERE
});

console.log(search)

For more complex projects and production code, be sure to add proper error handling.

cURL

This searches Yahoo for "PowerBook G3" with no region, language, or other parameters specified, using a cURL request:

curl --get https://serpapi.com/search \
 -d engine="yahoo" \
 -d p="powerbook+g3" \
 -d api_key="YOUR_KEY_GOES_HERE"

You can specify more parameters, like vc for changing the country to Canada, and vl for English language results:

curl --get https://serpapi.com/search \
 -d engine="yahoo" \
 -d p="powerbook+g3" \
 -d vc="ca" \
 -d vl="lang_en" \
 -d api_key="YOUR_KEY_GOES_HERE"

Other languages and no-code solutions

Even if an official SerpApi integration isn't available for your preferred language or environment, you can still use the API directly with GET requests. You can also use SerpApi with Make.com, N8N, and other tools.

Conclusion

With SerpApi, you can fetch organic search results, answer boxes, videos, shopping results, and much more from Yahoo. When combined with SerpApi's other engines, like Google, DuckDuckGo, and Bing, everything from keyword research to competitive analysis is a breeze.

If you need help using SerpApi, feel free to contact us and we'll get back to you.