Repository navigation
1.8.0 - Choose the right topic before analysis
Choose the intended meaning of a word before analyzing its search interest.
1.8.0 adds Google Trends topic lookup to Python, the CLI and MCP. For example, a lookup for apple distinguishes the fruit from the technology company. Select the candidate you intend, then use its topic ID with the existing interest/comparison functions.
- Python:
get_keyword_suggestions("apple")returns{mid, title, type}candidates, with optional label language, a one-hour process-local cache and finite HTTP waits. No Chrome, new dependencies, cookies or disk writes for lookup. - CLI:
trendspyg suggest -k appleprints pipe-safe JSON. - MCP: ninth tool
suggest_keywords; results include IDs and labels for explicit selection. - HTTP 403/429 raises
RateLimitErrorimmediately. Network/parse failures are distinct from a valid empty result; no retry loop.
Suggestions are not a popularity ranking, an exhaustive catalog or Related Topics. Empty suggestions do not establish zero interest. Analyzing a selected topic still uses Chrome and is rate-limit sensitive; retain the selected ID-to-label mapping with your results.
Compatibility: the original 47 exports and all existing parameter names/defaults, CLI options and MCP tools remain available. Two root additions bring the total to 49. No existing schema changes in 1.8.0; text keywords are never converted to topics automatically. See upgrade notes for the intentional filtering, freshness, schema and timeout corrections from 1.7.0.
Validation: 767 offline tests pass with 98.21% coverage; all 18 module coverage floors pass. All 22 GitHub checks pass, including Python 3.8–3.13 on Linux, macOS and Windows. MCP tests pass on SDK 1 and SDK 2, as do lint, type, strict documentation, build and package checks. Installed 1.6.0/1.7.0/1.8.0 comparisons preserve old signatures and representative default data outputs. Live installed-package checks cover lookup, topic comparison, caching, CLI, RSS/history and MCP.
Upgrade: pip install --upgrade "trendspyg[all]"