HTTP · OAuth 2.0 · MCP
The same 22 tools, over plain HTTP. Self-register a machine client, grab a token, call tools. No SDK required — though the official MCP SDKs make it one import.
[ QUICKSTART ]
Standard OAuth 2.0 client_credentials. Three calls and you're in.
One POST to /oauth2/register — no human, no browser, no email. You get a client_id and client_secret back.
curl -X POST https://mcp.spytrend.com/oauth2/register \
-H 'Content-Type: application/json' \
-d '{"client_name":"my-agent","grant_types":["client_credentials"],
"response_types":[],"token_endpoint_auth_method":"client_secret_basic",
"scope":"mcp:read"}'client_credentials grant with HTTP Basic auth. Tokens live ~1 hour; refresh by repeating the call.
curl -X POST https://mcp.spytrend.com/oauth2/token \ -u "$CLIENT_ID:$CLIENT_SECRET" \ -d 'grant_type=client_credentials&scope=mcp:read&audience=https://mcp.spytrend.com/mcp'
JSON-RPC tools/call against the MCP endpoint with your Bearer token. Every tool from the catalog above.
curl -X POST https://mcp.spytrend.com/mcp \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"search_ads","arguments":{"country":"BR","limit":5}}}'Machine clients without an account start on a shared pool of 500 tokens per source network (/24): 1 token per delivered row; ad media 1, creative media 10, a multi-language ad 50, a TikTok row 10. The price is multiplied by the number of filters in the request (at least 1). Before a paid call, the free estimate_cost tool tells the agent how many tokens it will take.
[ TOOLS THAT MATTER ]
The full catalog is on the connect page. These are the ones most teams wire up first.
search_adsFiltered ad search: geo, vertical, status, landing domain, dates. 1 token per returned ad (default page 20).
get_trendsRankings by geo, advertisers, webmasters, apps, timeline or scaling creatives.
search_webmastersAffiliate networks with per-geo volume and dominant-geo relevance.
get_usagePlan, used, remaining. Checking is free — poll it as often as you like.