pytrends is still widely installed, but it is not a production API contract. Trends API replaces the scrape with POST https://api.trendsapi.ai/api, Bearer auth, and three modes: get_time_series, get_growth, and get_top_trends. On 2026-08-07, Google Search interest for the keyword "pytrends" sat at 11.0 after a 30D drop of -80.0% and a 12M drop of -47.62%. The PyPI project pytrends still showed 313,892 weekly downloads on 2026-07-27 with 12M volume growth of 336.02%. Parse the response body twice; that is the usual integration mistake.

Why pytrends breaks in production

pytrends wraps private Google Trends endpoints. There is no Google SLA, documented rate limit, or stable schema for that path. Overnight jobs fail when Google rotates cookies or changes a response field. Teams then rewrite parsers instead of shipping features.

Install demand for the library remains high. Pulled on 2026-08-07 from the python source:

Period Recent date Recent value Baseline value Score growth Recent volume Volume growth
30D 2026-07-27 77.9 99.1 -21.39% 313,892 -20.49%
3M 2026-07-27 77.9 52.8 47.54% 313,892 43.66%
12M 2026-07-27 77.9 14.3 444.76% 313,892 336.02%

Baseline volumes were 394,771 (30D), 218,491 (3M), and 71,991 (12M). The time series peak for weekly downloads in this pull was 398,226 on 2026-07-06 (score 100.0). Short-term cooling sits on top of a large 12M climb.

Google Search interest for the same keyword tells a colder story. Recent value 11.0 on 2026-08-01 versus baseline 55.0 on 2026-07-04 (-80.0% over 30D), baseline 47.0 on 2026-05-02 (-76.6% over 3M), and baseline 21.0 on 2025-08-02 (-47.62% over 12M). Package installs stay elevated while search interest falls. That split is hard to see if the only client is a Google Search scraper.

For Google Search source docs, see Google Trends. For the broader unofficial-API framing, see Google Trends API alternative.

Minimal call that replaces interest_over_time

The first replacement for a pytrends interest_over_time pull is one POST. Free tier is 100 successful requests per month. Starter is 5,000, Pro is 25,000, Business is 100,000. Only HTTP 200 responses count.

import json
import os
import urllib.request

payload = {
    "mode": "get_growth",
    "source": "google search",
    "keyword": "pytrends",
    "percent_growth": ["30D", "3M", "12M"],
}
req = urllib.request.Request(
    "https://api.trendsapi.ai/api",
    data=json.dumps(payload).encode(),
    headers={
        "Authorization": f"Bearer {os.environ['TRENDSAPI_API_KEY']}",
        "Content-Type": "application/json",
    },
    method="POST",
)
envelope = json.loads(urllib.request.urlopen(req).read().decode())
data = json.loads(envelope["body"])  # body is a JSON string
for row in data["results"]:
    print(row["period"], row["recent_value"], row["growth"], row["direction"])

Live Google Search growth for "pytrends" on 2026-08-07:

Period Recent value Baseline value Growth Direction Data points
30D 11.0 55.0 -80.0% decrease 261
3M 11.0 47.0 -76.6% decrease 261
12M 11.0 21.0 -47.62% decrease 261

The growth metadata reported 3 completed calculations and all_successful: true.

Time series for charts without a Google scrape

get_time_series returns dated points with value on the 0-100 scale. For "pytrends" on google search, the series in this session ran from 2021-08-07 through 2026-08-01. Recent weeks: 55 on 2026-07-04, 43 on 2026-07-11, 26 on 2026-07-18, 19 on 2026-07-25, and 11 on 2026-08-01. The series peaked at 100 on 2026-06-06. Earlier spikes included 89 on 2025-08-16 and 79 on 2026-05-09.

payload = {
    "mode": "get_time_series",
    "source": "google search",
    "keyword": "pytrends",
}
# reuse the same Request helper; parse envelope["body"] again
series = json.loads(envelope["body"])
print(series[-5:])

Use those points for charts, z-scores, or alerts. No browser session and no unofficial cookie jar.

What pytrends cannot cover in one client

pytrends is Google Search only. Product and brand pipelines usually need commerce and video too. Trends API keeps one auth header and swaps the source string.

Example keyword from today's TikTok Shop board: "portable coffee maker" (rank 3 among hot products as of 2026-08-07T08:01:34Z). Live multi-source growth pulled the same day:

Source Period Recent date Recent value Baseline value Growth Recent volume
amazon 30D 2026-07-31 73.5 62.1 18.36% 50,026
amazon 3M 2026-07-31 73.5 57.5 27.83% 50,026
google search 30D 2026-08-01 2.0 3.0 -33.33% n/a
google search 3M 2026-08-01 2.0 78.0 -97.44% n/a
google search 12M 2026-08-01 2.0 1.0 100.0% n/a
youtube 30D 2026-08-01 72.0 66.0 9.09% n/a
youtube 3M 2026-08-01 72.0 100.0 -28.0% n/a
youtube 12M 2026-08-01 72.0 46.0 56.52% n/a
google shopping 14D 2026-08-01 3.0 1.0 200.0% n/a
google shopping 3M 2026-08-01 3.0 52.0 -94.23% n/a

Amazon 30D volume growth was 18.25% (50,026 vs 42,305). Amazon 3M volume growth was 27.74% (50,026 vs 39,162). The amazon 14D preset returned collapsed_range because recent and baseline resolved to the same point across 49 history rows. TikTok returned no_data for this keyword. Google Shopping 30D reported growth from a 0.0 baseline to 3.0; treat that zero-baseline window as a sparse signal, not a stable percent.

Commerce rising while Google Search sits near 2.0 is the kind of split pytrends never surfaces. Source docs for the commerce feed live at Amazon Trends. A full product-research walkthrough for this keyword is in Portable coffee maker product research in Python.

Live boards without a Trends homepage scrape

get_top_trends with type set to Google Trends returns the live board. Pulled 2026-08-07 (as_of 2026-08-07T08:01:34Z), the top 10 were:

  1. perez hilton
  2. spokane fires
  3. abdul el-sayed
  4. idaho shooting
  5. ariana grande
  6. barclays center
  7. chris hansen
  8. wicker movie
  9. samara weaving
  10. cesar gastelum

That mode also covers Amazon Best Sellers, TikTok Shop Hot Products, YouTube Trending, and other boards under the same auth path. For SerpApi-style search API comparisons, see SerpApi trends alternative.

Migration checklist from pytrends

  1. Replace TrendReq session setup with an Authorization: Bearer header.
  2. Map interest_over_time to get_time_series with source: "google search".
  3. Map period comparisons to get_growth with presets such as 30D, 3M, and 12M.
  4. Parse body a second time on every response.
  5. Add Amazon, YouTube, or PyPI sources only when the keyword has data; record no_data and collapsed_range as findings.
  6. Cap retries so free-tier 100/month and paid tiers (5,000 / 25,000 / 100,000) stay predictable.

Trends API is the pytrends alternative when the goal is a stable JSON contract, multi-source coverage, and cron-safe Google Search scores without unofficial scraping.