Skip to main content

pytrends-ladder

Compare up to 100 Google Trends keywords on one scale. A pytrends alternative with a drop-in TrendReq.

Google Trends compares only 5 terms at a time, and rounds to whole numbers, so small keywords next to big ones show up as 0. pytrends was archived in April 2025. This package keeps the familiar TrendReq interface, but:

  • accepts up to 100 keywords and returns them on one 0–100 scale;
  • keeps 4 decimals, so small keywords never round to 0;
  • runs on Apify, which handles proxies and Google's rate limits (no more HTTP 429).
pip install pytrends-ladder

Switch from pytrends in one line

# from pytrends.request import TrendReq
from pytrends_ladder import TrendReq

pytrends = TrendReq(apify_token="YOUR_APIFY_TOKEN")      # or set APIFY_TOKEN
pytrends.build_payload(["python", "javascript", "java", "typescript", "golang", "kotlin", "haskell"],
                       timeframe="today 12-m", geo="US")   # 7 keywords: more than pytrends' 5
df = pytrends.interest_over_time()                       # dates x keywords + isPartial, one scale

interest_over_time() is supported. Other pytrends methods (related_queries, interest_by_region, …) raise NotImplementedError.

Or use the direct API

from pytrends_ladder import Trends

trends = Trends()   # reads APIFY_TOKEN

# Keywords on one scale. Use brackets for one meaning, or Label=TopicID for an exact Google topic
df = trends.compare(["pytorch", "tensorflow", "Python (programming language)", "ChatGPT=/g/11khcfz0y2"])

# Share of search: each brand's % of all the brands' searches, per month, quarter or year
shares = trends.share_of_search(["Samsung", "Vivo", "Apple", "Realme", "Oppo", "Xiaomi"],
                                geo="BD", timeframe="today 5-y", period="quarter")

# Raw results with rank, average interest and a precision label for every keyword
items = trends.compare_items(["weather", "python", "ocaml"])

How accurate is it?

Keywords are sorted by size and compared in linked batches of similar size (a "ladder"). The batches are chained through shared keywords, so even tiny keywords stay measurable.

On real Google data, 12 keywords from "weather" down to "ocaml" (about 5,500x apart):

  • no keyword lost;
  • neighbouring ratios within 0.5% (median) and 2.2% (worst) of Google's own direct comparisons;
  • the same input run twice differed by at most 1.1%.

In the same test, tools that round to whole numbers lost 6 of the 12 keywords.

Getting a token, and cost

  1. Create a free account at apify.com.
  2. Copy your API token from Settings → API & Integrations.

Each call runs an Apify Actor and costs $0.002 per keyword (or $0.01 per brand for share of search), with no start fee. So 100 keywords cost about $0.20. Apify's free plan includes monthly credit to try it.

Limits

  • Plain words count every meaning: "go" counts the English word, not the language. Use golang, a bracket hint like Python (programming language), or a topic ID.
  • Values are relative interest (0–100), not search counts. That's what Google Trends provides.
  • Up to 100 keywords per call.
  • Google serves slightly different samples. Expect around 1% variation between runs.

License

MIT

Metadata

Release files for pytrends-ladder 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytrends-ladder 0.1.1
File Size Uploaded Provenance Actions
pytrends_ladder-0.1.1.tar.gz 6.3 kB Without provenance Details for pytrends_ladder-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytrends-ladder 0.1.1
File Interpreter ABI Platform Actions
pytrends_ladder-0.1.1-py3-none-any.whl Python 3 none any Details for pytrends_ladder-0.1.1-py3-none-any.whl

Total release size: 12.9 kB

Release files / pytrends_ladder-0.1.1.tar.gz

Download URL pytrends_ladder-0.1.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ef669f328ce06f95019d5c5f40dbb43fcf0e18609c7423f8e9dcd7f872604598
BLAKE2b-256 checksum
How to use checksums
5fd06c69d9cd37a36a7306117b1ea5fdbf4c846a249e156bdacdbcd3258348c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pytrends_ladder-0.1.1-py3-none-any.whl

Download URL pytrends_ladder-0.1.1-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3c3f460445af1fa8716b494c5c3ef84df2f663b2dc5b4ebac112663c45daddf
BLAKE2b-256 checksum
How to use checksums
412528294c482ee492cb8f7503de9eb24ef562b02cf35503a2ddc77dfe0cec20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for pytrends-ladder 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page