A package to receive full-range daily Google Trends data
Project description
DailyTrends 6.0
A lightweight API to get full-range daily Google Trends data. Solves the problem of getting only monthly-based data for large time series. No login required.
Installation
pip install DailyTrends
Or with uv:
uv add DailyTrends
Quick Start
from DailyTrends import collect_data
data = collect_data("AMD stock", start="2004-01-01", end="2024-07-06",
geo="", save=False, verbose=False)
data.info()
# <class 'pandas.core.frame.DataFrame'>
# DatetimeIndex: 7493 entries, 2004-01-01 to 2024-07-06
# Freq: D
# ...
- The returned DataFrame is datetime-indexed and ready for storage/analysis.
enddefaults to"TODAY".startdefaults to"2004-01-01".geodefaults to""(worldwide). Use country codes like"US","DE".
Plotting
ax = data.rolling(10).mean().plot()
data.rolling(25).mean().plot(ax=ax)
data.rolling(50).mean().plot(ax=ax)
Multiple Queries
data = collect_data(["Intel", "AMD"], start="2004-01-01", end="TODAY",
geo="DE", save=False, verbose=False)
Combine with Your Own Data
import pandas as pd
price_data = pd.read_csv("price_data.csv")
merged = pd.merge(price_data, data, left_index=True, right_index=True)
merged[["AMD stock: (Worldwide)", "Open"]].rolling(30).mean().plot()
Development
This project uses uv for dependency management.
# Clone and set up
git clone https://github.com/le0x99/DailyTrends.git
cd DailyTrends
uv sync
# Run tests
uv run pytest -v
# Run linter
uv run ruff check .
# Build the package
uv build
Disclaimer
This API is not supported by Google and is for experimental purposes only.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dailytrends-6.0.0.tar.gz.
File metadata
- Download URL: dailytrends-6.0.0.tar.gz
- Upload date:
- Size: 754.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d106cd973eb0bb6ce2b30dc636cda785f2316e0614874f805b948ed66c25a94d
|
|
| MD5 |
842a14f402030e6ae0e106225ec744d0
|
|
| BLAKE2b-256 |
72ab9d38f6135a720f48f6ca91dece0efb64617267424331a2ff117df33a2eae
|
File details
Details for the file dailytrends-6.0.0-py3-none-any.whl.
File metadata
- Download URL: dailytrends-6.0.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e93a8249d81a75780329d025b74a52881ac37279069df869316de88380e150ef
|
|
| MD5 |
760d2658595c8b7157bfbecd084ccc0e
|
|
| BLAKE2b-256 |
7fedb5f13625e552bed7d680c67d88ccfc90e715b24279eb7858abb32f6c7ec3
|