trendspy (import from trendspy import Trends) is a MIT-licensed unofficial Google Trends client. The GitHub repo is sdil87/trendspy. The latest wheel checked in this run is 0.1.6 (25 December 2024). The README lists interest over time, region, related queries, related topics, trending now, RSS, and a batch timeline for many keywords. It also says the library is not affiliated with Google. Trends API is not that import. POST https://api.trendsapi.ai/api. body is a JSON string and must be parsed a second time. Docs: the API reference. Caps: pricing.

pip install trendspy, not trendspyg

A requirements line that says trendspy and a blog that says trendspyg are two codebases. This comparison is Trends(). The other package has a different public API and a different release cadence. Mixing README snippets will fail at import time.

Trends() still hits Google

from trendspy import Trends
tr = Trends()
df = tr.interest_over_time(["python", "javascript"])

Optional proxy= is a requests proxy. That is a scrape session. When Google changes a handshake, this class has to ship a new wheel. Trends API absorbs that on the server side.

Timeframe strings stay Google explore syntax

now 123-H, today 45-d, and paired ranges are documented on the library. They are not percent_growth values. get_growth wants 7D, 14D, 1M, 3M, 12M, YTD, and the other listed presets. Translating one into the other in a shared config file is a bug.

Hosted JSON versus a local library

Keep trendspy when the notebook must stay dependency-only, needs related queries, or needs trending_now_showcase_timeline for hundreds of independently scaled keywords. Move to POST /api when the runtime cannot hold a Google session, when source must be tiktok, or when the next consumer is the product MCP server at https://api.trendsapi.ai/mcp.