What happened to pytrends?
pytrends (GeneralMills/pytrends on GitHub) was a "pseudo API for Google Trends": it called the same endpoints the Trends website uses. Its last code push was in August 2024, and the repository was archived on April 17, 2025, so it's read-only now. Code that still uses it works only as long as Google's endpoints don't change, and it's prone to HTTP 429 "too many requests" errors when you run many queries from one IP address.
Does Google Trends have an official API?
Yes, in alpha. Google announced the Google Trends API (alpha) on July 24, 2025. It offers consistently scaled search interest for a rolling 5-year window, daily to yearly aggregation, and region and sub-region breakdowns. Access is limited: Google says it is prioritising developers who know their use case and can give feedback, and you apply through a form.
pytrends alternatives compared
| Option | Status | Access | Data | Who maintains it | Cost |
|---|---|---|---|---|---|
| pytrends | Archived April 17, 2025 | pip install | Interest over time, by region, related queries (while endpoints still work) | Nobody | Free |
| Google Trends API (alpha) | Official, limited alpha | Apply and wait for approval | Consistently scaled interest, 5 years, daily/weekly/monthly/yearly, regions and sub-regions | Not published for the alpha | |
| Your own requests | DIY | Your code, your own IPs | Whatever you parse | You | Your time plus infrastructure |
| Hosted scraper (e.g. Google Trends Scraper API) | Active | API key, runs on demand or on a schedule | Interest over time, interest by region, related and rising queries, trending searches, related topics (often empty) | The publisher | $29 a month rental on Bytewells plus compute (tests: $0.0015 for two terms over 12 months) |
Checked 19 Nov 2026: GitHub, Google Search Central and the Bytewells listing.
Trends shows relative interest only. If you also scrape SERPs for the same keywords, the Google Search scraper (SERP API) returns organic results with ranks and places as JSON.
Fixing Google Trends 429 errors
A 429 means Google is rate-limiting your IP address. With pytrends or your own code:
- Slow down: add delays between requests and back off when you get a 429.
- Send fewer requests: compare up to five terms in one request instead of one term at a time.
- Spread requests across IP addresses. Datacenter IPs get limited faster.
- Cache results and only re-pull the latest period.
A hosted scraper handles retries and rate limits for you. The CleanScrape Actor on Bytewells handles retries for you. If you still see 429s, its README suggests trying a smaller run later.
Moving from pytrends to a hosted Actor
The pytrends calls you used map to result types in one run:
| pytrends | Google Trends Scraper API (dataTypes) |
|---|---|
interest_over_time() | interest_over_time |
interest_by_region() | interest_by_region |
related_queries() | related and rising queries |
trending_searches() | trending_now |
related_topics() | related topics (limited availability) |
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["BYTEWELLS_TOKEN"], api_url="https://bytewells.com/api")
run = client.actor("cleanscrape/google-trends-scraper").call(run_input={
"searchTerms": ["iced coffee", "cold brew"],
"dataTypes": ["interest_over_time"],
"geo": "US",
"timeframe": "today 3-m",
})
rows = client.dataset(run["defaultDatasetId"]).list_items().items
Each run writes rows with a dataType column, and a RUN_REPORT in the key-value store marks each requested type as ok, empty, failed or skipped. Values are relative interest (0–100 within the terms and period you compared), so only compare values from the same run, as on the Trends website.
Sources
- https://github.com/GeneralMills/pytrends ("archived by the owner on Apr 17, 2025"; last push 2024-08-10 via GitHub API)
- https://developers.google.com/search/blog/2025/07/trends-api and https://developers.google.com/search/apis/trends
- https://bytewells.com/store/cleanscrape/google-trends-scraper (data types, inputs, RUN_REPORT, 429 guidance, price, test costs)
Frequently asked questions
- Is pytrends still working?
- The repository was archived on April 17, 2025, so it gets no fixes. It may still run, but any change to Google's endpoints can break it, and 429 errors are common at volume.
- Does Google Trends have an API?
- Google launched the Google Trends API as an alpha on July 24, 2025. Access is limited to approved testers who apply through Google's form.
- How do I fix "429 too many requests" in pytrends?
- Slow down and back off, batch up to five terms per request, cache results, and spread load across IP addresses. A hosted scraper handles retries and rate limits for you.
- What is the best pytrends alternative?
- If you're approved for Google's alpha, use it. Otherwise a hosted Google Trends scraper returns the same kinds of data (interest over time, by region, related queries, trending searches) without maintaining code.
- How much does the Google Trends Scraper API cost on Bytewells?
- $29 a month after a one-day free trial, plus compute and network usage from your credit. There's no per-row charge, and new accounts get $5 of free credit.