GitHub Actions workflows that post trend reports from REST

CI can call the same POST JSON contract as MCP clients, which turns weekly growth checks into pull request comments or Slack-ready artifacts. Secrets stay in GitHub, responses stay structured, and reviewers see the exact windows that produced a number.

What a scheduled diff is good at inside a repo

Product and growth teams already watch issues and releases in GitHub. A workflow that writes a small JSON or Markdown artifact keeps discussion close to the code that ships. Trends MCP returns stable fields for get_growth, which is easier to gate with simple thresholds than free-form summaries.

Minimal request shapes that work on ubuntu-latest

Call POST https://api.trendsmcp.ai/api with Authorization: Bearer ${{ secrets.TRENDS_MCP_TOKEN }} and a JSON body for get_growth on the sources the team trusts for that product, such as google search, youtube, amazon, or npm. Keep one keyword per request so failures are isolated. The headless trends API page explains why teams reach for REST in CI first.

How to keep comments readable for humans

Print the baseline and recent dates returned by the API, list the percent_growth labels requested, and attach a link to the workflow run. When a feed snapshot is useful, add a second job step that calls get_top_trends with a conservative limit. For JavaScript services that reuse the same contract outside Actions, see JavaScript trends API.

Failure modes worth scripting explicitly

Empty upstream series, temporary data gaps, and rate limits should become structured workflow outputs rather than silent skips. Retry policies belong around the HTTP client, not around business logic that interprets growth.

Next step

Create a token on trendsmcp.ai, add it as a secret, and copy field names from the API reference before turning on a schedule.

Common questions

Actions are a headless environment, so REST POST requests are the common pattern. MCP remains ideal for editor copilots. Both share the same operations and bearer token model described in the docs.
Deduplicate keywords, batch percent_growth windows inside a single get_growth call, and skip redundant pulls when a cache file in the workspace is fresh enough for the team policy.
Use an encrypted repository or organization secret. Never print the token in logs, and avoid passing it to forks on pull_request from untrusted contributors.
Get GitHub Actions workflows that post trend reports from REST in 30 seconds
Free tier includes 100 requests per month. No credit card required. Works with Claude, Cursor, ChatGPT, Raycast, and every MCP client.
Get your free API key