实名校验与文本工具 · util.text.sanitize
文本敏感个人信息(PII)一键脱敏清洗
自动识别并遮蔽文本中的手机号、身份证号、银行卡、邮箱及微信号,输出清理统计。
请求地址(支持 GET / POST)
POST https://www.xntou.cn/api/open/v1/util/text-sanitize
单次计费
¥0.01 / 1 点沙箱体验
免费 20 次/日⚡ 在线调试台(Sandbox Debugger)
实时返回结果
{
"error_code": 0,
"reason": "Success",
"api_code": "util.text.sanitize",
"result": {
"totalRedacted": 2
}
}
请求参数与返回字段说明
1. 请求参数
| 参数名 | 类型 | 必填 | 示例默认值 | 说明 |
|---|---|---|---|---|
text |
string | 必填 | 联系人张三 13800138000,微信: zhangsan_88,身份证 32058319900101001X。 |
待脱敏原始文本 |
2. 核心返回字段(result)
| 字段路径 | 类型 | 说明 |
|---|---|---|
result.sanitizedText |
string | 脱敏后安全文本 |
result.redactions |
object | 各类敏感信息命中次数 |
result.totalRedacted |
number | 累计脱敏项数 |
多语言接入代码示例
curl -s -X POST "https://www.xntou.cn/api/open/v1/util/text-sanitize" \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_APP_KEY" \
-d '{"text":"联系人张三 13800138000,微信: zhangsan_88。"}'