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", "Rust (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
- Create a free account at apify.com.
- Copy your API token from Settings → API & Integrations.
Each call runs an Apify Actor and costs $0.02 per run + $0.002 per keyword, or $0.01 per brand for share of search. So 100 keywords cost about $0.22. 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 likeRust (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.0
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 |
|---|---|---|---|---|
| pytrends_ladder-0.1.0.tar.gz | 6.3 kB | Without provenance | Details for pytrends_ladder-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytrends_ladder-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pytrends_ladder-0.1.0-py3-none-any.whl |
Total release size: 12.9 kB
Release files / pytrends_ladder-0.1.0.tar.gz
| Download URL | pytrends_ladder-0.1.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8afb959dd081899c16e2aead503696779ed672af2f52ec6685f3a4d3f8b068a
|
|
BLAKE2b-256 checksum How to use checksums |
61555d5ca3656562938fb62f81c7fdec18cc70bf9c551d22b0dbead425ffe862
|
| 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.0-py3-none-any.whl
| Download URL | pytrends_ladder-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f32cb229c8ab59e8bb82950b4fb7c5b5bb34ba80053d2bcc7f78dde60af84de2
|
|
BLAKE2b-256 checksum How to use checksums |
4bca469d3a8c331c99e91a34f6f97d49b82b75a13c18c16d4a0eb5937d5b392d
|
| 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.0
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.