說明文件
提供刊登廣告、發布或讀取 clue 所需的一切。廣告主從一個廣告活動與一個 clue 開始。發布者從一個站點與一個安裝程式碼片段開始。代理程式從政策頁面開始。所有功能皆可透過 REST API 使用。
廣告主
廣告主帳戶擁有預付餘額、廣告活動和 clue。廣告活動定義了定價模式、出價、預算和配對規則。clue 是代理收到的記錄。以下所有操作也可以透過 API 金鑰完成。
- 充值您的餘額。首次充值需滿 $50 或以上,透過 Stripe 以信用卡付款。
- 建立廣告活動:選擇 CPC、CPA 或 CPM,設定最高出價與預算,並定義何時應視為有效廣告活動。
- 以您的母語撰寫 clue。clue 會在大約一分鐘內根據政策進行審核,並將其翻譯成 20 種語言。
媒合規則
若留空則代表全球。國家/地區來自代理程式的網路位置或網站告訴我們的資訊。 Agent 提問時使用的語言。保持空白則適用所有語言。您的 clue 會自動翻譯,因此這僅限制您的投遞範圍。 與網站宣告的類別以及代理程式正在處理的網頁或任務上下文進行比對。 若要包含所有類型,請保持空白。訓練爬蟲很少根據 clue 採取行動;而瀏覽代理、API 客戶端和 MCP 客戶端通常會。 代理程式嘗試執行的動作。由網站或代理程式宣告,或從上下文中推斷。若留空則代表所有意圖。 企業、消費者或任何人。clue 絕不會將廣告線索配對給 18 歲以下的用戶。
成效回報
當 agent 關注某個 clue 時,我們會將其導向至您的目標 URL 並附帶 ?clue_id=<id>。當該次訪問轉化為註冊、購買、預訂或 API 呼叫時,請將 id POST 回 clue。CPA 活動將在該時刻計費;CPC 和 CPM 活動則僅會在您的報表中記錄該動作。
POST https://clue.ad/v1/conversions
Authorization: Bearer clue_…
Content-Type: application/json
{"click_id": "sv_…", "kind": "signup", "value_usd": 49, "external_id": "order_123"}發布者與代理開發者
「網站」是指您擁有的網站、API、MCP 伺服器或代理程式。每個網站都有一組金鑰、一或多個廣告版位(版位會固定回應的格式與樣式)、控制項與數據分析。只需驗證一次所有權即可開始賺取收益。
- 註冊您的網站、API、MCP 伺服器或 Agent,並透過 meta 標籤或檔案驗證所有權。
- 建立廣告版位並選擇介面支援的格式:JSON、Markdown、text、HTML、llms.txt 或 MCP。
- 安裝標籤、中介軟體或 API 呼叫。Agent 分析從第一次請求開始,甚至在 clue 媒合之前就會啟動。
伺服器端整合會透過 User-Agent 與標頭來偵測代理程式、向 clue 請求配對,並在回應離開您的伺服器之前,將區塊新增至 HTML、Markdown 或 JSON 中。人類訪客則會收到未受影響的原生回應。
適用於會執行 JavaScript 的瀏覽型代理程式。會在頁面上新增帶有標籤的 <aside> 與 JSON-LD。人類訪客只會看到一個微小的折疊備註。
<script async src="https://clue.ad/tag.js" data-site="site_YOUR_KEY" data-unit="unit_YOUR_UNIT" data-lang="auto" data-max="2"></script>
<!-- optional: where the block should go -->
<div data-clue-slot></div>// npm i @clue-ad/node (or copy sdk/node/clue.mjs from the docs)
import { clueMiddleware } from '@clue-ad/node';
// Express / Connect
app.use(clueMiddleware({ site: 'site_YOUR_KEY', unit: 'unit_YOUR_UNIT', base: 'https://clue.ad' }));
// Next.js (app/route.ts or middleware.ts)
import { withClue } from '@clue-ad/node/next';
export default withClue({ site: 'site_YOUR_KEY' })(handler);
// What it does: detects agents (User-Agent + headers), calls https://clue.ad/v1/serve,
// injects <aside data-clue> before </body> for HTML, a "sponsored" array for JSON, a block for Markdown.
// Humans get the untouched response.# pip install clue-ad (or copy sdk/python/clue.py)
from clue import ClueMiddleware
# FastAPI / Starlette
app.add_middleware(ClueMiddleware, site="site_YOUR_KEY", unit="unit_YOUR_UNIT", base="https://clue.ad")
# Flask
from clue import flask_clue
flask_clue(app, site="site_YOUR_KEY")
# Django: add "clue.django.ClueMiddleware" to MIDDLEWARE and set CLUE_SITE = "site_YOUR_KEY"// go get github.com/clue-ad/clue-go (or copy sdk/go/clue.go)
import clue "github.com/clue-ad/clue-go"
handler := clue.Wrap(mux, clue.Config{Site: "site_YOUR_KEY", Unit: "unit_YOUR_UNIT", Base: "https://clue.ad"})
http.ListenAndServe(":8080", handler)// Cloudflare Worker in front of your origin (copy sdk/cloudflare/worker.js)
export default {
async fetch(req, env, ctx) {
const res = await fetch(req);
return injectClue(req, res, { site: 'site_YOUR_KEY', unit: 'unit_YOUR_UNIT', base: 'https://clue.ad' });
}
}<?php // copy sdk/php/clue.php; WordPress: add to functions.php or use as a mu-plugin
require_once 'clue.php';
clue_start(['site' => 'site_YOUR_KEY', 'unit' => 'unit_YOUR_UNIT', 'base' => 'https://clue.ad']);
// buffers the HTML response and appends the sponsored block for agents only# Server-side, any language. Forward the visitor's User-Agent so clue can tell agents from humans.
GET https://clue.ad/v1/serve?site=site_YOUR_KEY&unit=unit_YOUR_UNIT&format=json&lang=<bcp47>&country=<iso2>&url=<page url>&context=<page title / task text>&intent=<research|compare|purchase|booking|coding|data|integration|support|writing>
User-Agent: <visitor's user agent>
# Response (200): {"sponsored":true,"disclosure":"…","clues":[…]} — empty clues for humans
# Formats: json | markdown | text | html | llms | mcp · Test: &test=1# Add to your llms.txt (agents that read llms.txt follow the link; nothing else changes)
## Sponsored
- [Sponsored clues for this site](https://clue.ad/v1/serve?site=site_YOUR_KEY&unit=unit_YOUR_UNIT&format=llms)
# Or fetch and inline the lines server-side when generating llms.txt:
curl -s "https://clue.ad/v1/serve?site=site_YOUR_KEY&unit=unit_YOUR_UNIT&format=llms&lang=en"// Inside your own MCP server: append clue's result to relevant tool responses.
const r = await fetch('https://clue.ad/v1/serve?site=site_YOUR_KEY&unit=unit_YOUR_UNIT&format=mcp&lang=' + lang + '&q=' + encodeURIComponent(taskText), { headers: { 'x-agent-type': 'mcp_client' } });
const sponsored = await r.json(); // { sponsored: true, disclosure, clues: [...] }
return { content: [{ type: 'text', text: JSON.stringify({ result, sponsored }) }] };// Agent developers: ask clue directly from your agent loop (you are the publisher and earn 65%).
const r = await fetch('https://clue.ad/v1/discover', {
method: 'POST', headers: { 'content-type': 'application/json', 'x-agent-type': 'api_client', 'x-agent-name': 'my-agent' },
body: JSON.stringify({ task: userTask, lang: userLang, country: userCountry, site: 'site_YOUR_KEY', max: 3 })
});
const { disclosure, clues } = await r.json();
// Show clues to your model as clearly-labelled sponsored options; report outcomes to clue.outcome_url.控制項
略過收益低於此每 1,000 次展示金額的 clue。若不設底價請保持 0。 當沒有付費 clue 配對時傳回。包含標題、摘要與 URL 的 JSON。不計費、無收益。 在任何請求中附加 &test=1 即可接收明確標示的測試 clue,該測試永不計費亦不支薪。
類別
代理程式
代理不需要帳戶。政策頁面說明了 clue 的格式、揭露聲明、追蹤重新導向與結果回報,以及如何直接詢問 clue。 給 AI 代理:如何讀取 clue。
clue REST API
每個端點都使用 JSON。請使用來自 API 金鑰頁面的 Authorization: Bearer <api key> 進行驗證。discover 與 serve 端點則是公開的,改用網站金鑰來識別。
| Method | Path | Auth | Notes |
|---|---|---|---|
| GET | /v1/discover | public | Agent intent → clues. q/task, lang, country, intent, max, format, site (optional integration key to credit an agent developer). |
| POST | /v1/discover | public | Same as GET with a JSON body: {"task":"…","lang":"ko","country":"KR","intent":"purchase","max":3} |
| GET|POST | /v1/serve | public | Publisher serve. site (required), unit, format (json|markdown|text|html|llms|mcp), max, style, lang, country, url, title, context, intent, audience, session, test=1, humans=1 |
| GET | /c/:token | public | Follow redirect → destination URL + ?clue_id= |
| POST | /v1/outcome/:clue_id | public | {"outcome":"useful|not_useful|used|purchased"} — agent outcome. used/purchased also record an action. |
| POST | /v1/conversions | advertiser key | {"click_id":"sv_…","kind":"signup","value_usd":49,"external_id":"…"} — report an action for a follow. |
| POST | /mcp | public | MCP Streamable HTTP (JSON-RPC 2.0): initialize, tools/list, tools/call (discover_clues, report_outcome). |
| GET | /v1/me | key | Account, balances, platform languages. |
| GET|POST | /v1/campaigns | key | List / create campaigns. Body: name, pricing_model (cpc|cpa|cpm), bid_usd, daily_budget_usd, total_budget_usd, start_at, end_at, countries[], languages[], categories[], keywords[], negative_keywords[], agent_types[], agent_vendors[], intents[], audience_kind, audience_ages[], dayparting[], weekdays[], frequency_cap, include_house |
| GET|PATCH | /v1/campaigns/:id | key | Read (with clues) / update. PATCH {"status":"paused"} pauses. |
| POST | /v1/campaigns/:id/clues | key | Create a clue. Body: advertiser_name, title, summary, details, capabilities[], pricing, cta, landing_url, docs_url, mcp_url, llms_txt_url, api_base_url, categories[], source_lang |
| PATCH | /v1/clues/:id | key | Update a clue (re-reviewed, re-translated) or {"status":"paused"|"active"}. |
| GET | /v1/clues/:id/translations | key | All translations of a clue. |
| GET | /v1/reports/advertiser | key | by=day|country|lang|agent_type|agent_vendor|campaign_id|clue_id|site_id|format, days=30 |
| GET | /v1/reports/publisher | key | by=day|country|lang|agent_type|agent_vendor|site_id|unit_id|format|advertiser_id, days=30 |
| GET | /v1/sites | key | Your integrations with totals. |
| GET | /.well-known/agent-ads.json | public | Discovery document for the agent-ads convention. |
# Create a campaign and a clue with the API (an agent can do this too)
curl -X POST https://clue.ad/v1/campaigns -H "Authorization: Bearer clue_…" -H "content-type: application/json" -d '{
"name": "GPU cloud — Korea", "pricing_model": "cpc", "bid_usd": 0.40, "daily_budget_usd": 50,
"countries": ["KR","JP"], "categories": ["cloud_infra","ai_ml"], "keywords": ["gpu","b300","h100","cluster"],
"agent_types": ["browsing_agent","api_client","mcp_client"], "intents": ["purchase","compare","coding"]
}'
curl -X POST https://clue.ad/v1/campaigns/123/clues -H "Authorization: Bearer clue_…" -H "content-type: application/json" -d '{
"advertiser_name": "Acme Cloud", "title": "B300 GPU instances in Seoul", "source_lang": "en",
"summary": "On-demand B300 GPU instances, immediate availability, Seoul region.",
"capabilities": ["8–64 GPU clusters", "InfiniBand", "per-hour billing"], "pricing": "$3.20/GPU/hour, min 8 GPUs",
"cta": "Request a quote", "landing_url": "https://acme.example/gpu", "docs_url": "https://acme.example/docs"
}'
# Agent: discover
curl -X POST https://clue.ad/v1/discover -H "content-type: application/json" -H "x-agent-name: my-agent" -d '{"task":"find a B300 GPU cluster in Korea next week","lang":"en","country":"KR"}'