เอกสารประกอบ
ทุกสิ่งที่จำเป็นในการโฆษณา เผยแพร่ หรืออ่าน clue ผู้ลงโฆษณาเริ่มต้นด้วยแคมเปญและ clue ผู้เผยแพร่โฆษณาเริ่มต้นด้วยหนึ่งเว็บไซต์และหนึ่งสนิปเป็ตการติดตั้ง agent เริ่มต้นด้วยหน้าเกณฑ์วิธี ทุกอย่างสามารถใช้งานได้ผ่าน REST API
ผู้ลงโฆษณา
บัญชีผู้ลงโฆษณาประกอบด้วยยอดเงินชำระล่วงหน้า แคมเปญ และ clue แคมเปญจะกำหนดโมเดลราคา การเสนอราคา งบประมาณ และกฎการจับคู่ clue คือบันทึกที่ agent ได้รับ ทุกอย่างด้านล่างนี้สามารถทำได้ด้วย API key เช่นกัน
- เติมเงินเข้าบัญชีของคุณ การเติมเงินครั้งแรกต้องมีมูลค่า $50 ขึ้นไป ผ่านบัตรเครดิต/เดบิตผ่าน Stripe
- สร้างแคมเปญ: เลือก CPC, CPA หรือ CPM กำหนดราคาประมูลสูงสุดและงบประมาณ และกำหนดเงื่อนไขการทำงานของแคมเปญ
- เขียน clue ในภาษาของคุณเอง clue จะตรวจสอบนโยบายภายในเวลาประมาณ 1 นาที และแปลเป็น 20 ภาษาให้
กฎการจับคู่
เว้นว่างไว้สำหรับทั่วโลก ประเทศมาจากตำแหน่งที่ตั้งเครือข่ายของ agent หรือจากสิ่งที่เว็บไซต์แจ้งให้เราทราบ ภาษาที่เอเจนต์ใช้ถาม เว้นว่างไว้สำหรับทุกภาษา clue ของคุณจะถูกแปลโดยอัตโนมัติ ดังนั้นการตั้งค่านี้จึงจำกัดเฉพาะสถานที่ที่คุณต้องการให้บริการเท่านั้น จับคู่กับหมวดหมู่ที่ประกาศของเว็บไซต์และบริบทของหน้าเว็บหรือภารกิจที่ agent กำลังดำเนินการอยู่ เว้นว่างไว้สำหรับทุกประเภท เว็บครอว์ลาร์สำหรับฝึกAI มักไม่ค่อยตอบสนองต่อ clue แต่เบราว์เซอร์เอเจนต์, API ไคลเอนต์ และ MCP ไคลเอนต์มักจะตอบสนอง สิ่งที่ agent กำลังพยายามทำ ประกาศโดยเว็บไซต์หรือ agent หรืออนุมานจากบริบท เว้นว่างไว้สำหรับทุกเจตนา ธุรกิจ, ผู้บริโภค หรือทุกคน clue จะไม่จับคู่กับผู้ใช้ที่มีอายุต่ำกว่า 18 ปี
รายงานผลลัพธ์
เมื่อเอเจนต์ติดตาม clue เราจะส่งต่อไปยัง URL ปลายทางของคุณพร้อมกับ ?clue_id=<id> เมื่อการเยี่ยมชมนั้นเปลี่ยนเป็นการสมัครใช้งาน การซื้อ การจอง หรือการเรียกใช้ API ให้ POST id นั้นกลับมาที่ 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"}ผู้เผยแพร่และนักพัฒนา agent
ไซต์คือเว็บไซต์ API เซิร์ฟเวอร์ MCP หรือเอเจนต์ที่คุณเป็นเจ้าของ แต่ละไซต์จะมีคีย์ ช่องโหมดหนึ่งช่องขึ้นไป (ช่องโหมดจะกำหนดรูปแบบและสไตล์ของการตอบกลับ) ตัวควบคุม และการวิเคราะห์ ยืนยันความเป็นเจ้าของเพียงครั้งเดียวแล้วเริ่มรับรายได้
- ลงทะเบียนเว็บไซต์, API, เซิร์ฟเวอร์ MCP หรือเอเจนต์ของคุณ และยืนยันความเป็นเจ้าของด้วยเมทาท็กหรือไฟล์
- สร้างช่องแสดงผลและเลือกรูปแบบที่พื้นผิวรองรับ: JSON, Markdown, text, HTML, llms.txt หรือ MCP
- ติดตั้งแท็ก, มิดเดิลแวร์ หรือเรียกใช้ API การวิเคราะห์เอเจนต์จะเริ่มตั้งแต่คำขอแรกสุด แม้กระทั่งก่อนที่ clue จะจับคู่ด้วยซ้ำ
การรวมระบบฝั่งเซิร์ฟเวอร์จะตรวจจับเอเจนต์ผ่าน User-Agent และ headers ขอจับคู่จาก 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.การควบคุม
ข้าม clue ที่จะทำให้คุณได้รายได้น้อยกว่าค่านี้ต่อการแสดงผล 1,000 ครั้ง ปล่อยเป็น 0 หากไม่ต้องการกำหนดขั้นต่ำ ส่งคืนเมื่อไม่มี clue แบบจ่ายเงินที่ตรงกัน เป็น JSON ที่มีชื่อเรื่อง, สรุป และ URL ไม่มีการเรียกเก็บเงินและไม่มีการจ่ายเงิน เพิ่ม &test=1 ต่อท้ายคำขอใดๆ เพื่อรับ clue ทดสอบที่มีป้ายกำกับชัดเจน ซึ่งจะไม่ถูกเรียกเก็บเงินและไม่มีการจ่ายเงิน
หมวดหมู่
เอเจนต์
Agent ไม่จำเป็นต้องมีบัญชี หน้านโยบายอธิบายรูปแบบของ clue, การเปิดเผยข้อมูล, การเปลี่ยนเส้นทางติดตามและการรายงานผลลัพธ์ รวมถึงวิธีสอบถาม clue โดยตรง สำหรับ AI agents: วิธีอ่าน clue
clue REST API
ทุกเอนด์พอยต์ใช้รูปแบบ JSON ยืนยันตัวตนด้วย Authorization: Bearer <api key> จากหน้าคีย์ API ส่วนเอนด์พอยต์ 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"}'