REST API

The same data as the MCP server, over plain HTTP. One subscription covers both — usage counts against the same monthly allowance whichever surface you use.

Authentication

Create an API key at your account and send it as a bearer token. Keys are shown once and stored only as a hash, so save it when you create it.

curl https://trendflow.mory.dev/api/v1/interest-over-time \
  -H "Authorization: Bearer tfk_..." \
  -G --data-urlencode "keywords=bitcoin,ethereum" \
     --data-urlencode "timeframe=today 12-m" \
     --data-urlencode "region=US"

GET takes query parameters, POST takes a JSON body. Array parameters such as keywords are comma-separated in a query string.

Endpoints

EndpointParametersReturnsCost
GET /api/v1/topicsqueryResolve a name to a topic id.Free
GET /api/v1/trendingregion, backend, limitWhat is surging now.Free on rss
GET /api/v1/interest-over-timekeywords, timeframe, regionRelative interest for up to 5 terms.1 query
GET /api/v1/interest-by-regionkeyword, resolution, regionWhere a term is searched.1 query
GET /api/v1/related-querieskeywordTop and rising related searches.1 query

GET /api/v1 returns a discovery document listing all of the above.

Responses

Success is { "data": … } with headers describing what it cost you:

X-TrendFlow-Cachehit, miss, or stale — stale means Google rate-limited us and you got a slightly older answer rather than an error.
X-TrendFlow-CostQueries deducted from your allowance. Zero for the free endpoints.
X-TrendFlow-RemainingQueries left this month.

Errors

400Invalid parameters — the response lists exactly which.
401No usable API key on a paid endpoint.
402Monthly allowance spent. Resets on the 1st.
429Google is rate-limiting upstream. Retry with backoff.

Reading the numbers

Every figure is normalized relative interest, scaled 0–100 within a single result set — never absolute search volume. Results from separate queries are not comparable to each other.

Docs · MCP server