skillfed

pytrends

Pseudo API for Google Trends

pytrends v4.9.2 1.6M downloads/30d#3,737 on PyPI3,731
Permissive license Apache 2.0 Abandoned released

What it is and what it does

pytrends is an unofficial wrapper around Google Trends that automates downloading trend reports without requiring manual interaction with the web interface. It uses requests, pandas, and lxml to fetch and parse data on keyword search interest, geographic distribution, related searches, and trending topics. The package supports configurable parameters like time ranges, geographic regions, categories, and Google properties (web, images, news, YouTube, shopping).

The library is designed for developers who need programmatic access to Google Trends data for research, monitoring, or analysis. It handles connection details like proxies, retries, and backoff strategies to work around Google's rate limiting. However, because it reverse-engineers an unofficial API, it is inherently fragile—any backend changes by Google can break functionality, and the package has been abandoned since April 2023 with no active maintenance.

Use it for:

  • Track keyword search volume trends over time for SEO research or market analysis
  • Compare search interest across multiple geographic regions to identify regional demand patterns
  • Monitor trending searches in real time or retrieve historical trending data for news/content planning
  • Discover related topics and queries to a keyword for content ideation or competitive analysis
  • Automate bulk trend data collection for academic research or business intelligence dashboards

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides an unofficial interface to download and analyze Google Trends data, including search interest over time, regional breakdowns, related topics, and trending searches.

No—not recommended for new projects. While the package is permissively licensed and has low install friction, it is abandoned (last release April 2023, repository archived) with no active maintenance. Google's backend changes will break the unofficial API without fixes. Use only if you have an existing codebase already depending on it and can tolerate potential breakage; for new work, seek an officially supported alternative or Google's official APIs.

Install

pytrends on PyPI

pip

pip install pytrends

uv

uv add pytrends

poetry

poetry add pytrends

Installing pytrends

Before you install

Low install friction with common dependencies (requests, pandas, lxml). However, the package is abandoned as of 2023-04-13 and the repository is archived; maintenance has ceased and Google API changes will break functionality without fixes.

License in practice

Licensed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions.

Quickstart

from pytrends.request import TrendReq

pytrends = TrendReq(hl='en-US', tz=360)
pytrends.build_payload(['Blockchain'], cat=0, timeframe='today 5-y')
df = pytrends.interest_over_time()

Requires Python 3.7 or later; Google may have changed their backend since the last release, potentially breaking API calls.

Verify before relying

  • Whether Google has changed their backend since the last release, potentially breaking the unofficial API
  • Current reliability and success rate of API calls against Google's actual endpoints
  • Whether proxy and retry logic still effectively circumvent rate limiting

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 3 — requests, pandas, lxml
Maintenance abandoned — 1,219 days since the last release
Last repo commit (repository archived)
First released
Downloads 1,587,165/month — #3,737 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytrends-4.9.2-py3-none-any.whl

Keywords: google, trends, api, search

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

google trends data downloadsearch trend analysis apigoogle trends scrapingkeyword popularity trackingtrend data extractionsearch interest over timeregional search trends
abandonedweb-scrapinggoogle-trends

More WWW/HTTP packages