pytrends trending_searches() returns 404: how to get Google trending searches in Python (2026)
Disclosure: I built the Apify Actor in the last section, so I'm biased. Apify links here are referral links. The free fix below doesn't need it.
You want today's trending searches for a country, so you reach for the pytrends call every old tutorial uses:
from pytrends.request import TrendReq pytrends = TrendReq(hl="en-US", tz=0) pytrends.trending_searches(pn="united_states") And it fails:
pytrends.exceptions.ResponseError: The request failed: Google returned a response with code 404 realtime_trending_searches(pn="US") and today_searches(pn="US") fail with the same 404. I ran all three with pytrends 4.9.2 (the latest release) on 20 November 2026.
Why it's a 404 and not a 429
A 429 means Google is rate-limiting you, and waiting or slowing down helps. (I covered that one in pytrends 429 TooManyRequestsError: why it happens and 3 ways to fix it.)
A 404 means the address no longer exists. pytrends hard-codes these URLs in pytrends/request.py:
| pytrends method | URL it calls |
|---|---|
trending_searches() | https://trends.google.com/trends/hottrends/visualize/internal/data |
realtime_trending_searches() | https://trends.google.com/trends/api/realtimetrends |
today_searches() | https://trends.google.com/trends/api/dailytrends |
Requested with plain curl, with no pytrends and no cookies involved, all three return HTTP 404 too. So it isn't your IP, your cookies or your proxy. Google's trending searches now live on the newer Trending now page, and the old endpoints are gone. The old daily RSS address that some blog posts use, https://trends.google.com/trends/trendingsearches/daily/rss?geo=US, also returns 404.
pytrends won't get a fix. The repository was archived in April 2025, and 4.9.2 is from April 2023. Retries, proxies and sleep() won't help, because there is nothing at those addresses to retry.
The interest-over-time, related-queries and interest-by-region calls are separate endpoints. They still worked when I tested them on 20 November 2026 (interest_over_time(), related_queries() and interest_by_region() for one keyword), so you don't have to drop pytrends altogether.
The free fix: Google's Trending now RSS feed
Google publishes a public RSS feed for Trending now:
https://trends.google.com/trending/rss?geo=US It returned HTTP 200 for me on 20 November 2026, with no API key, no cookie and no special headers. Each <item> is one trending search with an approximate traffic band (5000+, 200+…), the time it started trending, a picture and a few news articles. Save this as rss.py:
import requests import xml.etree.ElementTree as ET import pandas as pd HT = {"ht": "https://trends.google.com/trending/rss"} def trending_now(geo="US"): r = requests.get("https://trends.google.com/trending/rss", params={"geo": geo}, timeout=30) r.raise_for_status() rows = [] for rank, item in enumerate(ET.fromstring(r.content).iter("item"), 1): news = item.find("ht:news_item", HT) rows.append({ "geo": geo, "rank": rank, "query": item.findtext("title"), "approx_traffic": item.findtext("ht:approx_traffic", namespaces=HT), "started": pd.to_datetime(item.findtext("pubDate"), utc=True), "top_news": news.findtext("ht:news_item_title", namespaces=HT) if news is not None else None, "news_url": news.findtext("ht:news_item_url", namespaces=HT) if news is not None else None, }) return pd.DataFrame(rows) if __name__ == "__main__": df = trending_now("US") print(len(df)) print(df[["rank", "query", "approx_traffic", "started"]].head()) Output from my run (20 November 2026, US):
10 rank query approx_traffic started 0 1 earthquake 5000+ 2026-11-20 06:40:00+00:00 1 2 earthquake san jose 500+ 2026-11-20 06:40:00+00:00 2 3 earthquake today 200+ 2026-11-20 06:40:00+00:00 3 4 earthquake california 200+ 2026-11-20 06:40:00+00:00 4 5 how to sell cars in gta 6 200+ 2026-11-20 06:40:00+00:00 Things I noticed while testing it:
- The country code is ISO two-letter (
US,GB,IN,DE), not pytrends'united_statesstyle. An unknown code such asZZgives HTTP 400. With nogeoat all the feed still answers. - It's short. US, GB, IN and DE each returned 10 items when I checked. If you need more than the top handful, this feed isn't the right tool.
-
rankis just the position in the feed, not a traffic ranking. In the GB feed, item 3 had200+while item 2 had100+. If order matters, parseapprox_traffic(strip the+and commas) and sort on that. -
approx_trafficis a band, not a count. Treat5000+as "at least 5,000 searches", not an exact number. - There's no history. The feed only shows what's trending now. If you want a record, you have to save it yourself.
Keep your own daily archive (still free)
Run this from cron or a scheduled GitHub Action. It appends the US, UK and India feeds to one CSV and skips topics it already saved:
from datetime import datetime, timezone from pathlib import Path import pandas as pd from rss import trending_now OUT = Path("trending_archive.csv") fetched = datetime.now(timezone.utc) frames = [trending_now(geo) for geo in ["US", "GB", "IN"]] new = pd.concat(frames, ignore_index=True) new["fetched_at"] = fetched if OUT.exists(): old = pd.read_csv(OUT, parse_dates=["started", "fetched_at"]) new = pd.concat([old, new], ignore_index=True) # keep one row per (country, query, start time), the latest fetch wins new = new.drop_duplicates(subset=["geo", "query", "started"], keep="last") new.to_csv(OUT, index=False) print(f"{len(new)} rows in {OUT}") I ran it twice in a row. Both runs printed 30 rows in trending_archive.csv, so the second run added no duplicates.
If all you need is "what's trending in country X right now", you can stop here. That's the whole fix.
Going further: how big is each trending search?
The feed tells you what is trending. It doesn't tell you how a search has moved over the past week, or which related searches are rising with it. That data comes from the interest-over-time and related-queries endpoints. You can call those with pytrends (they still work, but cloud servers get 429s quickly), or with a hosted scraper.
I use my own Google Trends Scraper on Apify for this step. To be upfront: its "trending now" mode reads this same RSS feed, so don't pay for the list itself unless you want it scheduled and stored without running your own cron job. Where it does help is the follow-up: you pass in the trending queries and get each one's 7-day hourly series and rising related queries. Proxies and retries are handled inside the run.
pip install -U apify-client requests pandas export APIFY_TOKEN="your-token-here" # Apify Console → Settings → API & Integrations import os from apify_client import ApifyClient from rss import trending_now top = trending_now("US")["query"].head(3).tolist() # free: today's top 3 from the feed client = ApifyClient(os.environ["APIFY_TOKEN"]) run = client.actor("logicbase_systems/google-trends").call(run_input={ "keywords": top, "geos": ["US"], "timeframe": "now 7-d", # hourly points for the past 7 days "includeRelatedQueries": True, "includeInterestByRegion": False, }) for row in client.dataset(run.default_dataset_id).iterate_items(): if row.get("status") != "ok": print(row["keyword"], "->", row.get("error")) continue last = row["interestOverTime"][-1] # the current hour, usually still partial note = " (partial hour)" if last.get("isPartial") else "" rising = [q["query"] for q in row.get("relatedQueries", {}).get("rising", [])[:3]] print(f'{row["keyword"]}: now {last["value"]}{note}, ' f'7-day average {row["summary"]["average"]}, rising: {rising}') My run on 20 November 2026 took about 5 seconds inside Apify:
earthquake san jose: now 100 (partial hour), 7-day average 0, rising: ['earthquake alert san jose', 'usgs earthquake san jose', 'earthquake right now san jose'] earthquake: now 100 (partial hour), 7-day average 1.2, rising: ['earthquake soledad', 'earthquake mooresville nc', 'earthquake soledad ca'] earthquake today: now 100 (partial hour), 7-day average 2.8, rising: ['romania earthquake today', 'earthquake in romania today', 'iloilo earthquake today'] That is what a real spike looks like: the current hour is the 100 on Google's 0–100 scale, against a 7-day average of about 1–3. One thing to watch: the summary's peak and latest skip the partial hour. So for a search that only started trending in the last hour, summary["latest"] can look small while the last point in interestOverTime is 100. Read the last point directly, as the code above does.
Pricing is $0.003 per keyword result and $0.001 per trending topic, if you use that mode. Searches with no data and failed searches aren't charged. The run above was three keyword results, so $0.009 plus a tiny start fee. Comparisons, CSV export and the other inputs are in the earlier Google Trends in Python walkthrough.
Quick reference
| You want | Use |
|---|---|
| Today's trending searches for a country | The free RSS feed (trending_now() above) |
| A history of trending searches | The archive script on a daily schedule |
| How big each trending search is, plus rising related queries | pytrends interest_over_time() if you aren't getting 429s, or a hosted scraper |
Anything from trending_searches() / realtime_trending_searches() | Nothing. Those endpoints return 404, so move off them |
Check that your use of the data respects Google's terms. And if Google changes the RSS feed too, I'll update this post.