RiskAtlas API 接口调用规范
提供高速、安全的企业级制裁与合规数据接口。本接口支持混合检索(精确匹配、别名召回与语义向量),所有端点均提供 JSON 格式的高可用响应。
🛡️认证与通用规范
Base URL: https://api.yourdomain.com
Content-Type: 所有请求与响应的数据格式默认为 application/json。
鉴权说明: 为保障数据安全,所有的 API 请求均需进行身份验证。请在请求的 HTTP Header 中带上我们为您分配的 API 密钥:Authorization: Bearer YOUR_API_KEY
GET/api/search
核心搜索接口三路并行混合检索:精确查询、别名关联及深度向量语义召回。支持企业名称、个人姓名、船舶及地址的智能扩展与匹配。
Query Parameters
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| q | string | Yes | 搜索关键词(中英文均可,支持自然语言) |
| limit | integer | No | 最大返回条数,默认为 25 |
cURL Example
curl -X GET "https://api.yourdomain.com/api/search?q=huawei&limit=10" \ -H "Authorization: Bearer YOUR_API_KEY"Response Structure
{
"code": 200,
"results": [
{
"id": "u-xxx...",
"name": "Huawei Technologies Co., Ltd.",
"entity_type": "entity",
"country": "CN",
"is_china": true,
"source_lists": ["Entity List (EL) - Bureau of Industry and Security"],
"score": 0.98,
"match_type": "exact" // exact | alias | semantic
}
],
"expanded_keywords": ["huawei", "华为"]
}POST/api/rag/ask
RAG 知识库检索基于 RAG(Retrieval-Augmented Generation)技术,综合分析目标企业在制裁名单和官方文件库中的关联信息并生成研判摘要。
Body Schema (JSON)
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| q | string | Yes | 复杂问题的询问内容(例如 "分析某某公司最新的制裁依据") |
Fetch Example
fetch("https://api.yourdomain.com/api/rag/ask", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
},
body: JSON.stringify({ q: "What is the reason for OFAC sanctioning SenseTime?" })
})Response Structure
{
"code": 200,
"answer": "According to the OFAC designation, SenseTime was sanctioned due to its involvement in ... (AI generated summary)",
"references": [
{
"source": "OFAC SDN",
"content": "...",
"score": 0.85
}
]
}