公交车实时表查询
GET
无需 Key
运行中
接口简介
公交车实时站点查询API,输入城市及站点名称,即可获取该站点途经公交线路的实时动态,包含车辆到站时间、剩余站点、票价、车牌号等信息,数据实时更新,适配出行规划、交通类APP、便民服务平台等场景。
接口地址
https://api.lolimi.cn/API/che/api请求示例
测试访问https://api.lolimi.cn/API/che/api?city=深圳&line=高新南地铁站返回预览
JSON{
"code": 200,
"city": "深圳",
"line": "高新南地铁站",
"car_count": 10,
"data": [
{
"lines": "49路",
"price": "2.5元",
"endSn": "深湾汇云中心公交首末站",
"busId": "粤B00611D",
"reachtime": "2025-12-15 15:59",
"travelTime": "42分",
"surplus": "35站"
},
{
"lines": "E39路",
"price": "8元",
"endSn": "科技生态园公交首末站",
"busId": "粤B08400D",
"reachtime": "2025-12-15 15:22",
"travelTime": "5分",
"surplus": "1站"
},
{
"lines": "E39路",
"price": "8元",
"endSn": "科技生态园公交首末站",
"busId": "粤B09183D",
"reachtime": "2025-12-15 15:27",
"travelTime": "10分",
"surplus": "4站"
},
{
"lines": "M313路",
"price": "2.5元",
"endSn": "深湾汇云中心公交首末站",
"busId": "粤B43674D",
"reachtime": "2025-12-15 16:02",
"travelTime": "45分",
"surplus": "26站"
},
{
"lines": "M355路",
"price": "2.5元",
"endSn": "深湾汇云中心公交首末站",
"busId": "粤B05820D",
"reachtime": "2025-12-15 15:20",
"travelTime": "3分",
"surplus": "1站"
},
{
"lines": "M355路",
"price": "2.5元",
"endSn": "深湾汇云中心公交首末站",
"busId": "粤B04909D",
"reachtime": "2025-12-15 15:46",
"travelTime": "29分",
"surplus": "13站"
},
{
"lines": "高峰专线36号路",
"price": "2.5元",
"endSn": "世界之窗地铁公交接驳站",
"busId": "1-1651",
"reachtime": "2025-12-15 15:18",
"travelTime": "1分",
"surplus": "即将到站"
},
{
"lines": "高峰专线36号路",
"price": "2.5元",
"endSn": "世界之窗地铁公交接驳站",
"busId": "2-1397",
"reachtime": "2025-12-15 15:23",
"travelTime": "6分",
"surplus": "4站"
},
{
"lines": "高峰专线54号路",
"price": "3元",
"endSn": "科技生态园公交首末站",
"busId": "2-2571",
"reachtime": "2025-12-15 15:22",
"travelTime": "5分",
"surplus": "3站"
},
{
"lines": "高峰专线54号路",
"price": "3元",
"endSn": "科技生态园公交首末站",
"busId": "2-1858",
"reachtime": "2025-12-15 15:32",
"travelTime": "15分",
"surplus": "6站"
}
]
}
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| city | string | Required | 城市名称 |
| line | string | Required | 站点名称 |
| o | string | Optional | 可选不填或填2填2代表查询反方向 |
| type | string | Required | 可选json/text默认text |
返回参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| code | int | 接口响应状态码,200表示获取成功 |
| city | string | 查询的城市名称 |
| line | string | 查询的公交站点名称 |
| car_count | int | 该站点当前实时运行的公交车辆总数 |
| data | array | 公交实时动态数据列表 |
| data[0].lines | string | 公交线路名称 |
| data[0].price | string | 该线路公交票价 |
| data[0].endSn | string | 该线路公交终点站名称 |
| data[0].busId | string | 公交车辆车牌号 |
| data[0].reachtime | string | 车辆预计到站时间 |
| data[0].travelTime | string | 车辆到达该站点预计耗时 |
| data[0].surplus | string | 车辆距离该站点剩余站点数(含即将到站提示) |
参数配置
登录获取 KeyResponseWaiting...
<?php
$url = "https://api.lolimi.cn/API/che/api";
$params = array (
'city' => 'value',
'line' => 'value',
'o' => 'value',
'type' => 'value',
);
$url .= '?' . http_build_query($params);
$res = file_get_contents($url);
echo $res;