Compare more than 5 keywords in Google Trends (pytrends alternative)
Google Trends compares at most 5 keywords at a time, and every request rescales its own top value to 100. Split 12 keywords into batches of 5 and the numbers from different batches can't be compared. On top of that, pytrends is archived and Google answers scripts with HTTP 429.
In Colab? Colab is where pytrends fails most (Google Cloud IPs get 429 on the first request). The notebook runs the same comparison, shows a ranking and a chart, and downloads a CSV.
google-trends-compare gets interest over time for any number of keywords on one shared 0-100 scale, as a CSV or a Python dict. It calls a hosted Google Trends scraper on Apify, so there is no rate limiting, cookie handling or proxy setup on your side.
pip install google-trends-compare
export APIFY_TOKEN=... # free account at https://apify.com (Settings > API & Integrations)
# Windows PowerShell: $env:APIFY_TOKEN = "..."
google-trends-compare sneakers "running shoes" "trail running shoes" "barefoot shoes" \
"wide toe box shoes" "minimalist shoes" "walking shoes" "hiking boots" "waterproof shoes" \
"cross training shoes" "carbon plate running shoes" "zero drop shoes" --geo US
Output (trends.csv, real data, US, last 12 months):
| date | sneakers | hiking boots | walking shoes | barefoot shoes | zero drop shoes |
|---|---|---|---|---|---|
| 2025-11-02 | 24 | 1.78 | 2.3 | 0.92 | 0.21 |
| 2025-11-09 | 25 | 1.88 | 2.3 | 0.92 | 0.21 |
| 2025-11-16 | 28 | 2.3 | 2.3 | 0.92 | 0.21 |
All columns share one scale: averaged over the year, "sneakers" (35.4) is about 160 times "zero drop shoes" (0.22). Fetched in separate batches of 5, those two numbers would come from different scales and could not be compared.
Options: --geo (country code, empty = worldwide), --time (today 5-y, now 7-d, 2024-01-01 2024-12-31, ...), --out (CSV path). Or pass --url with a trends.google.com explore link instead of keywords: google-trends-compare --url "https://trends.google.com/trends/explore?q=pickleball,padel&geo=US".
From Python (pandas is optional):
import pandas as pd
from google_trends_compare import compare
df = pd.DataFrame(compare(["pickleball", "padel", "tennis", "squash", "badminton", "golf"], geo="US"))
compare(trends_url=...) takes a trends.google.com link the same way. compare() returns {keyword: {date: value}}, so pd.DataFrame gives one column per keyword and one row per date. Keywords with no data are left out.
Cost
The scraper charges per result: one keyword's time series is one result, $0.005 or less. 50 keywords cost about $0.25. Keywords Google has no data for are not charged. Apify's free plan includes monthly credit that covers small runs.
Why not pytrends?
pytrends was archived on GitHub in 2025. Google rate-limits Trends per IP, and datacenter and cloud IPs (Colab, AWS, CI) often get 429 on the first request. If you want to keep doing it yourself: a few seconds between requests, a fresh session after each 429, exponential backoff, and residential IPs for volume.
Disclosure
I built and maintain the scraper this calls: granola2/google-trends-scraper. It also returns related queries, interest by region and trending searches. This script is MIT licensed.
Metadata
Release files for google-trends-compare 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| google_trends_compare-0.1.1.tar.gz | 5.3 kB | Without provenance | Details for google_trends_compare-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| google_trends_compare-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for google_trends_compare-0.1.1-py3-none-any.whl |
Total release size: 11.2 kB
Release files / google_trends_compare-0.1.1.tar.gz
| Download URL | google_trends_compare-0.1.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3ad0d9fdfe289e0e5ac1f22ef0dde712dbd42a168b4ba50cb5393d020509e2b
|
|
BLAKE2b-256 checksum How to use checksums |
3cc5c3b08b2a86d074001284a1a8986eefd837975421b0042b2e2856f8870c34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / google_trends_compare-0.1.1-py3-none-any.whl
| Download URL | google_trends_compare-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5299e2d098e8677312788be769194c332bc7b30a51fc45f138fd7900ded0a8a4
|
|
BLAKE2b-256 checksum How to use checksums |
5e65d57746e9fad69b42ecf35e63b00ec4acfb13606cc03d8a01276d3fe4cd51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for google-trends-compare 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.