六派数据-长途汽车
  • ID

    35

  • 收藏

    232

  • 使用

    543

长途汽车 限时特价 优质

提供全国主要城市的长途汽车时刻查询API,汽车站查询API。
套餐
20次 10000次 50000次 100000次 500000次
价格

立即申请 收藏数据 首次申请赠送20次免费调用
  • 站站查询
  • 城城查询
  • 车站查询

基本信息

  • 接口地址: https://open.6api.net/bus/station2c
  • 支持格式: JSON,JSONP
  • 请求方法: GET POST
  • 请求示例: https://open.6api.net/bus/station2c?appkey=yourappsecret
  • 接口备注: 通过输入始发车站与到达车站名称查询信息

请求参数 API在线测试

参数名称 类型 必填 说明
fromCity string 出发城市
toCity string 到达城市
fromStation string 出发车站
toStation string 到达车站
date string 查询日期

返回参数

参数名称 类型   说明
fromCity string   出发城市
toCity string   到达城市
fromStation string   出发车站
toStation string   到达车站
toStationShow string   到达站名称
startDate string   出发日期
startTime string   出发时间
price string   票价
typeDesc string   班次说明
busType string   车型
costTime string   预计时间
isWayStation string   是否中途站

请求代码 查看代码

  • PHP
  • JAVA
  • Python
require_once("curl.func.php");

$method = "POST";
$url = "https://open.6api.net/bus/station2c";
$headers = NULL;
$params = array(  
    "appkey" => "yourappsecret",
    "fromCity" => "北京",
    "toCity" => "张家口",
    "fromStation" => "六里桥客运站",
    "toStation" => "张家口(西沙河)",
    "date" => "2025-02-24"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
    $body = json_decode($result["body"], TRUE);
    $status_code = $body["status"];
    if ($status_code == "200") { 
        var_dump($body["result"]);
    }else
        var_dump($body); 
}else  
    echo "发送请求失败";

JSON返回示例

{
    "status": 200,
    "msg": "OK",
    "result": [
        {
            "fromCity": "北京",
            "toCity": "张家口",
            "fromStation": "六里桥客运站",
            "toStation": "张家口",
            "toStationShow": "张家口",
            "startDate": "2025-02-24",
            "startTime": "07:30",
            "price": 70,
            "typeDesc": "多班次滚动发车,每班间隔一段时间发车/坐满发车",
            "busType": "普通大巴",
            "costTime": "约4时30分",
            "isWayStation": false
        },
        {
            "fromCity": "北京",
            "toCity": "张家口[西沙河]",
            "fromStation": "六里桥客运站",
            "toStation": "张家口(西沙河)",
            "toStationShow": "张家口(西沙河)",
            "startDate": "2025-02-24",
            "startTime": "07:30",
            "price": 70,
            "typeDesc": "多班次滚动发车,每班间隔一段时间发车/坐满发车",
            "busType": "普通大巴",
            "costTime": "约3时30分",
            "isWayStation": false
        },
        {
            "fromCity": "北京",
            "toCity": "张家口",
            "fromStation": "六里桥客运站",
            "toStation": "张家口",
            "toStationShow": "张家口",
            "startDate": "2025-02-24",
            "startTime": "08:50",
            "price": 70,
            "typeDesc": "多班次滚动发车,每班间隔一段时间发车/坐满发车",
            "busType": "普通大巴",
            "costTime": "约4时30分",
            "isWayStation": false
        }
    ]
}

    数据信息

  • 今日调用: 60,484  次
  • 客服电话: 010-8639-9970
  • 客服邮箱: kf@ksmsoft.net
  • 售前客服:
  • 售后技术:

长途汽车问答专区

问答专区

相关资讯

其他推荐