跳转到主要内容

REST API 参考

6.1 API概述

OTR提供免费的REST API,允许任何人查询域名的信任评分。这个API是OTR协议的核心接口,AI代理和开发者通过它获取商家的信任数据。 基础URL: https://orbexa.io/api/otr/verify/:domain 特点:
  • 免费使用,无需API密钥
  • 返回完整的六维度评分和信号明细
  • 数据来源于公开可验证信息
  • 支持JSON格式响应

6.2 查询端点

GET /api/otr/verify/:domain

查询指定域名的OTR信任评分。 请求示例:
curl https://orbexa.io/api/otr/verify/example.com
路径参数:
参数类型必填说明
domainstring要查询的域名(不含协议前缀)

响应结构

响应为JSON格式,包含以下顶层字段:
{
  "domain": "example.com",
  "name": "Example Store",
  "trust_score": 75,
  "badge": "SILVER",
  "industry": "E-Commerce",
  "dimensions": {
    "V": { "score": 82, "signals": [...] },
    "S": { "score": 68, "signals": [...] },
    "G": { "score": 70, "signals": [...] },
    "T": { "score": 65, "signals": [...] },
    "D": { "score": 72, "signals": [...] },
    "F": { "score": null, "status": "cold_mode" }
  },
  "entity_data": {
    "gleif": { ... },
    "wikidata": { ... },
    "stock": { ... }
  },
  "agent_commerce": {
    "llms_txt": true,
    "agent_json": false,
    "schema_org_product": true,
    "sitemap": true
  },
  "scanned_at": "2026-04-10T12:00:00Z",
  "otr_id": "OTR-xxxx"
}

响应字段详解

字段类型说明
domainstring查询的域名
namestring商家名称(品牌名优先)
trust_scorenumber0-100的综合信任评分
badgestringPLATINUM/GOLD/SILVER/BRONZE/UNRATED
industrystring行业分类
dimensionsobject六个维度的分数和信号明细
entity_dataobject第三方验证的实体信息
agent_commerceobjectAI代理商务能力声明
scanned_atstring最近一次扫描时间(ISO 8601)
otr_idstringOTR唯一标识符

维度信号结构

每个维度下的 signals 数组包含该维度的所有信号:
{
  "signal_name": "dnssec",
  "status": "detected",
  "value": true,
  "evidence": "DNSSEC is enabled with RRSIG records",
  "source_url": "dns://example.com"
}
字段类型说明
signal_namestring信号标识名
statusstringdetected / not_found / not_scanned / fetch_failed
valueany信号的具体值(布尔/字符串/数字)
evidencestring证据描述
source_urlstring数据来源链接(可验证)

6.3 .well-known端点

OTR也提供标准的 .well-known 端点,符合Web标准的服务发现规范:

GET /.well-known/otr/verify/:domain

与主API返回相同的数据结构,但遵循 .well-known URI规范(RFC 8615)。
curl https://orbexa.io/.well-known/otr/verify/example.com

6.4 限速策略

API有基本的限速保护:
场景限制
普通请求合理使用,无硬性限制
批量查询建议间隔1秒
恶意请求会被临时封禁

6.5 集成示例

JavaScript/Node.js

async function checkTrust(domain) {
  const response = await fetch(
    `https://orbexa.io/api/otr/verify/${encodeURIComponent(domain)}`
  );
  const data = await response.json();

  console.log(`域名: ${data.domain}`);
  console.log(`信任评分: ${data.trust_score}`);
  console.log(`徽章: ${data.badge}`);
  console.log(`V维度: ${data.dimensions.V.score}`);
  console.log(`S维度: ${data.dimensions.S.score}`);

  return data;
}

// 使用
checkTrust('example.com');

Python

import requests

def check_trust(domain: str) -> dict:
    url = f"https://orbexa.io/api/otr/verify/:domain"
    response = requests.get(url)
    data = response.json()

    print(f"域名: {data['domain']}")
    print(f"信任评分: {data['trust_score']}")
    print(f"徽章: {data['badge']}")

    return data

# 使用
check_trust("example.com")

cURL

# 查询并格式化输出
curl -s https://orbexa.io/api/otr/verify/example.com | jq .

# 只获取信任评分
curl -s https://orbexa.io/api/otr/verify/example.com | jq '.trust_score, .badge'

6.6 用AI代理自动查询

你可以让ChatGPT、Claude等AI助手帮你查询和分析信任评分。示例提示词:
请帮我查询 example.com 的OTR信任评分。
访问 https://orbexa.io/api/otr/verify/example.com
然后分析每个维度的分数,告诉我最需要改进的地方,
并给出具体的操作步骤。
AI代理会自动调用API、解析结果,并给出个性化的优化建议。这就是”用自己的AI实现”的意思,你不需要安装任何ORBEXA的产品,只需要一个能联网的AI助手。

6.7 自建信任评估

如果你想自己搭建类似的信任评估系统(例如只评估自己的供应链),OTR协议的核心逻辑是开源的: ORBEXA提供的是一个现成的实现,但协议本身是开放的,任何人都可以基于同样的原理构建自己的信任评估。
下一章: MCP Server — 信任查询工具 — 通过MCP协议让AI代理直接调用OTR信任查询