Grafana has no native Google Trends or TikTok connector. A JSON API datasource pointed at Trends MCP turns weekly search interest, growth percentages, and live leaderboard polls into time-series panels without scraping or per-platform API keys.
Operations teams already run Grafana for infrastructure metrics. Product and growth teams want the same wallboard for search demand, but Grafana's plugin catalog stops at Prometheus, InfluxDB, and cloud vendor metrics. Wiring trend data in means either a custom exporter or a REST datasource that returns time-indexed JSON.
Trends MCP exposes keyword time series, growth calculations, and live trending leaderboards through POST https://api.trendsmcp.ai/api. One Bearer token covers Google Search, TikTok, Reddit, Amazon, and the live feed catalog. This page walks through datasource setup, three panel types, and refresh intervals that stay inside monthly quotas.
For a platform-agnostic dashboard design primer, see how to build a trends dashboard. For a no-code alternative in spreadsheets, see Google Sheets trend dashboard.
| Item | Detail |
|---|---|
| Grafana instance | Grafana Cloud or self-hosted 9.x+ |
| Datasource plugin | JSON API (marcusolsson-json-datasource) or Infinity |
| Trends MCP API key | Free tier at 100 requests/month from trendsmcp.ai/account |
| Network egress | Grafana must reach api.trendsmcp.ai over HTTPS |
Store the API key in Grafana's secret management or an environment variable referenced in the datasource config. Do not embed keys in dashboard JSON exported to public repos.
Create a new datasource with these settings:
| Field | Value |
|---|---|
| Name | TrendsMCP |
| URL | https://api.trendsmcp.ai/api |
| Access | Server (Grafana backend proxies the request) |
| Method | POST |
| HTTP Headers | Authorization: Bearer <API_KEY> |
| Content-Type | application/json |
The datasource sends a static JSON body per query. Grafana's JSON API plugin maps response fields to time series using a JSONPath or field override.
{
"mode": "get_time_series",
"source": "google search",
"keyword": "grafana"
}
Response shape (abbreviated):
[
{"date": "2026-07-14", "value": 42, "volume": 125000, "keyword": "grafana", "source": "google search"},
{"date": "2026-07-21", "value": 45, "volume": 132000, "keyword": "grafana", "source": "google search"}
]
In the JSON API query editor, set the root path to $[*] and map date to the time field and value to the metric. Enable "Convert to time series" if the plugin offers it. The normalized 0-100 value field plots cleanly; volume adds absolute search counts where the pipeline provides them.
Add a Time series panel sourced from the TrendsMCP datasource.
| Panel setting | Recommendation |
|---|---|
| Title | Google Search interest: [keyword] |
| Query body source | google search |
| Legend | {{keyword}} or static label |
| Unit | short (0-100 scale) |
| Refresh | 24h or 7d (weekly data points) |
Duplicate the panel for competitor keywords by cloning the query and changing the keyword field. Each clone costs one API request per refresh cycle.
Swap source to youtube, tiktok, or reddit for platform-specific panels. Reddit expects subreddit names without the r/ prefix.
Growth panels call get_growth and display percentage change as stat or gauge visuals.
Query body:
{
"mode": "get_growth",
"source": "google search",
"keyword": "observability",
"percent_growth": ["3M", "12M", "YTD"]
}
Response includes a results array with period, growth, and direction fields. Configure three stat panels or one table panel:
| Period field | Display |
|---|---|
3M | 3-month growth % |
12M | 12-month growth % |
YTD | Year-to-date growth % |
Set thresholds on the stat panel: green below 0% decline, yellow for flat (-5% to +5%), red for sharp drops. Growth direction comes from the API; no manual calculation is needed in Grafana transforms.
Leaderboard panels poll get_top_trends for feeds that do not require a keyword.
Query body:
{
"mode": "get_top_trends",
"type": "Google Trends",
"limit": 15
}
Response format:
{
"as_of_ts": "2026-07-22T06:00:00Z",
"type": "Google Trends",
"count": 15,
"data": [[1, "topic one"], [2, "topic two"], [3, "topic three"]]
}
Map data[*][0] to a Rank column and data[*][1] to a Topic column in a Table panel. Set dashboard refresh to 30m or 1h. Feed type strings are case-sensitive: Google Trends, X (Twitter), TikTok Trending Hashtags, Reddit Hot Posts.
A practical three-row layout covers discovery, history, and momentum:
| Row | Panel type | Data mode | Refresh |
|---|---|---|---|
| Top | Table | get_top_trends (Google Trends) | 30m |
| Middle | Time series × 3 | get_time_series (google search, youtube, tiktok) | 24h |
| Bottom | Stat × 3 | get_growth (12M per keyword) | 24h |
Total requests per full refresh: 1 (leaderboard) + 3 (time series) + 3 (growth) = 7. At one refresh per day, that is ~210 requests per month, above the free tier. Reduce to two keywords or refresh every 48 hours to stay near 100 requests.
| Dashboard shape | Requests per refresh | Daily refresh | Monthly total |
|---|---|---|---|
| 1 keyword time series | 1 | 1 | ~30 |
| 3 keywords + 1 leaderboard | 4 | 1 | ~120 |
| 5 keywords + growth + leaderboard | 11 | 1 | ~330 |
Teams above the free tier upgrade to Starter or Pro plans at trendsmcp.ai/pricing. Cache responses in Grafana's query cache or an intermediate Redis layer if multiple viewers hit the same dashboard.
Grafana alert rules can fire when a growth stat crosses a threshold or when a new topic enters the leaderboard table. Two patterns work well:
12M growth drops below -20%. Evaluation interval 24h matches weekly data cadence.data against a Grafana constant or secondary query stored in a text panel. Simpler teams export leaderboard snapshots to webhook trend pipelines and let an external service handle diff logic.Grafana cannot call MCP tool prompts directly. All panels use the REST API with explicit mode fields. For Python-based ETL before Grafana ingestion, see Python trends API.
Weekly time series panels show step changes on refresh day, not intra-week spikes. Live feeds reflect the current leaderboard at poll time; Grafana does not stream updates. Geographic filtering available in some Google Trends interfaces is not exposed on every Trends MCP source today. Panels should label the source and as_of_ts fields so viewers know which platform and timestamp the data represents.
FAQ