Developers search for JSON trend endpoints that fit cron jobs, CI checks, and autonomous agents without maintaining scrapers or source-specific SDKs. Trends MCP exposes POST https://api.trendsmcp.ai/api with get_trends, get_growth, and top feeds so the same contract powers MCP clients and bare HTTP callers.
Headless means no dashboard required. Callers send JSON bodies, read JSON responses, and store or forward results. That pattern matches how engineers evaluate search APIs for AI agents in 2026 benchmarks: structured output, stable fields, and predictable error codes matter more than a pretty chart UI.
All operations post to the same URL. Bodies select the mode implicitly through fields: include source and keyword without percent_growth for series, add percent_growth for growth, or set mode to top_trends for live lists. Optional data_mode on REST can request daily versus weekly for Google sources when the pipeline supports it; omit when calling through MCP tools.
Zapier and n8n pages already describe no-code wiring. This page speaks to code-first owners who still want the identical backend. A GitHub Action can curl the API nightly, fail the job on 401, and attach the JSON artifact to the run. A LangChain tool wrapper can map user intent to the three operations without forking client code per data source.
Golden tests should assert schema, not volatile values. Prefer checking that dates monotonically increase and that growth results include direction strings. Alert when error rates for data_unavailable climb above a baseline, which often signals upstream maintenance rather than bad keywords.
Tools for this workflow
get_trendsFetch weekly history for a keyword from a single source inside a Python or Node script, then push results to BigQuery or DuckDB.
get_trends(keyword='langchain', source='npm')
get_growthCompute preset windows such as 30D, 3M, and YTD in one call for OKR dashboards or regression tests on data freshness.
get_growth(keyword='langchain', source='npm', percent_growth=['30D', '3M', 'YTD'])
get_top_trendsSnapshot Reddit Hot Posts or App Store Top Free on a schedule for anomaly alerts without parsing HTML.
get_top_trends(type='Reddit Hot Posts', limit=50)
FAQ