FOR AI AGENT DEVELOPERS
TrendsFast for AI agent developers: market data your agent can cite
Give an AI agent source-backed market data: typed JSON with links, dates, coverage and limits, one REST call or MCP tool per question, credit ceilings, idempotent request IDs and free rereads.
ANSWER FIRST
The short answer
Give your agent one tool for market questions and it gets typed JSON it can cite: every trend with its original link, the time it was observed, the values measured, the coverage of the read and what it could not see. REST and MCP call the same service on the same credits. Each call carries a credit ceiling and a request ID you store first, so a retry never charges twice and a lost response is recovered for free.
Who this is for
You build an agent, an assistant or a product feature that has to answer “what is happening in this market” and show its working. Scraping five platforms, ranking what you get and keeping the provenance attached is a product of its own. TrendsFast is that layer, behind one REST resource and one MCP tool.
What the contract gives your agent
- Typed, versioned JSON. Responses are
trends-api-v3envelopes aroundtrend-intelligence-v3data, described by an OpenAPI 3.1 document at /v3/openapi.json. - Provenance on every item.
entity.original_url,current_observation.published_atandobserved_at, the measured metrics, asignalwith itssignal_basis, andlimitations. A channel the read could not see is listed incoverageas unavailable, never returned as an empty list. - Guidance an agent can follow. Each item says what it is evidence of (
guidance.evidence_class), what it is good for and what it does not establish;data.briefgroups the items and lists next steps. - Honest negatives.
INSUFFICIENT_EVIDENCEis a result, not an error. Growth is only claimed from two comparable readings; one big number is popularity. An empty result costs nothing. - Spend you can bound. Every query names
max_credits; a quote above it is refused with 402 before anything runs. A product call costs its own price, Trending 25 credits, and rereading a saved result or the next page costs 0. - Safe retries. Store the
request_idbefore sending. The same ID with the same input returns the saved result instead of a second charge; with different input it is a 409;GET /v3/trends/requests/{request_id}recovers a response the network lost.
The same product call from TypeScript, Python and MCP
Trending returns posts, videos and searches gaining attention in the brand’s niche, then the niches next to it. The calls below read the confirmed brand context, then call the product with its own price as the ceiling. There is no SDK to install: it is plain HTTPS.
// Node.js 22+, server-side only. The key never goes into a browser bundle or a prompt.
const key = process.env.TRENDSFAST_API_KEY;
if (!key) throw new Error("Set TRENDSFAST_API_KEY");
const headers = { authorization: `Bearer ${key}`, "content-type": "application/json" };
const { context } = await (await fetch("https://trendsfast.com/v3/trends/context", { headers })).json();
if (!context) throw new Error("Confirm your brand context in the dashboard first");
// Store this ID before sending. Resending it with the same input never charges twice.
const requestId = crypto.randomUUID();
const response = await fetch("https://trendsfast.com/v3/trends/niche", {
method: "POST",
headers,
body: JSON.stringify({
request_id: requestId,
max_credits: 25,
input: { product: "niche", context_id: context.context_id },
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: read https://trendsfast.com/v3/trends/requests/${requestId}`);
const result = await response.json();
for (const item of result.data.items)
console.log(item.signal, item.ring, item.entity.original_url, item.current_observation.observed_at);
// Free rereads: GET https://trendsfast.com/v3/trends/results/${result.result_id}?cursor=<next_cursor># Python 3.10+, standard library only. Keep the key in the environment.
import json, os, urllib.request, uuid
KEY = os.environ["TRENDSFAST_API_KEY"]
HEADERS = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}
def call(path, body=None):
data = None if body is None else json.dumps(body).encode()
request = urllib.request.Request("https://trendsfast.com/v3/trends" + path, data=data, headers=HEADERS)
with urllib.request.urlopen(request, timeout=60) as response:
return json.load(response)
context = call("/context")["context"]
request_id = str(uuid.uuid4()) # store it first; resending it never charges twice
result = call("/niche", {
"request_id": request_id,
"max_credits": 25,
"input": {"product": "niche", "context_id": context["context_id"]},
})
for item in result["data"]["items"]:
print(item["signal"], item["ring"], item["entity"]["original_url"])Over MCP, connect any client that speaks Streamable HTTP to https://trendsfast.com/api/mcp/v3 with the key as a bearer token. The niche tool takes the same request:
{
"server": "https://trendsfast.com/api/mcp/v3",
"tool": "trendsfast_niche_trends",
"arguments": {
"request_id": "<a UUID your agent stores first>",
"max_credits": 25,
"input": { "product": "niche", "context_id": "<from trendsfast_project_context>" }
}
}The MCP tools
| Tool | Scope | Cost | What it does |
|---|---|---|---|
trendsfast_discover_trends | trends:query | up to 5 credits | One question across global, core and adjacent scope and every channel. |
trendsfast_global_trends | trends:query | up to 1 credit | What is trending across the shared index. No brand context needed. |
trendsfast_niche_trends | trends:query | up to 35 credits | Trends ranked against your niche. Name a product to collect your brand's sources fresh first. |
trendsfast_ask_trends | trends:query | up to 5 credits | One bounded question, answered from saved evidence. |
trendsfast_read_result | trends:read | free | Reread or page through a saved result, or recover a lost response. |
trendsfast_project_context | trends:read | free | The connected brand and its confirmed niche context. |
trendsfast_credit_balance | credits:read | free | The credit balance shared by the dashboard, REST and MCP. |
Limits to design around
- A key belongs to one brand workspace and carries the scopes you choose; it expires 90 days after it is created. Keep it on your server, never in a prompt or a browser bundle.
- Queries are admitted per account: on free credits 2 in flight and 20 an hour, with paid credits 5 and 120. A 429 carries
Retry-After; retry with the same request ID. - A product call collects the brand’s own sources, so it needs a confirmed brand context. Without one, a niche call accepts a temporary niche described in the request.
- The index is young: coverage varies by channel and day, and video is read from metadata and the opening transcript. Every error code and its recovery is in the docs.
When to use something else
If your agent needs raw posts from a platform TrendsFast does not cover, or a specific profile on demand, a raw data API is the better input; the SocialCrawl comparison explains the difference. If it only needs Google search interest, a search data API is cheaper. If it needs short-form video depth, look at a video intelligence platform.
Connect your agent
Start for $0: confirm your brand once, receive free credits and call the products from the dashboard, REST or MCP.