You want to know what people in a given country are searching for right now, so you can write about a topic or time a campaign while it is rising. Google publishes this as an RSS feed per country, and you can read it with the Python standard library.
The feed
GET https://trends.google.com/trending/rss?geo=US returns RSS 2.0 with an extra ht: namespace (https://trends.google.com/trending/rss). Per item you get the search query (title, lowercase), ht:approx_traffic, pubDate (when the trend started), a picture and up to three linked news stories with title, URL, source and image. geo takes country codes such as US, GB, DE, JP, and some sub-regions such as US-CA or GB-SCT. An invalid code returns HTTP 400; I tried XX.
import re, time, urllib.request import xml.etree.ElementTree as ET from datetime import timezone from email.utils import parsedate_to_datetime NS = {"ht": "https://trends.google.com/trending/rss"} def traffic(label): """'200+' -> 200, '20K+' -> 20000, '1M+' -> 1000000 (a lower bound, not an exact count).""" m = re.fullmatch(r"([\d.,]+)\s*([KM]?)\+?", (label or "").strip(), re.I) if not m: return None return int(float(m.group(1).replace(",", "")) * {"": 1, "K": 1e3, "M": 1e6}[m.group(2).upper()]) def trending(geo): url = f"https://trends.google.com/trending/rss?geo={geo}" req = urllib.request.Request(url, headers={"User-Agent": "trends-example/1.0 (personal script)"}) root = ET.fromstring(urllib.request.urlopen(req, timeout=30).read()) for item in root.iter("item"): label = item.findtext("ht:approx_traffic", namespaces=NS) yield { "query": item.findtext("title"), "traffic_label": label, "traffic": traffic(label), "started": parsedate_to_datetime(item.findtext("pubDate")).astimezone(timezone.utc).isoformat(), "headlines": [n.findtext("ht:news_item_title", namespaces=NS) for n in item.findall("ht:news_item", NS)], } Save that as trending.py, then:
from trending import trending rows = list(trending("US")) print(len(rows), "trends, newest first") for r in rows[:4]: print(r["traffic_label"], r["traffic"], r["started"], len(r["headlines"]), "headlines") 10 trends, newest first 2000+ 2000 2026-11-12T00:30:00+00:00 3 headlines 500+ 500 2026-11-12T00:30:00+00:00 3 headlines 500+ 500 2026-11-12T00:30:00+00:00 3 headlines 500+ 500 2026-11-12T00:30:00+00:00 3 headlines Each dict also holds the query and the headline titles; I left them out of the printout. pubDate arrives with a Pacific offset in my responses, so the script converts it to UTC.
Reading the traffic figure
approx_traffic is a bucket label, not a count. In the feeds I pulled I saw 100+, 200+, 500+, 1000+, 2000+ and 10000+. The traffic() function turns a label into its lower bound and also copes with K and M suffixes, which did not appear in the feeds I pulled. Two trends both labelled 1000+ can differ a lot.
Rank is recency, not size. The feed is sorted by start time, newest first. If you want the biggest first, sort the ten rows yourself.
What the feed does not hold
- Only the 10 newest trends per country. In one pull the ten US items spanned about 20 minutes of start times, and in earlier checks about 40. Poll every 15 to 30 minutes if you do not want to miss any.
- No category, end time, growth figure or related queries. Parameters such as
hours=4are ignored: I got the same ten trends with and without it. An old daily-trends feed URL that guides still mention returns 404. - Interest over time is not available this way. That data comes from Google Trends' explore API, and my first cookie-less request to it today got HTTP 429 (Too Many Requests). It needs browser cookies and tokens, and I am not going to describe how to work around that. For interest over time, use the Google Trends website itself.
Spot what is new since the last poll
Keep the queries you saw last time, per country, and print the ones that are not in the set. Save the first script as trending.py; this one imports it.
import json, os from trending import trending GEOS = ["US", "GB", "DE"] state = json.load(open("trends_seen.json")) if os.path.exists("trends_seen.json") else {} for geo in GEOS: current = list(trending(geo)) previous = set(state.get(geo, [])) for t in current: if previous and t["query"] not in previous: print(f'NEW {geo} {t["traffic_label"]:>7} {t["query"]}') state[geo] = [t["query"] for t in current] json.dump(state, open("trends_seen.json", "w")) print("saved", {g: len(q) for g, q in state.items()}) The first run only saves a baseline. I then edited trends_seen.json to drop two US queries and ran it again:
NEW US 200+ knicks vs cavs NEW US 200+ evansville vs kentucky saved {'US': 10, 'GB': 10, 'DE': 10} Limits and gotchas
- "Dropped" is not "over". A trend leaves the feed because newer ones push it out, not because interest ended.
-
hlchanges the attached news, not the list. In a German test, the same ten trends came back with some different stories. - Some countries have no feed.
AQandKPreturned 400 in my earlier checks. - No bot-protection games. Use a plain request with an honest User-Agent, one request per country per poll. If Google starts refusing, stop. The feed is public, and Google's terms still apply to how you use it.
- Queries are as people typed them: lowercase, sometimes misspelled, and they can name private individuals. Keep that in mind before you republish anything.
If you don't want to maintain this yourself
Disclosure: I'm the developer of an Apify Actor, Google Trending Searches, published under Cedarfetch Labs. It reads the same feed for up to 300 countries and regions in one run and adds three things: numeric traffic values, one merged row per trend across countries, and change tracking that reports only trends that are new since the last run (with first-seen time and peak traffic). It does not provide interest over time or related queries, for the reason above.
It is pay per event: $0.001 per trend row plus $0.00005 per run start, as shown on the listing on 2026-11-11. Check the Pricing tab for current figures. Listing: https://apify.com/cedarfetch/google-trending-searches
Runnable Python, Node.js and cURL examples for the Actor: https://github.com/cedarfetch/google-trending-searches-examples
Not affiliated with Google. "Google" and "Google Trends" are trademarks of Google LLC.
