API access
Programmatic access to Trendmill through MCP, with OAuth or an API key.
Trendmill's API is its MCP server. It's the same set of tools whether you call them from Claude, ChatGPT, an agent you've built or a script.
https://trendmill.ai/api/mcp| Detail | Value |
|---|---|
| Protocol | Model Context Protocol over streamable HTTP, stateless, JSON responses |
| Auth | OAuth 2.1 sign-in, or an API key as a bearer token |
| Scope | One organisation per key or connection |
| Responses | Compact JSON, validated against each tool's output schema |
| Limit | 10,000 requests per API key per day |
Create an API key
Open the API keys tab
Go to Settings → API keys and press Create an API key. Give it a name you'll recognise later, such as "Claude Code, laptop".
Copy it now
The key is shown once. Copy it, or use Copy configuration to copy a ready-made MCP client config with the key filled in. Trendmill can't show it again.
A key belongs to the person who created it and works only in the organisation it was created in. If its creator leaves the organisation, the key stops working there. To revoke a key, press Revoke key next to it. Anything using it loses access straight away.
Calling it without an MCP client
MCP is JSON-RPC over HTTP, so any HTTP client can call it. List the tools:
curl -s https://trendmill.ai/api/mcp \
-H "Authorization: Bearer $TRENDMILL_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Call one:
curl -s https://trendmill.ai/api/mcp \
-H "Authorization: Bearer $TRENDMILL_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "trendmill_get_competitor_pulse",
"arguments": { "window_days": 7 }
}
}'tools/list returns every tool's input and output schema. The tools are
described in Connect your AI.
Errors
Errors come back as a short message with a hint, for example a brand name that
didn't match, or a category with too few emails to score. A request without a
valid key or token gets a 401 with the details an OAuth client needs to sign
in.
Need a REST API?
If you need data in a BI tool, a warehouse or a workflow that can't speak MCP, tell us what you're connecting and we'll work it out with you.