接口目录
接口文档
支持国内外1500多家快递物流公司,提供物流轨迹,与官网同步数据更新。
≈0.00833/次
≈0.0045/次
≈0.004/次
≈0.0037/次
输入充值金额:
接口地址:https://api.itapi.cn/api/kuaidi/v2
返回格式:application/json
请求方式:HTTPSGET
请求参数:
| 参数名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 用户请求密钥,可在 密钥管理页面 申请 |
| com | string | 否 | 快递公司名(默认自动获取) |
| number | string | 是 | 快递单号 |
| phone | string | 否 | 收件人或寄件人电话号码后四位,仅顺丰需要 |
返回参数:
| 参数名称 | 类型 | 说明 |
|---|---|---|
| state | int | 0 查询成功 1 输入参数错误 2 查不到物流信息 3 单号不符合规则 4 快递公司编码不符合规则 5 快递查询渠道异常 6 auto时未查到单号对应的快递公司,请指定快递公司编码 7 单号与手机号不匹配 其他参数:接口调用失败 101 揽件 102 在途中 103 派送中 104 已签收 (完结状态) 105 用户拒签 106 疑难件 107 无效单 (完结状态) 108 超时单 109 签收失败 110 退回 111 转投 112 待签 |
| com | string | 快递公司编码 |
| tel | string | 快递公司联系方式 |
| data.time | string | 发生的时间 |
| data.context | string | 跟踪信息 |
| data.location | string | 位置对应的坐标信息,坐标系是:GCJ-02 |
| data.address | string | 位置信息 |
| data.status | string | 101 揽件 102 在途中 103 派送中 104 已签收 (完结状态) 105 用户拒签 106 疑难件 107 无效单 (完结状态) 108 超时单 109 签收失败 110 退回 111 转投 112 待签 |
| com_name | string | 快递公司名称 |
| delivery_time | string | 预计到达时间 |
| possible_com_list | array | 仅自动获取快递公司时查询失败返回 |
| possible_com_list.com | string | 快递公司编码 |
| possible_com_list.com_name | string | 快递公司名称 |
| update_time | string | 更新时间 |
| nu | string | 快递单号 |
| logo | string | 快递公司logo(暂无) |
返回示例:
系统错误代码:
| 代号 | 说明 |
|---|---|
| 200 | 成功 |
| 400 | 限制或者错误 |
| 403 | 权限问题 |
| 500 | 服务器内部错误 |
| 按量套餐 | 套餐规格 | 价格 | ||
|---|---|---|---|---|
| 所有会员 | 不限 次/天 | 10点 / 次 | ≈0.01元 / 次 | |
| * 点数支持所有标注为按量计费的产品抵扣。 | ||||
| 使用期限 | 套餐规格 | 价格 | ||
|---|---|---|---|---|
| 一个月 | 1200 次 | 10 元 | 0.008/次 | |
| 一年 | 10000 次 | 45 元 | 0.005/次 | |
| 一年 | 100000 次 | 400 元 | 0.004/次 | |
| 一年 | 270000 次 | 1000 元 | 0.004/次 | |
| * 套餐使用时限为订购之日起开始计算,每日请求限制无限制,用完即止。 | ||||
本站接口已整体接入 MCP(Model Context Protocol)。把下面的端点填进支持 MCP 的客户端(Cherry Studio、Cursor、Claude Desktop 等),即可让大模型以「工具」的方式调用本接口;调用等同于用你的密钥请求本接口,鉴权、计费、限流、日志与直接调用接口完全一致。
MCP 端点:https://api.itapi.cn/mcp
本接口工具名:kuaidi_v2(由接口路径自动生成)
鉴权方式:请求头 Authorization: Bearer 你的密钥
工具参数:
| 参数名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| com | string | 否 | 快递公司名(默认自动获取) |
| number | string | 是 | 快递单号 |
| phone | string | 否 | 收件人或寄件人电话号码后四位,仅顺丰需要 |
* 密钥 key 由鉴权请求头传递,不作为工具参数填写。 | |||
调用示例(JSON-RPC):
复制{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "kuaidi_v2",
"arguments": {
"com": "<com>",
"number": "<number>",
"phone": "<phone>"
}
}
}
cURL 调用:
复制curl -X POST 'https://api.itapi.cn/mcp' \
-H 'Authorization: Bearer 你的密钥' \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"kuaidi_v2","arguments":{"com":"<com>","number":"<number>","phone":"<phone>"}}}'
Python 调用:
复制import requests
url = 'https://api.itapi.cn/mcp'
headers = {'Authorization': 'Bearer 你的密钥', 'Content-Type': 'application/json'}
payload = {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"kuaidi_v2","arguments":{"com":"<com>","number":"<number>","phone":"<phone>"}}}
print(requests.post(url, json=payload, headers=headers, timeout=60).json())
客户端配置:
复制{
"mcpServers": {
"itapi": {
"type": "streamable-http",
"url": "https://api.itapi.cn/mcp",
"headers": {
"Authorization": "Bearer 你的密钥"
}
}
}
}
tools/list 获取,本站全部接口都会映射为一个工具。