Our Yahoo! Trends API lets you scrape the trending topics displayed on Yahoo! Trends. Each topic includes its rank, title, description, and category, along with related articles, videos, social media details, and AI questions when available.

The Yahoo! server returns up to 100 topics per search, and may return fewer. When additional topics are available, the response includes a serpapi_pagination.next_page_token. Pass this value as the next_page_token parameter in a subsequent search to retrieve the next page of topics. Repeat this process until the response no longer includes a next page token.


The API endpoint is https://serpapi.com/search?engine=yahoo_trends

Head to the playground for a live and interactive demo.

API Parameters

Search Query

next_page_token

Optional

Parameter defines the next page token. It is used for retrieving the next page of results. Leave it unset for the first page. Up to 100 results are returned per page; Yahoo! may return fewer.

The next page token can be found in the SerpApi JSON response: serpapi_pagination -> next_page_token. It is only present while more results are available.

Advanced Parameters

Serpapi Parameters

engine

Required

Set parameter to yahoo_trends to use the Yahoo! Trends API engine.

no_cache

Optional

Parameter will force SerpApi to fetch the Yahoo! Trends results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

zero_trace

Optional

Enterprise only. Parameter enables ZeroTrace mode. It can be set to false (default) or true. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the format of the result. It can be set to json (default) to get a structured JSON of the results, html to get the raw HTML retrieved, or md to get a markdown-formatted version optimized for LLMs and AI agents.

json_restrictor

Optional

Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.

API Results

JSON Results

JSON output includes structured data for trending topics, categories, and milestones.

A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, error will contain an error message. search_metadata.id is the search ID inside SerpApi.

HTML Results

This API does not have a full HTML response, only text. search_metadata.prettify_html_file contains a link to the prettified version of the result. It is displayed in the playground.

Markdown Results

Markdown output is optimized for LLMs and AI agents. It provides most of the same informational content as JSON in a token-efficient format using tables, markdown links, and YAML frontmatter.

To access, use the output=md parameter, the /search.md endpoint, or request header Accept: text/markdown.

API Examples

JSON Structure Overview

{
  ...
  "trending_topics": [
    {
      "rank": "Integer - Position of the topic in the trending list.",
      "title": "String - Title of the trending topic.",
      "long_title": "String - Longer, sentence style title of the trending topic.",
      "description": "String - Description of why the topic is trending.",
      "category": "String - Category of the topic (e.g. Entertainment, News, Sports).",
      "hashtag": "String - Top hashtag associated with the topic, when it trends on social media.",
      "hashtag_link": "String - Link to the hashtag on the social media platform.",
      "platform": "String - Social media platform where the hashtag is trending.",
      "badges": "Array - Badges attached to the topic (e.g. Up arrow, New, Trending on TikTok).",
      "articles": [
        {
          "title": "String - Title of the related article.",
          "link": "String - Yahoo! link to the article.",
          "canonical_link": "String - Link to the article on the original publisher.",
          "source": "String - Name of the publisher.",
          "thumbnail": "String - Link to the article image.",
          "original_image": "String - Link to the original full resolution article image."
        },
        ...
      ],
      "videos": [
        {
          "title": "String - Title of the related video.",
          "duration": "Integer - Duration of the video in seconds.",
          "thumbnail": "String - Link to the video thumbnail.",
          "teaser_link": "String - Link to a short teaser clip of the video, played on the topic card.",
          "full_video_link": "String - Playable video link, included when the full_video_links parameter is enabled. Links expire after one hour; run a new search with no_cache enabled to retrieve fresh links."
        },
        ...
      ],
      "ai_questions": [
        {
          "question": "String - Suggested question about the topic.",
          "link": "String - Link to ask the question on Yahoo! AI."
        },
        ...
      ]
    },
    ...
  ],
  "categories": [
    {
      "name": "String - Name of the category.",
      "topic_count": "Integer - Number of trending topics in the category."
    },
    ...
  ],
  "milestones": [
    {
      "rank": "Integer - Rank of the topic the milestone refers to.",
      "title": "String - Title of the milestone topic.",
      "type": "String - Type of the milestone (e.g. socialChatter).",
      "articles": "Array - Related articles, same structure as trending topic articles."
    },
    ...
  ],
  "serpapi_pagination": {
    "next": "String - SerpApi URL for the next page of results.",
    "next_page_token": "String - Token to retrieve the next page of topics. Only present while more results are available."
  },
  ...
}