DEV Community

CyberMax
CyberMax

Posted on Originally published at cybermaxtools.com

Google Trends rising and breakout queries as JSON (Python, JS, n8n)

Rising related queries are the most useful part of Google Trends for content and product research, and the hardest to get out of the UI in bulk. This walks through what top vs rising vs Breakout mean and how to pull them for many keywords as JSON.

Short answer

Google has no public Trends API for everyone, so rising queries come from tools that read the Trends website. Swellmeter on Apify returns, for each keyword, the top and rising related queries ("Breakout" flagged as breakout: true), a rising/falling/spiking verdict with the % change, the peak and top regions, as one JSON record per keyword at $0.003 per keyword.

Step by step

  1. Pick the keywords, the country (geo, blank = worldwide) and the time range (e.g. today 3-m for fresh rising queries).
  2. Run them; read relatedQueries.rising for each keyword. breakout: true means growth Google labels Breakout (more than 5,000%).
  3. Sort rising queries by value and drop the ones you already cover: what is left is your content or product list.
  4. Use property youtube, news, images or shopping to get rising queries for that Google surface.
  5. Schedule it in monitor mode to be told only when a keyword's verdict changes or a new rising query appears.

Python (pip install apify-client): breakout searches for a list of seed keywords

import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("cybermax/google-trends").call(run_input={
    "keywords": ["ai agents", "mcp server", "vibe coding"],
    "geo": "US", "timeRange": "today 3-m", "maxRelated": 25,
})
for r in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{r['keyword']}: {r['direction']} ({r.get('trendChangePct')}%)")
    for q in r["relatedQueries"]["rising"]:
        print("   ", q["query"], q["formattedValue"], "BREAKOUT" if q["breakout"] else "")
Enter fullscreen mode Exit fullscreen mode

JavaScript / Node (npm i apify-client)

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('cybermax/google-trends').call({ keywords: ['claude'], timeRange: 'today 3-m' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const breakouts = items.flatMap((r) => r.relatedQueries.rising.filter((q) => q.breakout).map((q) => q.query));
console.log(breakouts);
Enter fullscreen mode Exit fullscreen mode

No code: weekly trend alert in n8n, Make or Zapier

n8n: HTTP Request node (or the Apify node, action "Run an Actor and get dataset")
Method:  POST
URL:     https://api.apify.com/v2/acts/cybermax~google-trends/run-sync-get-dataset-items
Auth:    Header Auth  ->  Authorization: Bearer <your Apify token>
Body:    JSON  {"keywords": ["your niche", "your product"], "geo": "US", "timeRange": "today 3-m", "monitor": true}
Output:  one n8n item per result row, ready for Google Sheets / Airtable / a Slack message

Make:    Apify app -> "Run an Actor" (Actor: cybermax/google-trends, wait for finish = yes)
         -> Apify "Get Dataset Items" (dataset = the run's defaultDatasetId) -> Google Sheets "Add a Row"
Zapier:  Apify app -> action "Run Actor" (cybermax/google-trends, input JSON as above)
         -> trigger "Finished Actor Run" -> "Fetch Dataset Items" -> your app
Runs longer than 5 minutes: start with POST /v2/acts/cybermax~google-trends/runs and read the dataset when the run finishes.

Add a Schedule trigger (weekly) in front and a Slack or email step after it: with monitor: true only keywords whose verdict changed or that gained new rising queries come back.
Enter fullscreen mode Exit fullscreen mode

From an AI agent (MCP)

# Any MCP client (Claude Desktop, Claude Code, Cursor, VS Code): Apify's hosted MCP server
{
  "mcpServers": {
    "google-trends": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.apify.com/?tools=cybermax/google-trends",
               "--header", "Authorization: Bearer ${APIFY_TOKEN}"],
      "env": { "APIFY_TOKEN": "<your Apify token>" }
    }
  }
}
# The agent sees one tool, cybermax--google-trends, with the Actor's input schema.
Enter fullscreen mode Exit fullscreen mode

Rising queries for "claude" (Swellmeter real record, US, past 12 months)

Rising query Value Breakout
claude cowork Breakout yes
claude mythos Breakout yes
claude fable Breakout yes

Source: Swellmeter (Apify Actor cybermax/google-trends) README, real record

Top vs rising related queries

Top queries are the searches most often made together with your keyword in the period. Rising queries are the ones whose search frequency grew most compared with the period before; Google shows very large growth as "Breakout". Rising queries are where new demand shows up first, which is why content, SEO and product teams watch them.

Also: today's trending searches by country

Leave keywords empty and set trendingGeos (for example ["US", "GB"]) to get Google's trending-now list per country with traffic estimates and news links, one record per country.

Good to know

  • Price on Apify: $0.003 per keyword analyzed and $0.003 per trending list; failed lookups are free. Apify's free plan includes $5 of usage each month.
  • Google Trends values are relative (0-100 within one request), not search volumes.

FAQ

Does Google have an official Trends API?
Google opened an official Trends API to a small group of alpha testers in 2025; most teams still use tools that read the public Trends site.

What does Breakout mean?
Google shows Breakout when a related search grew by more than 5,000% versus the previous period.

Can I compare more than 5 keywords?
Google compares up to 5 per chart. Swellmeter can compare 5 on one scale (compare: true) or analyze any number one by one.

Can an AI agent use it?
Yes. Apify's MCP server exposes it as cybermax--google-trends.

Try it on your own list: Swellmeter on Apify (Apify's free plan includes $5 of usage a month).


Published automatically by CyberMax. Every number above comes from the linked public data; nothing is estimated.

Top comments (0)