Provenance
Provenance API
证明请求的来源,并保存防篡改的记录。
创建证明记录
POST/v1/provenance/check
API 密钥
参数
- ipstring必填
要证明的终端用户 IP。
- claimed_jurisdictionstring
请求声明的司法管辖区,如 us-ut、uk、au 或 eu。
- request_contextobject
任意 JSON 对象,与证明记录一同保存。
响应字段
- network_originstring
residential_clean、mobile、hosting、datacenter、vpn、residential_proxy、tor、relay 或 unknown。
- anonymizedboolean
网络隐藏了背后的用户时为 true。托管网络也算在内,已知基础设施除外。
- methodstring
决定判定结果的信号。
- confidencenumber
置信度,范围 0 到 1。
- policy_actionstring
按声明的司法管辖区得出的 allow、step_up 或 block。
- attestation_idinteger
已封存证明记录的 id。
curl -X POST https://ipscanner.io/v1/provenance/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ip": "203.0.113.24",
"claimed_jurisdiction": "us-ut",
"request_context": {
"gate": "age-verification"
}
}'响应
{
"network_origin": "vpn",
"anonymized": true,
"method": "ip_state:vpn",
"confidence": 0.9,
"policy_action": "block",
"attestation_id": 80421
}验证哈希链
GET/v1/provenance/verify
API 密钥
响应字段
- okboolean
每个条目的哈希和链接均校验通过时为 true。
- countinteger
已检查的条目数。
- brokenAtinteger
第一条被篡改条目的 id,链完整时为 0。
curl https://ipscanner.io/v1/provenance/verify \
-H "Authorization: Bearer YOUR_API_KEY"响应
{
"ok": true,
"count": 80421,
"brokenAt": 0
}对照每日锚点验证
POST/v1/provenance/verify
API 密钥
响应字段
- okboolean
每个条目的哈希和链接均校验通过时为 true。
- countinteger
已检查的条目数。
- brokenAtinteger
第一条被篡改条目的 id,链完整时为 0。
- yoursinteger
其中属于您的条目数。
- anchorobject | null
最近一次的每日根哈希,首次生成前为 null。
- atstring
验证的时间。
curl -X POST https://ipscanner.io/v1/provenance/verify \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'响应
{
"ok": true,
"count": 80421,
"brokenAt": 0,
"yours": 1204,
"anchor": {
"day": "2026-10-05",
"rootHash": "9f2c4e1a7b0d3c58e6f1a2b4c7d9e0f3a5b8c1d4e7f0a3b6c9d2e5f8a1b4c7d0",
"lastId": 80390
},
"at": "2026-10-06T14:05:00Z"
}读取哈希链
GET/v1/provenance/chain
API 密钥
参数
- limitinteger查询
每页条数,默认 50,最多 200。
- beforeinteger查询
返回早于此 id 的条目,用于分页。
响应字段
- linksarray
链上条目,按时间倒序。
- links[].entryHashstring
此条目的哈希。
- links[].prevHashstring
上一条目的哈希。
- links[].linkOkboolean
此条目正确链接到上一条时为 true。
- nextBeforeinteger
作为 before 传入以获取下一页;0 表示没有更多。
- totalinteger
您账户下的证明记录数。
- summaryobject
各策略操作的证明记录数量。
curl "https://ipscanner.io/v1/provenance/chain?limit=1" \
-H "Authorization: Bearer YOUR_API_KEY"响应
{
"links": [
{
"id": 80421,
"ts": "2026-10-06T14:02:11Z",
"ip": "203.0.113.24",
"claimedJurisdiction": "us-ut",
"networkOrigin": "vpn",
"anonymized": true,
"method": "ip_state:vpn",
"confidence": 0.9,
"policyAction": "block",
"entryHash": "b41f0c9e2d7a6358c1e4f7a0b3d6c9e2f5a8b1c4d7e0f3a6b9c2d5e8f1a4b7c0",
"prevHash": "7e3a9c1f5b2d8e4a6c0f3b7d1e5a9c2f6b0d4e8a2c6f0b4d8e2a6c0f4b8d2e6a",
"prevId": 80420,
"entryOk": true,
"linkOk": true
}
],
"nextBefore": 80421,
"total": 1204,
"summary": {
"allow": 1090,
"step_up": 71,
"block": 43
},
"anchor": null,
"jurisdictions": [],
"asOf": "2026-10-06T14:05:00Z"
}列出司法管辖区
GET/v1/provenance/jurisdictions
API 密钥
响应字段
- jurisdictions[].codestring
作为 claimed_jurisdiction 发送的代码。
- jurisdictions[].lawstring
该规则依据的法律。
- jurisdictions[].strictboolean
来源被掩盖时直接拒绝则为 true。
- jurisdictions[].cleanActionstring
来源正常时的操作。
- jurisdictions[].maskedActionstring
来源被掩盖时的操作。
curl https://ipscanner.io/v1/provenance/jurisdictions \
-H "Authorization: Bearer YOUR_API_KEY"响应
{
"jurisdictions": [
{
"code": "us-ut",
"label": "Utah",
"law": "Utah SB 73",
"strict": true,
"cleanAction": "allow",
"maskedAction": "block",
"rule": "Age-gated access requires a verified in-state location. A masked origin is refused outright."
},
{
"code": "eu",
"label": "European Union",
"law": "DSA minor protection",
"strict": false,
"cleanAction": "allow",
"maskedAction": "step_up",
"rule": "A masked origin is sent for stronger checks rather than refused, so travellers and privacy tools are not locked out."
}
]
}导出证据
GET/v1/provenance/export
API 密钥CSV
参数
- fromstring查询
范围起点,格式为 YYYY-MM-DD 或 RFC 3339。
- tostring查询
范围终点,格式为 YYYY-MM-DD 或 RFC 3339。
curl "https://ipscanner.io/v1/provenance/export?from=2026-10-01&to=2026-10-31" \
-H "Authorization: Bearer YOUR_API_KEY"响应,CSV
# provenance evidence export
# range,2026-10-01,2026-10-31
# chain_verified,true,count,80421
id,ts,ip,claimed_jurisdiction,network_origin,anonymized,method,confidence,policy_action,entry_hash
80421,2026-10-06T14:02:11Z,203.0.113.24,us-ut,vpn,true,ip_state:vpn,0.9000,block,b41f0c9e2d7a...