🤖 Agent 一键接入

Claude · Cursor · Copilot · Windsurf · 任意支持 x402 的 Agent

💰 定价一览

热搜榜单
$0.05
关键词搜索
$0.05
全量导出
$0.50
工具调用
$0.01

全部通过 x402 协议在 Base 主网以 USDC 结算 · 每笔可在 BaseScan 查验

⚡ 三步接入

1
免费试用
GET /api/x402/sample?limit=3 无需任何配置,直接获取样例数据
2
发起支付请求
调用付费接口,服务端返回 402 + Payment-Required 挑战头
3
签名并支付
用你的 Base 钱包签名 payload,携带 PAYMENT-SIGNATURE 头重发请求

📋 JavaScript 完整示例

// 1. 获取挑战(402 Payment Required 头)
const challengeResp = await fetch('autotasker.highkingflower.com/api/x402/hotlist?board=weiboHot&limit=3');
const paymentRequired = challengeResp.headers.get('Payment-Required');
const challenge = JSON.parse(atob(paymentRequired));

// 2. 构建支付 payload(你的钱包地址填入 from)
const payload = {
  ...challenge,
  authorization: {
    from: 'YOUR_WALLET_ADDRESS',  // ← 换成你的 Base 钱包地址
    validFrom: Math.floor(Date.now()/1000) - 300,
    validUntil: Math.floor(Date.now()/1000) + 3600,
  }
};

// 3. 用你的私钥签名(需要 viem 或 ethers)
// const signature = await signer.signTypedData(...)

// 4. 带着签名再调一次
const paidResp = await fetch('autotasker.highkingflower.com/api/x402/hotlist?board=weiboHot&limit=3', {
  headers: { 'PAYMENT-SIGNATURE': btoa(JSON.stringify(payload)) }
});
const data = await paidResp.json();

🔌 MCP 配置(Claude Desktop / Cursor)

将以下 JSON 添加到你的 MCP config:

{
  "name": "chinese-trending-data",
  "url": "https://autotasker.highkingflower.com/mcp",
  "description": "Real-time Chinese social media trending data via x402 USDC payment on Base mainnet",
  "tools": [
    {
      "name": "get_hotlist",
      "description": "Get trending posts from Weibo/Zhihu/Douban/Bilibili/Tieba",
      "price": "$0.05"
    },
    {
      "name": "search_chinese_social",
      "description": "Search across Chinese social platforms",
      "price": "$0.05"
    },
    {
      "name": "export_full_dataset",
      "description": "Export complete dataset",
      "price": "$0.50"
    }
  ]
}

🛡️ 信任与验证

金库 0xb9A9E6d9…94773C BaseScan 查看链上数据 对账 /api/x402/reconcile

💎 查看所有产品与价格 🧪 免费试用 📖 Agent 文档 🔐 信任中心