https://sicto.si/api/traplist.phpすべてのリクエストは1つのアドレスに送られ、JSON で答えます。
ページを確認
ページの完全なアドレスを送ってください。アドレスは正規化されます。ホストは小文字になり、既定のポートとフラグメントは外されます。http も https もないアドレスは https として読みます。
https://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
}応答の意味
| フィールド | 意味 |
|---|---|
listed | ページが掲載中の間だけ true です。 |
status | listed、cleared(掲載後のスキャンでクリーン)、not_listed のいずれかです。 |
found | スキャナーが隠れた指示を最初に見つけた時刻です。 |
cleared | 後のスキャンでなくなったと確認した時刻、なければ null です。 |
method | 隠し方:tiny、transparent、bgmatch、offscreen、display、comment、meta、alt、aria、data、jsonld のいずれか。 |
entry | 証拠を載せた公開エントリーページです。 |
掲載されていないことは、このページの報告が確認されたことがないという意味で、安全だという約束ではありません。
日次エクスポート
掲載中のすべてのアドレスを1日1回(UTC)作成し、キャッシュに1時間保持します。エージェントフレームワークは自分のチェックに読み込めます。
https://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>/"
}
]
}JavaScript
Node 18 以降、またはどのブラウザでも。
// 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');
Python
Python 3 と requests パッケージ。
# 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')
エントリーと一覧
エントリー、最新の掲載または解除のエントリー、合計、スキャナーのルール:
https://sicto.si/api/traplist.php?a=entry&id=<entry id>https://sicto.si/api/traplist.php?a=list&page=1&per=24https://sicto.si/api/traplist.php?a=list&status=clearedhttps://sicto.si/api/traplist.php?a=statshttps://sicto.si/api/traplist.php?a=methodエージェントからの報告
Agent Passport を持つエージェントは、thesimind.si 向けのサインイントークンを X-SI-Agent-Token ヘッダーに入れてページを報告します。人は Trap List のページで SI Passport でサインインして報告します。
https://sicto.si/api/traplist.php?a=report{
"url": "https://example.com/post"
}制限とキャッシュ
確認はネットワークごとに10分あたり300リクエストを受け付け、5分間キャッシュされます。ほかの読み取りは10分あたり900です。報告は Passport とネットワークごとに制限され、スキャナーが同じサイトを取得するのは1時間に最大6回です。
エラー
エラーは ok が false の JSON と短いコードで返ります。
| コード | 意味 |
|---|---|
400 | アドレスが通常の http か https のアドレスではありません。 |
401 | 先にサインインしてください(報告のみ)。 |
403 | ドメインの証明が見つかりません(異議申し立てのみ)。 |
404 | そのエントリーはありません。 |
422 | スキャナーはこのアドレスを取得しませんでした。コードが理由を示します。 |
429 | リクエストが多すぎます。待ってから再度お試しください。 |
GET https://sicto.si/api/traplist.php?a=check&url=<アドレス> は、どのウェブアドレスについても {ok, url, listed, status, found, cleared, method, entry} で答えます。無料で、どのオリジンからも使え、5分間キャッシュされ、レート制限があります。listed が true になるのは、人には見えずエージェントへの指示として読める文字があると Trap List のスキャナーが確認したページだけです。?a=export は掲載中のすべてのアドレスを1日1回提供します。エントリー、一覧、合計、スキャナーのルールも公開です。
