一个高效可靠的快递物流查询API接口,提供实时物流轨迹跟踪服务。通过简单的API调用,即可获取完整的快递物流信息
接口ID 61
请求方式 GET/POST
返回格式 JSON
HTTP/HTTPS 支持
接口价格 低至¥0.0035/次
接口地址 https://yilianshuju.com/api/
参数说明 获取秘钥
| 参数 | 必填 | 说明 |
|---|---|---|
| id | 是 | 接口ID |
| key | 是 | 对接秘钥 |
| number | 是 | 运单编号 |
| sort | 否 | 物流明细排序,desc:倒序,asc:升序,默认asc |
返回参数
| 名称 | 说明 | ||
|---|---|---|---|
| expressCode | 快递公司编号 | ||
| expressCompanyName | 快递公司名称 | ||
| number | 运单编号 | ||
| logisticsStatusDesc | 物流状态描述 | ||
| theLastMessage | 物流最新信息 | ||
| theLastTime | 物流更新时间 | ||
| takeTime | 从揽收到送达所耗时间 | ||
| courier | 快递员 | ||
| courierPhone | 快递员联系方式 | ||
| logisticsTraceDetails:物流明细↓ | |||
| time | 物流变更时间 | ||
| desc | 物流信息描述 | ||
| areaName | 所在地区 | ||
| code | 200:成功; 计费 | ||
| user_info | 用户信息; zid:用户ID; cost:单价;rmb:余额; login_time:最近登录; | ||
返回示例
{
"code": 200,
"msg": "success",
"data": {
"expressCode": "JD",
"expressCompanyName": "京东物流",
"number": "JDVC33609****09",
"logisticsStatusDesc": "已签收",
"theLastMessage": "您的快件已送达,快递员:***,联系电话:***,营业部电话:***,每一次托付都是信任的延续,京东物流感恩与您共赴这一程。",
"theLastTime": "2025-11-27 11:28:08",
"takeTime": "1天16小时36分",
"courier": "杨*",
"courierPhone": "*****",
"logisticsTraceDetails": [
{
"areaName": "莆田市",
"time": "2025-11-25 14:55:20",
"desc": "揽收任务已分配给快递员陈乐伟,联系电话:***"
},
{
"areaName": "莆田市",
"time": "2025-11-25 18:51:10",
"desc": "京东快递已取件,每份期待,定当全力奔赴。"
},
{
"areaName": "莆田市",
"time": "2025-11-25 18:51:12",
"desc": "您的快件已由【莆田鲤南站】揽收完成"
},
{
"areaName": "莆田市",
"time": "2025-11-25 18:51:12",
"desc": "您的快件已到达【莆田鲤南站】,准备装车"
},
{
"areaName": "莆田市",
"time": "2025-11-25 19:40:23",
"desc": "您的快件已发车"
},
{
"areaName": "莆田市",
"time": "2025-11-25 19:44:03",
"desc": "您的快件已发车"
},
{
"areaName": "泉州市",
"time": "2025-11-25 22:04:38",
"desc": "您的快件已到达【泉州集散分拣中心】"
},
{
"areaName": "泉州市",
"time": "2025-11-25 22:04:57",
"desc": "您的快件已到达【泉州集散分拣中心】"
},
{
"areaName": "泉州市",
"time": "2025-11-25 22:15:32",
"desc": "泉州集散分拣中心分拣中心已收箱,箱号BC1002251125241461629108"
}
]
},
"user_info": {
"zid": "217",
"cost": "0.00350",
"login_time": "2025-11-29 13:14:01"
}
}
服务级错误码(code)
| 错误码 | 说明 |
|---|---|
| 201 | 请求参数错误 |
| 202 | 查询失败 |
| 203 | 请求错误 |
| 204 | 查无结果 |
系统级错误码(error_code)
| 错误码 | 说明 |
|---|---|
| 101 | 错误的请求KEY |
| 102 | 被禁止的KEY |
| 103 | 被禁止的IP |
| 104 | 非IP白名单 |
| 105 | 此IP请求超过限制 |
| 106 | 未知的请求源 |
| 107 | 接口维护 |
| 108 | 余额不足 |
| 109 | 未完成认证 |
| 110 | 接口不存在 |
PHP代码示例:
<?php
//GET请求记得用:urlencode
$api_url='https://yilianshuju.com/api/';
$api_id='接口ID';
$key='秘钥';
$post_arr=array('id'=>$api_id,'key'=>$key,'phone'=>'参数值');
$post=http_build_query($post_arr);
$data=get_curl($api_url,$post);
print_r($data);
function get_curl($url, $post=0, $referer=0, $cookie=0, $header=0, $ua=0, $nobaody=0, $addheader=0){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$httpheader[] = "Accept: */*";
$httpheader[] = "Accept-Encoding: gzip,deflate,sdch";
$httpheader[] = "Accept-Language: zh-CN,zh;q=0.8";
$httpheader[] = "Connection: close";
if($addheader){
$httpheader = array_merge($httpheader, $addheader);
}
curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
if ($post) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
if ($header) {
curl_setopt($ch, CURLOPT_HEADER, true);
}
if ($cookie) {
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
}
if($referer){
if($referer==1){
curl_setopt($ch, CURLOPT_REFERER, 'http://m.qzone.com/infocenter?g_f=');
}else{
curl_setopt($ch, CURLOPT_REFERER, $referer);
}
}
if ($ua) {
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
}
else {
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Linux; U; Android 4.0.4; es-mx; HTC_One_X Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0");
}
if ($nobaody) {
curl_setopt($ch, CURLOPT_NOBODY, 1);
}
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$ret = curl_exec($ch);
curl_close($ch);
return $ret; }
?>