google_trends
Simple Google Trends API
Install
pip install -U google_trends
Usage:
Warning: gtrends renamed to daily_trends
from google_trends import daily_trends, realtime_trends
1. Google daily search trends
daily_trends(date=None, country='US', language='en-US', timezone='-180')
''' Google daily search trends
date = YYYYMMDD (example: 20210810) - trends on a given date, interval: today - 30 days ago;
country = 'US', 'RU', etc.;
language = 'en-US', 'ru-RU', etc.;
timezone = timezone offset, example: GMT-7 == -7*60 = '-420'.
'''
# trends today
today_trends = daily_trends(country='GB')
print(today_trends)
#trends on a given date, interval: today - 30 days ago.
date_trends = daily_trends(20210810)
print(date_trends)
2. Google realtime search trends
Attention! Google realtime trends are not available for all regions. The list of available countries can be viewed on the website: https://trends.google.com/trends/trendingsearches/realtime.
realtime_trends(country='US', language='en-US', category='all', num_results=20, timezone='-180')
''' Google realtime search trends
country = 'US', 'RU', etc.;
category = 'all' (all), 'b' (business), 'e' (entertainment),
'm' (health), 's' (sports), 't' (sci/tech), 'h' (top stories);
language = 'en-US', 'ru-RU', etc.;
num_results = how many results to return, max num_results = 200;
timezone = timezone offset, example: GMT-7 == -7*60 = '-420'.
'''
real_trends = realtime_trends(country='DE', category='t', language='en-UK', num_results=2)
print(real_trends)
[
{'title': 'Sony, Funimation, PlayStation Network, Anime, Aniplex',
'entity_names': ['Sony', 'Funimation', 'PlayStation Network', 'Anime', 'Aniplex'],
'article_urls': ['https://www.gamepro.de/artikel/sony-crunchyroll-ps-plus-premium-abo,3372448.html', 'https://www.play3.de/2021/08/11/playstation-plus-premium-variante-mit-crunchyroll/', 'https://www.pcgames.de/PlayStation-Plus-Thema-260472/News/geruechte-um-premium-abo-mit-anime-inhalten-1377545/', 'https://stadt-bremerhaven.de/crunchyroll-uebernahme-durch-sony-abgeschlossen/', 'https://playfront.de/playstation-plus-premium-arbeitet-sony-an-einem-neuen-abo/', 'https://www.netzwelt.de/news/192097-milliardendeal-sony-uebernimmt-crunchyroll-bald-nur-noch-ultimativer-anime-streamingdienst.html', 'https://www.pattotv.de/animenews/sonys-funimation-global-group-schliesst-uebernahme-von-crunchyroll-ab/', 'https://shonakid.de/milliardendeal-sony-schliesst-ubernahme-von-crunchyroll-ab-und-jetzt-63014/', 'https://www.playcentral.de/anime-anbieter-crunchyroll-funimation-fusionieren/', 'https://game7.de/playstation-network/news/premium-version-plus-geplant-kkm/']},
{'title': 'Diablo II, Blizzard Entertainment, Xbox One',
'entity_names': ['Diablo II', 'Blizzard Entertainment', 'Xbox One'],
'article_urls': ['https://www.giga.de/news/diablo-2-resurrected-blizzard-laesst-euch-kostenlos-reinschnuppern-so-gehts/', 'https://www.heise.de/news/Diablo-2-Resurrected-Offene-Beta-beginnt-am-20-August-6160795.html', 'https://www.tz.de/leben/games/diablo-resurrected-2-beta-starttermin-fuer-early-access-steht-fest-blizzard-games-zr-90914078.html', 'https://www.golem.de/news/resurrected-alte-savegames-muessen-bei-beta-von-diablo-2-noch-warten-2108-158820.html', 'https://www.netzwelt.de/news/192079-diablo-2-resurrected-blizzard-kuendigt-beta-start-pc-konsolen.html', 'https://www.gamepro.de/artikel/diablo-2-resurrected-starttermin-beta-offiziell,3372455.html', 'https://www.spieletipps.de/n_49329/', 'https://winfuture.de/news,124553.html', 'https://www.eurogamer.de/articles/2021-08-11-diablo-2-resurrected-offizielle-startzeiten-der-beta-bestaetigt', 'https://www.pcgameshardware.de/Diablo-2-Resurrected-Spiel-73212/News/Open-Beta-Starttermin-bekannt-gegeben-1377542/']},
]
Metadata
Release files for google-trends 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-1.1.tar.gz | 5.1 kB | Without provenance | Details for google_trends-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| google_trends-1.1-py3-none-any.whl | Python 3 | none | any | Details for google_trends-1.1-py3-none-any.whl |
Total release size: 10.6 kB
Release files / google_trends-1.1.tar.gz
| Download URL | google_trends-1.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0dc9884534307fc26c92a058bf635ac8e33c0ba64af948d874a36ccc400dfda
|
|
BLAKE2b-256 checksum How to use checksums |
df4d9f28fd25fc6695b741222cba4a89c83f2b168a5fc7aaf68913a623964d8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / google_trends-1.1-py3-none-any.whl
| Download URL | google_trends-1.1-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5b6f4c8d465f0f953b87c3bf76d1472792bf09775f3e9463d7a9b2c0c7d647a
|
|
BLAKE2b-256 checksum How to use checksums |
cd837aae03bfaeab1abf77d2c1d92f74e949cf79ad49b39f966171840268cd99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Security for google-trends 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.