clue
简体中文
登录立即开始
文档

文档

提供广告投放、内容发布或读取 clue 所需的一切功能。广告主从一个活动和一个 clue 开始。媒体主从一个站点和一个安装代码片段开始。AI 代理从策略页面开始。所有功能均可通过 REST API 使用。

广告主

广告主账户包含预付费余额、广告系列和 clue。广告系列定义了定价模型、出价、预算和匹配规则。clue 是代理收到的记录。以下所有操作也可以通过 API 密钥完成。

  1. 充值您的账户余额。首次充值需通过 Stripe 使用银行卡充值 $50 或以上。
  2. 创建广告系列:选择 CPC、CPA 或 CPM,设置最高出价与预算,并定义广告系列的生效条件。
  3. 用您自己的语言编写一条 clue 广告。clue 会在约一分钟内对其进行合规审查,并将其翻译成 20 种语言。

匹配规则

留空则表示面向全球。国家/地区信息来源于 AI 代理的网络位置或站点提供的内容。 代理请求时使用的语言。留空则支持所有语言。您的 clue 会被自动翻译,因此这仅用于限制投放地区。 与站点声明的分类以及 AI 代理正在处理的页面或任务上下文进行匹配。 留空表示所有类型。训练爬虫极少对 clue 做出反应;而浏览代理、API 客户端和 MCP 客户端通常会。 AI 代理试图执行的操作。由站点或 AI 代理声明,或从上下文中推断得出。留空则表示所有意图。 企业、消费者或任何人。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 服务器或代理。每个站点都拥有一个密钥、一个或多个广告位(广告位用于固定响应的格式和样式)、控制项以及分析数据。只需验证一次所有权即可开始获得收益。

  1. 注册您的网站、API、MCP 服务器或代理,并通过 meta 标签或文件验证所有权。
  2. 创建一个广告位并选择界面支持的格式:JSON、Markdown、文本、HTML、llms.txt 或 MCP。
  3. 安装标签、中间件或 API 调用。代理分析从第一次请求开始,甚至在 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 次展示计算)。若不设底价请保留为 0。 当没有付费线索匹配时返回。包含标题、摘要和 URL 的 JSON。不计费,也不付费。 在任意请求后附加 &test=1 即可接收带有明显标记的测试 clue,该测试不会产生任何计费或收益。

分类

developer_toolsai_mlcloud_infradata_analyticssecurityproductivitycommunicationecommerceretail_productsfinance_fintechinsurancetravelhospitalityfood_deliveryreal_estateautomotivehealth_wellnesseducationlegalhr_recruitingmarketing_salesmedia_entertainmentgamingnewssciencegovernment_publicnonprofithome_serviceslogisticsmanufacturingenergytelecomconsumer_appsother

智能体

代理无需账户。政策页面解释了 clue 的格式、披露声明、关注重定向和结果报告,以及如何直接向 clue 查询。 致 AI 代理:如何解读 clue。

clue REST API

每个端点均使用 JSON。请使用来自“API 密钥”页面的 Authorization: Bearer <api key> 进行身份验证。发现 (discover) 和投放 (serve) 端点是公开的,需通过站点密钥进行识别。

MethodPathAuthNotes
GET/v1/discoverpublicAgent intent → clues. q/task, lang, country, intent, max, format, site (optional integration key to credit an agent developer).
POST/v1/discoverpublicSame as GET with a JSON body: {"task":"…","lang":"ko","country":"KR","intent":"purchase","max":3}
GET|POST/v1/servepublicPublisher 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/:tokenpublicFollow redirect → destination URL + ?clue_id=. Charged once for CPC.
POST/v1/outcome/:clue_idpublic{"outcome":"useful|not_useful|used|purchased"} — agent outcome. used/purchased also record an action.
POST/v1/conversionsadvertiser key{"click_id":"sv_…","kind":"signup","value_usd":49,"external_id":"…"} — report an action for a follow.
POST/mcppublicMCP Streamable HTTP (JSON-RPC 2.0): initialize, tools/list, tools/call (discover_clues, report_outcome).
GET/v1/mekeyAccount, balances, platform languages.
GET|POST/v1/campaignskeyList / 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/:idkeyRead (with clues) / update. PATCH {"status":"paused"} pauses.
POST/v1/campaigns/:id/clueskeyCreate 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/:idkeyUpdate a clue (re-reviewed, re-translated) or {"status":"paused"|"active"}.
GET/v1/clues/:id/translationskeyAll translations of a clue.
GET/v1/reports/advertiserkeyby=day|country|lang|agent_type|agent_vendor|campaign_id|clue_id|site_id|format, days=30
GET/v1/reports/publisherkeyby=day|country|lang|agent_type|agent_vendor|site_id|unit_id|format|advertiser_id, days=30
GET/v1/siteskeyYour integrations with totals.
GET/.well-known/agent-ads.jsonpublicDiscovery 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"}'