UnitBytes Logo
UnitBytes Web Data APIs
Home / Blog / Data Engineering & AI
Data Engineering & AI 8 min read 2026-10-17

PyTrends Is Dead (HTTP 429): Google Trends API Pricing & 2026 Alternatives ($0.30/1K)

Why the archived PyTrends Python library fails with HTTP 429 TooManyRequestsError in 2026—and how Google Trends API alternatives compare ($0.30/1K vs. SerpApi $15/1K) for real-time and historical search data.

UnitBytes
UnitBytes
Autonomous Web Data Intelligence Labs
PyTrends Is Dead (HTTP 429): Google Trends API Pricing & 2026 Alternatives ($0.30/1K)

For nearly a decade, Python developers, quantitative analysts, and SEO engineers relied on pytrends—the unofficial open-source Python wrapper for Google Trends—to pull search interest curves into Pandas DataFrames.

Then, in April 2025, the maintainers of GeneralMills/pytrends officially archived the repository on GitHub, declaring it permanently unmaintained. Today in 2026, anyone running pytrends in a cron job, Airflow DAG, or Jupyter notebook hits an immediate brick wall:

text
pytrends.exceptions.TooManyRequestsError: The request failed: Google returned a response with code 429

When teams look for an official or commercial Google Trends API, they discover a harsh pricing reality: Google does not offer a public self-serve Google Trends REST API, and legacy SERP API vendors like SerpApi charge $15.00 per 1,000 searches (with a $75/month minimum contract) while billing separately for every single widget (TIMESERIES, GEO_MAP, RELATED_QUERIES, RELATED_TOPICS).

In this guide, we break down why pytrends throws endless HTTP 429 errors in 2026, compare the true unit economics of commercial Google Trends API providers, and show how to migrate your Python pipelines to the UnitBytes Google Trends API—backed by 10,600+ production runs and starting at $0.30 to $0.45 per 1,000 records ($0.00045/item) with zero monthly minimums.


1. Why pytrends Fails with HTTP 429 in 2026 (And Why sleep() Doesn't Work)#

When you query trends.google.com, the frontend does not simply fetch a static JSON endpoint. Behind the scenes, Google Trends requires a multi-step session handshake before serving any time-series or geographic widget data:

text
Legacy PyTrends Flow (Archived & Broken in 2026):
[Python Script] ──> [GET /trends/api/explore] ──> ❌ HTTP 429 TooManyRequestsError
  • Outdated widget token payload structure (Repository archived April 2025)
  • Datacenter IP subnet blocked before the first token handshake completes
  • Adding time.sleep(60) or basic proxies still fails on widget token validation

UnitBytes Managed Cloud Trends API:
[Python / n8n] ──> [UnitBytes Cloud Engine] ──> ✅ Clean Rectangular CSV / JSON
  • Automated residential routing across 250+ countries
  • All 5 endpoints normalized into flat rows ($0.00045 / record, $0 compute fees)

Specifically, DIY pytrends scripts and forks fail in production for three structural reasons:

  1. Archived & Unmaintained Endpoint Schemas: Google regularly updates the internal payload format for /trends/api/widgetdata/multiline and /comparedgeo. Because pytrends is archived, upstream schema changes silently return empty DataFrames or KeyError exceptions.
  2. Aggressive Subnet & Session Rate Limiting: Google blocks cloud datacenter IPs (AWS, GCP, GitHub Actions, Google Colab, Hetzner) on the initial token request—returning HTTP 429 before you even fetch a single keyword.
  3. The "Per-Widget" Request Multiplier: In Google Trends, fetching interest over time, regional breakdown, related queries, and related topics requires 5 separate internal widget requests per keyword.

If you are evaluating commercial alternatives to replace pytrends, watch out for per-widget billing traps. Many SERP APIs charge you 1 API credit for the initial explore call, plus another API credit for interest_over_time, another for interest_by_region, and another for related_queries—multiplying your effective cost by 4x:

Provider / SolutionMaintenance StatusBase Monthly CommitmentCost per 1,000 Records / SearchesMulti-Widget Billing Trap?Output Format
pytrends (GitHub)❌ Archived (Broken)$0Free (Fails with HTTP 429 after ~5 calls)N/ABrittle Pandas DataFrames
SerpApi (Google Trends)✅ Maintained$75.00 / mo ($15/1K)$15.00 – $60.00 / 1K (4 calls per full keyword)⚠️ Yes (Billed separately per widget type)Deeply nested raw JSON
DataForSEO Trends API✅ Maintained$50.00 minimum deposit$2.00 – $5.00 / 1K⚠️ Separate live/task endpointsNested task JSON arrays
DIY Playwright + Proxies⚠️ High Maintenance$40+ / mo residential proxy$4.00 – $8.00 / 1K (Cloud RAM + GB bandwidth)❌ Slow (15–25s browser render)Unstructured DOM / Network intercept
UnitBytes Google Trends API✅ Active (10,600+ Runs)$0.00 / mo ($5 free credit)💰 $0.45 / 1K ($0.30/1K on volume tiers)✅ All 5 Endpoints in 1 Engine📊 Flat Tabular CSV, Excel & JSON
💡
Need a Bulk Google Trends CSV / Excel Export Without Writing Code?
Send us your list of 500 or 50,000 keywords, target countries, and historical date ranges using the Done-For-You Dataset Request Form below. We will deliver a clean, pivot-table-ready Excel or CSV file within 24 hours.

UnitBytes maintains two interchangeable cloud entry points on Apify—Google Trends API (/actors/google-trends-api/) and Google Trends Scraper (/actors/google-trends-scraper/)—both powered by the same high-speed extraction core:

  1. interest_over_time (Historical & Real-Time Curves): Extract relative search interest (0–100) across any window—from now 1-H, now 4-H, and now 7-d back to 2004-present or custom YYYY-MM-DD YYYY-MM-DD date ranges.
  2. interest_by_region (Country, State, Metro & City Heatmaps): Pinpoint geographic demand down to DMA metro areas and cities across 250+ countries (common_geo: "US", "GB", "DE", "JP", or worldwide "").
  3. related_queries (Top & Breakout Rising Searches): Capture exact rising search phrases, including queries flagged as Breakout (+5,000% growth) before they appear in traditional SEO keyword tools.
  4. related_topics (Semantic Entity Discovery): Identify surging product categories, brands, and entities correlated with your seed keyword.
  5. Multi-Keyword Comparative Normalization: Pass up to 5 comparison terms simultaneously to receive normalized relative search volume curves across all queries.

4. Flat Tabular JSON Output (Built for Pandas, Excel & BigQuery)#

Unlike raw widget payloads that bury values four levels deep inside nested arrays, UnitBytes Google Trends API normalizes every data point into a clean, rectangular row with a scrape_type discriminator:

Example 1: interest_over_time Record

json
{
  "scrape_type": "interest_over_time",
  "event_index": 1,
  "error": false,
  "keyword": "AI",
  "value": 92,
  "date": "2026-09-02T00:00:00+00:00"
}

Example 2: interest_by_region Record

json
{
  "scrape_type": "interest_by_region",
  "event_index": 1,
  "error": false,
  "keyword": "Coffee",
  "geo": "US-NY-501",
  "geoName": "New York NY",
  "value": 100,
  "max_value_index": 0
}

Because every record is flat, you can export your run directly to CSV or ingest it into Snowflake, BigQuery, Power BI, or Pandas with zero post-processing.


5. Drop-In Python Migration: Replacing pytrends in 3 Minutes#

Migrating an existing Python script from pytrends (TrendReq) to apify-client takes less than 15 lines of code—and eliminates TooManyRequestsError permanently.

Step 1: Replace pytrends with apify-client

bash
pip uninstall pytrends -y
pip install apify-client pandas

Step 2: Run Multi-Keyword Time Series & Regional Extraction

python
import os
import pandas as pd
from apify_client import ApifyClient

client = ApifyClient(os.getenv("APIFY_TOKEN", "YOUR_APIFY_TOKEN"))

# Configure your keywords, custom historical timeframe, and geography
run_input = {
    "keywords": ["OpenAI", "ChatGPT"],
    "custom_timeframe": "2023-01-01 2023-12-31",
    "common_geo": "US"
}

# Call the UnitBytes Google Trends API engine ($0.00045 / record)
run = client.actor("unitbytes/google-trends-api").call(run_input=run_input)

# Load all flat records directly into a Pandas DataFrame
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
df = pd.DataFrame(items)

# Filter by scrape_type just like pytrends methods:
iot_df = df[df["scrape_type"] == "interest_over_time"]
region_df = df[df["scrape_type"] == "interest_by_region"]

print(f"Extracted {len(iot_df)} time-series rows and {len(region_df)} regional rows with zero HTTP 429s!")
iot_df.to_csv("google_trends_timeseries.csv", index=False)

6. No-Code Breakout Keyword Alerts in n8n#

Want to receive a Slack, Telegram, or Email alert the moment a keyword in your niche hits Breakout (+5,000% growth)?

We provide pre-built, 5-node n8n automation templates in our n8n Workflow Directory:

Copy either JSON blueprint, press Ctrl+V inside your n8n canvas, and pipe rising keywords straight into Google Sheets, Airtable, or an automated LLM content brief generator. You can also launch ready-made industry configurations from our 1-Click Task Presets Directory.


7. High-ROI Use Cases for Quantitative, E-Commerce & SEO Teams#

  1. Algorithmic E-Commerce Product Spotting: Combine Google Trends API breakout search detection with our Xiaohongshu Trend Scraper and 1688 Wholesale Scraper to validate consumer demand before ordering factory inventory.
  2. Programmatic SEO & Newsroom Topic Velocity: Media publishers poll now 4-H and now 1-d timeframes hourly to commission articles on surging search topics before competitors rank.
  3. Geo-Targeted Ad Spend Allocation: Performance marketing teams use interest_by_region DMA scores to weight Google Ads and Meta budgets toward metro areas showing the highest real-time search intent.
  4. Alternative Data for Equity & Macro Research: Hedge funds and market researchers track multi-year brand search trajectories across 250+ countries without the survivorship bias or HTTP 429 gaps of DIY scrapers.

Retire broken pytrends scripts and overpriced $75/month SERP subscriptions. Every Apify account includes $5.00 in free monthly credits—enough to extract over 11,000 Google Trends data points every month completely free:

Frequently Asked Questions (FAQ)

Do I need accounts, cookies, or my own proxies to run these scrapers?

No. All UnitBytes cloud extraction engines on Apify operate zero-login with built-in proxy management and anti-bot handling included out of the box.

Can I export the extracted data directly to Excel, CSV, Google Sheets, or n8n?

Yes. Every dataset item is normalized into flat root-level fields that export cleanly to CSV, Excel (.xlsx), JSON, Parquet, Google Sheets, BigQuery, or automated n8n workflows.

How does Pay-Per-Event pricing work on Apify?

You only pay per successfully extracted record with volume discounts on higher tiers, and every Apify account includes $5.00 in free monthly platform usage to test our cloud extraction engines at zero cost.

Tags: #Google Trends API#PyTrends Alternative#PyTrends 429#Google Trends API Pricing#SEO Automation#Python
⚡ Production PyTrends Replacement (10,600+ Cloud Runs)

Extract Google Trends for $0.30–$0.45/1K — Zero HTTP 429 Errors

Extract historical interest curves, regional DMA/city heatmaps, Breakout (+5,000%) rising queries, Google Shopping trends, and YouTube search velocity in clean tabular CSV/JSON. Includes 11,000+ free records every month with Apify's $5 credit.

Continue Reading

Related Technical Guides & Teardowns

All Guides →
Done-For-You Datasets • Data Feeds • Custom Scrapers

Need Custom Data Engineering & AI Data or a Dedicated Pipeline?

Don't want to run scrapers yourself? Tell us what data you need and we'll deliver a clean Excel / CSV / Google Sheets dataset, set up a recurring data feed, or build a custom scraper for a new site.

One-Time Dataset
From $99

Send your keywords, categories, or URLs. We run the extraction and email you a clean Excel/CSV file, usually within 48 hours.

Recurring Data Feed
Priced by Volume

Daily or weekly data delivered to Google Sheets, Amazon S3, BigQuery, or a webhook. Tell us the volume and we'll quote a fixed monthly price.

Custom Scraper
From $299

Need a new website scraped or custom fields added? We build it, deliver it, and can maintain it for you.

We reply within 48 hours.
Prefer direct email? Write to us anytime at contact@unitbytes.com