get_trends
Retrieve search interest over time for keywords using Google Trends data. Specify keyword, region, and timeframe to analyze trends for informed decisions.
Instructions
Pull search interest over time for keywords.
timeframe accepts the ranges supported by TrendsPy, including today 12-m, today 5-y, all, custom relative windows such as today 90-d, and YYYY-MM-DD YYYY-MM-DD. When it is omitted, the legacy
data_mode defaults are retained for backwards compatibility.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cat | No | Google Trends category ID; use 0 for all categories or a value from get_categories. | |
| geo | No | Geographic region code (e.g. 'US'). | US |
| source | No | Search source: 'google search', 'youtube search', 'news search', 'image search', 'google shopping'. | google search |
| keyword | Yes | Search keyword(s) to analyze. | |
| data_mode | No | Legacy resolution hint used only when timeframe is omitted: 'weekly', 'daily', 'monthly'. | weekly |
| timeframe | No | Explicit TrendsPy range, for example 'today 12-m', 'today 90-d', 'all', or 'YYYY-MM-DD YYYY-MM-DD'. Overrides data_mode when supplied. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |