接口目录
接口文档
全国快递物流状态查询,支持国内主流快递
选择开通时长:
接口地址:https://api.itapi.cn/api/kuaidi/index
返回格式:application/json
请求方式:HTTPSGET
请求参数:
| 参数名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 用户请求密钥,可在 密钥管理页面 申请 |
| number | string | 是 | 快递单号 |
| com | string | 是 | 快递公司编号,默认自动获取,可能会失败 |
返回参数:
| 参数名称 | 类型 | 说明 |
|---|---|---|
| nu | string | 快递单号 |
| com | string | 快递公司 |
| state | string | 快递状态,1正常,2派送中,3已签收,4退回,5其他问题 |
| info | string | 快递状态内容 |
| info.time | string | 状态更新时间 |
| info.content | string | 状态更新内容 |
| info.status | string | 快递状态, WAIT_ACCEPT:待揽收,ACCEPT:已揽收,TRANSPORT:运输中,DELIVERING:派件中,AGENT_SIGN:代签收,SIGN:已签收,FAILED:快递异常 |
| info.status_desc | string | 快递状态描述 |
系统错误代码:
| 代号 | 说明 |
|---|---|
| 200 | 成功 |
| 400 | 限制或者错误 |
| 403 | 权限问题 |
| 500 | 服务器内部错误 |
| 会员套餐 | 套餐规格 | 价格 | ||
|---|---|---|---|---|
| 免费会员 | 50次 | 0.00 元 | - | |
| 月付会员 | 不限 次 / 天 | 38 元 / 月 | - | |
| 年付会员 | 不限 次/天 | 380 元 / 年 | - | |
| * 专业会员指标注会员免费的产品,不支持专业会员的产品无法免费。 | ||||
本站接口已整体接入 MCP(Model Context Protocol)。把下面的端点填进支持 MCP 的客户端(Cherry Studio、Cursor、Claude Desktop 等),即可让大模型以「工具」的方式调用本接口;调用等同于用你的密钥请求本接口,鉴权、计费、限流、日志与直接调用接口完全一致。
MCP 端点:https://api.itapi.cn/mcp
本接口工具名:kuaidi_index(由接口路径自动生成)
鉴权方式:请求头 Authorization: Bearer 你的密钥
工具参数:
| 参数名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| number | string | 否 | 快递单号 |
| com | string | 否 | 快递公司编号,默认自动获取,可能会失败 |
* 密钥 key 由鉴权请求头传递,不作为工具参数填写。 | |||
调用示例(JSON-RPC):
复制{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "kuaidi_index",
"arguments": {
"number": "<number>",
"com": "<com>"
}
}
}
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_index","arguments":{"number":"<number>","com":"<com>"}}}'
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_index","arguments":{"number":"<number>","com":"<com>"}}}
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 获取,本站全部接口都会映射为一个工具。