快递公司识别

GETPOST 快递查询

根据快递单号自动识别快递公司

GET https://api.tinyaii.cn/v1/express/detect

请求参数

参数名类型必填说明示例
numberstring必填快递单号SF1234567890

返回字段

字段类型说明
codeint状态码
carrierstring快递公司名称
codestring快递公司编码
numberstring快递单号

返回示例

{
  "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 换成你的密钥即可直接运行。密钥只保存在你自己的设备上。