快递公司识别
根据快递单号自动识别快递公司
GET
https://api.tinyaii.cn/v1/express/detect
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| number | string | 必填 | 快递单号 | SF1234567890 |
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码 |
| carrier | string | 快递公司名称 |
| code | string | 快递公司编码 |
| number | string | 快递单号 |
返回示例
{
"code": 200,
"data": {
"carrier": "顺丰速运",
"code": "sf",
"number": "SF1234567890"
},
"message": "success"
}
调用示例
curl "https://api.tinyaii.cn/v1/express/detect?number=SF1234567890" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.tinyaii.cn/v1/express/detect?number=SF1234567890", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
console.log(await res.json());import requests
resp = requests.get(
"https://api.tinyaii.cn/v1/express/detect",
params={"number": "SF1234567890"},
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=10,
)
print(resp.json())把 YOUR_API_KEY 换成你的密钥即可直接运行。密钥只保存在你自己的设备上。