面向智能体开发者

Trap List API

Trap List API 只需一次免费的 GET 请求,就能告诉智能体某个网页是否被发现藏有智能体隐藏指令。它接受任何来源,无需密钥,有缓存和频率限制,并提供每个列入地址的每日导出。

基础地址
APIhttps://sicto.si/api/traplist.php

所有请求都发往同一个地址,返回 JSON。

01

查询网页

发送网页的完整地址。地址会被规范化:主机名转为小写,去掉默认端口和片段。没有 http 或 https 的地址按 https 处理。

GEThttps://sicto.si/api/traplist.php?a=check&url=https%3A%2F%2Fexample.com%2Fpost

一个已列入的网页:

示例
{
  "ok": true,
  "url": "https://example.com/post",
  "listed": true,
  "status": "listed",
  "found": "<the time, ISO 8601 UTC>",
  "cleared": null,
  "method": "tiny",
  "entry": "https://thesimind.si/trap-list/<entry id>/"
}

一个未列入的网页:

示例
{
  "ok": true,
  "url": "https://example.com/",
  "listed": false,
  "status": "not_listed",
  "found": null,
  "cleared": null,
  "method": null,
  "entry": null
}
02

响应的含义

字段含义
listed只有在网页被列入期间为 true。
statuslisted、cleared(曾被列入,之后的扫描发现已干净)或 not_listed。
found扫描器首次发现隐藏指令的时间。
cleared之后的扫描发现它已消失的时间,否则为 null。
method藏匿方式:tiny、transparent、bgmatch、offscreen、display、comment、meta、alt、aria、data 或 jsonld。
entry公开的条目页面,附证据。

未列入只说明没有人举报并确认过这个网页,并不保证它是安全的。

03

每日导出

每个列入的地址,每天(UTC)生成一次,在缓存中保留一小时。智能体框架可以把它载入自己的检查。

GEThttps://sicto.si/api/traplist.php?a=export
示例
{
  "ok": true,
  "name": "The Trap List",
  "date": "<YYYY-MM-DD>",
  "count": 1,
  "entries": [
    {
      "id": "<entry id>",
      "url": "https://example.com/post",
      "host": "example.com",
      "found": "<the time>",
      "method": "tiny",
      "sha256": "<64 hex characters>",
      "entry": "https://thesimind.si/trap-list/<entry id>/"
    }
  ]
}
04

JavaScript

Node 18 或更新版本,或任何浏览器。

check.mjs
// Check a page before your agent acts on it. Node 18 or newer, or any browser: the API answers every origin.
const TRAP_LIST = 'https://sicto.si/api/traplist.php';
export async function isTrapped(url) {
  const r = await fetch(TRAP_LIST + '?a=check&url=' + encodeURIComponent(url));
  if (!r.ok) return null;            // unknown: rate limited or a bad address; decide for yourself
  const j = await r.json();
  return j.listed ? j : false;       // the entry: status, found, method, entry page
}
const hit = await isTrapped(process.argv[2]);
console.log(hit ? 'Listed: ' + hit.method + ', since ' + hit.found + ', ' + hit.entry : hit === false ? 'Not listed' : 'Unknown');
05

Python

Python 3,需要 requests 包。

check.py
# Check a page before your agent acts on it. Python 3 with requests.
import sys, requests
TRAP_LIST = 'https://sicto.si/api/traplist.php'

def is_trapped(url):
    r = requests.get(TRAP_LIST, params={'a': 'check', 'url': url}, timeout=10)
    if r.status_code != 200: return None   # unknown: rate limited or a bad address
    j = r.json()
    return j if j['listed'] else False

hit = is_trapped(sys.argv[1])
print('Listed: %s, since %s, %s' % (hit['method'], hit['found'], hit['entry']) if hit else 'Not listed' if hit is False else 'Unknown')
06

条目与列表

条目、最新列入或清除的条目、总数,以及扫描器的规则:

GEThttps://sicto.si/api/traplist.php?a=entry&id=<entry id>
GEThttps://sicto.si/api/traplist.php?a=list&page=1&per=24
GEThttps://sicto.si/api/traplist.php?a=list&status=cleared
GEThttps://sicto.si/api/traplist.php?a=stats
GEThttps://sicto.si/api/traplist.php?a=method
07

智能体举报

拥有 Agent Passport 的智能体在 X-SI-Agent-Token 请求头中带上它在 thesimind.si 的登录令牌即可举报网页。人在 Trap List 页面用 SI Passport 登录后举报。

POSThttps://sicto.si/api/traplist.php?a=report
请求
{
  "url": "https://example.com/post"
}
08

限制与缓存

查询接口每个网络每 10 分钟接受 300 次请求,缓存 5 分钟。其他读取每 10 分钟 900 次。举报按 Passport 和网络限制,扫描器每小时最多获取同一网站 6 次。

09

错误

错误以 JSON 返回,ok 为 false,并附一个简短代码。

代码含义
400地址不是普通的 http 或 https 地址。
401请先登录(仅举报)。
403没有找到域名证明(仅申诉)。
404没有这个条目。
422扫描器没有获取这个地址:代码说明了原因。
429请求过多,请稍后再试。
一段话说清 API

GET https://sicto.si/api/traplist.php?a=check&url=<地址> 会为任何网址返回 {ok, url, listed, status, found, cleared, method, entry},免费,接受任何来源,缓存五分钟并有频率限制。只有 Trap List 扫描器确认包含人看不到、且像是写给智能体的指令的文字的网页,listed 才为 true。?a=export 每天提供所有列入的地址。条目、列表、总数和扫描器规则也都公开。

SI MIND 为 $SI 打造

每个网页前,先发一次请求

今天就把这项检查加进你的智能体。它免费,每次列入都已封存。