携程汽车票API

携程汽车票API

1) 请求地址

https://bus.ctrip.com/index.php?param=/busList/getAjaxList&from=%E9%87%8D%E5%BA%86&to=%E9%BE%99%E5%85%B4&date=2020-09-03&sortName=from_time&sortType=asc&flash_type=table_select

2) 调用方式:HTTP get

3) 接口描述:

  • 接口描述详情

4) 请求参数:

GET参数:

字段名称 字段说明 类型 必填 备注
param   string Y -
from   string Y -
to   string Y -
date   string Y -
sortName   string Y -
sortType   string Y -
flash_type   string Y -

5) 请求返回结果:

{
    "code": 1,
    "message": "",
    "return": {
        "page": 1,
        "totalPage": 1,
        "count": 3,
        "html": "<!--<div class=\"info_title\">-->\n    <!--<strong>重庆 - 龙兴</strong>-->\n    <!---->\n<!--</div>-->\n<div class=\"search_cate\">\n    <div class=\"search_cate_list\">\n        <span class=\"search_cate_type\">出发时间</span>\n        <a href=\"javascript:void(0);\" class=\"no_limit selected f_time_range\" id=\"f_time_range\" val=\"all\">不限</a>\n        <div class=\"search_cate_cont\">\n            <a href=\"javascript:void(0);\" class=\"f_time_range\" val=\"1\">上午(06:00-12:00)</a>\n            <a href=\"javascript:void(0);\" class=\"f_time_range\" val=\"2\">下午(12:00-18:00)</a>\n            <a href=\"javascript:void(0);\" class=\"f_time_range\" val=\"3\">晚上(18:00-06:00)</a>\n        </div>\n    </div>\n    <div class=\"search_cate_list\">\n        <span class=\"search_cate_type\">出发车站</span>\n        <a href=\"javascript:void(0);\" class=\"no_limit selected f_from_station\" id=\"f_from_station\" val=\"all\">不限</a>\n        <a href=\"javascript:void(0);\" class=\"more_filter\">更多<b class=\"icon_show\"></b></a>\n        <div class=\"search_cate_cont more\" id=\"f_from_station_more\">\n                        <a href=\"javascript:void(0);\" class=\"f_from_station\" val=\"渝北双凤桥汽车站\">渝北双凤桥汽车站</a>\n                    </div>\n    </div>\n    <div class=\"search_cate_list\">\n        <span class=\"search_cate_type\">到达车站</span>\n        <a href=\"javascript:void(0);\" class=\"no_limit selected f_to_station\" id=\"f_to_station\" val=\"all\">不限</a>\n        <a href=\"javascript:void(0);\" class=\"more_filter\">更多<b class=\"icon_show\"></b></a>\n        <div class=\"search_cate_cont more\" id=\"f_to_station_more\">\n                        <a href=\"javascript:void(0);\" class=\"f_to_station\" val=\"际华园(龙兴)\">际华园(龙兴)</a>\n                        <a href=\"javascript:void(0);\" class=\"f_to_station\" val=\"龙兴\">龙兴</a>\n                        <a href=\"javascript:void(0);\" class=\"f_to_station\" val=\"龙兴古镇\">龙兴古镇</a>\n                    </div>\n    </div>\n</div>\n<!--模糊匹配-->\n\n<!--列表开始-->\n<table class=\"tb_railway_list nolayout\" id=\"table\" width=\"100%\">\n    <tr>\n    <th width=\"17%\"><a href=\"javascript:void(0);\" id=\"\" class=\"or_up current f_sort_list\" sort_name=\"from_time\" onclick=\"return sortObj(this);\">发/到时间<b class=\"icon_arrow_up\"></b></a></th>\n    <th width=\"20%\">发/到站</th>\n    <th width=\"18%\">车型/耗时</th>\n    <th width=\"17%\" class=\"price\"><a href=\"javascript:void(0);\" class=\"px_up f_sort_list\" sort_name=\"full_price\"  onclick=\"return sortObj(this);\">票价<b class=\"icon_arrow_up\"></b></a></th>\n    <th width=\"28%\"></th>\n</tr>\n\n<!--推荐火车票start-->\n<tr class=\"recom\" id=\"tuijian_train\" ></tr>\n<!--推荐火车票end-->\n<!--推荐玩乐start-->\n<tr class=\"recom\" id=\"tuijian_wanle\" ></tr>\n<!--推荐玩乐end-->    \n<tr >\n    <td class=\"time_box\">\n        \n                                 \t<span class=\"railway_time\">15:00</span><br />\n                        </td>\n\n    <td>\n        <span class=\"icon_start\"></span>渝北双凤桥汽车站<br />\n        <span class=\"icon_end\"></span>际华园(龙兴)    </td>\n    <td>\n                                    大型/普通<br />\n                        \t        <span class=\"ico_lsb\" data-role=\"jmp\" data-params=\"{\n\t\t\t\t\t\t\t\t\t\toptions:\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t type: &quot;jmp_text&quot;,\n\t\t\t\t\t\t\t\t\t\t\t\t template:&quot;#jmp_text&quot;,\n\t\t\t\t\t\t\t\t\t\t\t\t classNames:{\n\t\t\t\t\t\t\t\t\t\t\t\t\tboxType:&quot;jmp_text&quot;\n\t\t\t\t\t\t\t\t\t\t\t\t },\n\t\t\t\t\t\t\t\t\t\t\t\t &quot;content&quot;:{\n\t\t\t\t\t\t\t\t\t\t\t\t\t&quot;txt&quot;:&quot;<p><strong>流水班:</strong>发车时间不固定,在当日最晚发车时间前,到站凭票上车。</p>&quot;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\">流水班</span>\n        \n    </td>\n\n    <td class=\"price\" style=\"position: relative\">\n        <div class=\"railway_seat\">\n            <div class=\"price_r\">\n                <dfn>&yen;</dfn><span class=\"base_price base_full_price\" >13.00</span>\n                <br>\n            </div>\n        </div>\n    </td>\n\n<!--begin_service_time-->\n<!--end_service_time-->\n<!--phone_number-->\n<!--from_time-->\n<!--shift_type 0普通车 1流水车 2加班次-->\n\n    <td class=\"text_right\">\n        \n                    <b class=\"icon_tip\" data-role=\"jmp\" data-params='{options:{type:\"jmp_text\",template:\"#jmp_text\",classNames:{boxType:\"jmp_text\"},\"content\":{\"txt\":\"<ul class=\\\"t_jump_content\\\"><li>暂未到车站发售车票时间,选择预约购票后,预计2020-08-28号为您出票</li></ul>\"}}}'></b>&nbsp;&nbsp;\n            <input type=\"button\" class=\"btn_book btn_prebook\n                            goBook\n            \" data-type=\"first\" data-params=\"{\n            mustLogin:false,symbol:'YWNjhJTvwhzdLKI2Z0kYWQnkvb2nHkNmB1n4CnRXOHqYz.ng.ybp',from:'渝北',fromStation:'渝北双凤桥汽车站',\n            to:'际华园(龙兴)',toStation:'际华园(龙兴)',busNo:'5600',\n            date:'2020-09-03',type:'Y',time:'15:00',return_type:'',\n            discount_count:'',\n            discount_price:'',\n            active_stop_flag:'',\n            vendor_activity_id:'',\n            active_start_dttm:'',\n            active_end_dttm:'',\n            vendor_activity_flag:'0',vendor:'',\n            data_source:'',\n            begin_service_time:'<$bus[from_station_info][begin_service_time]>',\n            end_service_time:'<$bus[from_station_info][end_service_time]>',\n            phone_number:''}\" value=\"预约抢票\" />\n        \n    </td>\n    </tr>\n    <tr>\n        <td colspan=\"5\" style=\"padding:0;\" class=\"x_list\">\n        </td>\n    </tr>\n\n<tr >\n    <td class=\"time_box\">\n        \n                                 \t<span class=\"railway_time\">15:00</span><br />\n                        </td>\n\n    <td>\n        <span class=\"icon_start\"></span>渝北双凤桥汽车站<br />\n        <span class=\"icon_end\"></span>龙兴古镇    </td>\n    <td>\n                                    中型<br />\n                        \t        <span class=\"ico_lsb\" data-role=\"jmp\" data-params=\"{\n\t\t\t\t\t\t\t\t\t\toptions:\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t type: &quot;jmp_text&quot;,\n\t\t\t\t\t\t\t\t\t\t\t\t template:&quot;#jmp_text&quot;,\n\t\t\t\t\t\t\t\t\t\t\t\t classNames:{\n\t\t\t\t\t\t\t\t\t\t\t\t\tboxType:&quot;jmp_text&quot;\n\t\t\t\t\t\t\t\t\t\t\t\t },\n\t\t\t\t\t\t\t\t\t\t\t\t &quot;content&quot;:{\n\t\t\t\t\t\t\t\t\t\t\t\t\t&quot;txt&quot;:&quot;<p><strong>流水班:</strong>发车时间不固定,在当日最晚发车时间前,到站凭票上车。</p>&quot;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\">流水班</span>\n        \n    </td>\n\n    <td class=\"price\" style=\"position: relative\">\n        <div class=\"railway_seat\">\n            <div class=\"price_r\">\n                <dfn>&yen;</dfn><span class=\"base_price base_full_price\" >13.00</span>\n                <br>\n            </div>\n        </div>\n    </td>\n\n<!--begin_service_time-->\n<!--end_service_time-->\n<!--phone_number-->\n<!--from_time-->\n<!--shift_type 0普通车 1流水车 2加班次-->\n\n    <td class=\"text_right\">\n        \n                    <b class=\"icon_tip\" data-role=\"jmp\" data-params='{options:{type:\"jmp_text\",template:\"#jmp_text\",classNames:{boxType:\"jmp_text\"},\"content\":{\"txt\":\"<ul class=\\\"t_jump_content\\\"><li>暂未到车站发售车票时间,选择预约购票后,预计2020-08-28号为您出票</li></ul>\"}}}'></b>&nbsp;&nbsp;\n            <input type=\"button\" class=\"btn_book btn_prebook\n                            goBook\n            \" data-type=\"first\" data-params=\"{\n            mustLogin:false,symbol:'YWNjhJTvwhzdLKI2Z0k_T0FGU3UjjsM7odmZ8GQatGJXX_Gnvz6p',from:'渝北',fromStation:'渝北双凤桥汽车站',\n            to:'龙兴古镇',toStation:'龙兴古镇',busNo:'8800',\n            date:'2020-09-03',type:'Y',time:'15:00',return_type:'',\n            discount_count:'',\n            discount_price:'',\n            active_stop_flag:'',\n            vendor_activity_id:'',\n            active_start_dttm:'',\n            active_end_dttm:'',\n            vendor_activity_flag:'0',vendor:'',\n            data_source:'',\n            begin_service_time:'<$bus[from_station_info][begin_service_time]>',\n            end_service_time:'<$bus[from_station_info][end_service_time]>',\n            phone_number:''}\" value=\"预约抢票\" />\n        \n    </td>\n    </tr>\n    <tr>\n        <td colspan=\"5\" style=\"padding:0;\" class=\"x_list\">\n        </td>\n    </tr>\n\n<tr >\n    <td class=\"time_box\">\n        \n                                 \t<span class=\"railway_time\">18:30</span><br />\n                        </td>\n\n    <td>\n        <span class=\"icon_start\"></span>渝北双凤桥汽车站<br />\n        <span class=\"icon_end\"></span>龙兴    </td>\n    <td>\n                                    大型/普通<br />\n                                        约18分钟<br />\n            \t        <span class=\"ico_lsb\" data-role=\"jmp\" data-params=\"{\n\t\t\t\t\t\t\t\t\t\toptions:\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t type: &quot;jmp_text&quot;,\n\t\t\t\t\t\t\t\t\t\t\t\t template:&quot;#jmp_text&quot;,\n\t\t\t\t\t\t\t\t\t\t\t\t classNames:{\n\t\t\t\t\t\t\t\t\t\t\t\t\tboxType:&quot;jmp_text&quot;\n\t\t\t\t\t\t\t\t\t\t\t\t },\n\t\t\t\t\t\t\t\t\t\t\t\t &quot;content&quot;:{\n\t\t\t\t\t\t\t\t\t\t\t\t\t&quot;txt&quot;:&quot;<p><strong>流水班:</strong>发车时间不固定,在当日最晚发车时间前,到站凭票上车。</p>&quot;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\">流水班</span>\n        \n    </td>\n\n    <td class=\"price\" style=\"position: relative\">\n        <div class=\"railway_seat\">\n            <div class=\"price_r\">\n                <dfn>&yen;</dfn><span class=\"base_price base_full_price\" >13.00</span>\n                <br>\n            </div>\n        </div>\n    </td>\n\n<!--begin_service_time-->\n<!--end_service_time-->\n<!--phone_number-->\n<!--from_time-->\n<!--shift_type 0普通车 1流水车 2加班次-->\n\n    <td class=\"text_right\">\n        \n                    <b class=\"icon_tip\" data-role=\"jmp\" data-params='{options:{type:\"jmp_text\",template:\"#jmp_text\",classNames:{boxType:\"jmp_text\"},\"content\":{\"txt\":\"<ul class=\\\"t_jump_content\\\"><li>暂未到车站发售车票时间,选择预约购票后,预计2020-08-28号为您出票</li></ul>\"}}}'></b>&nbsp;&nbsp;\n            <input type=\"button\" class=\"btn_book btn_prebook\n                            goBook\n            \" data-type=\"first\" data-params=\"{\n            mustLogin:false,symbol:'YWNjhJTvwhzdLKI2Z0k0UXCozb6CrIvGnAC1cnP3uNJSxPliuYXp',from:'渝北',fromStation:'渝北双凤桥汽车站',\n            to:'龙兴',toStation:'龙兴',busNo:'5002',\n            date:'2020-09-03',type:'Y',time:'18:30',return_type:'',\n            discount_count:'',\n            discount_price:'',\n            active_stop_flag:'',\n            vendor_activity_id:'',\n            active_start_dttm:'',\n            active_end_dttm:'',\n            vendor_activity_flag:'0',vendor:'',\n            data_source:'',\n            begin_service_time:'<$bus[from_station_info][begin_service_time]>',\n            end_service_time:'<$bus[from_station_info][end_service_time]>',\n            phone_number:''}\" value=\"预约抢票\" />\n        \n    </td>\n    </tr>\n    <tr>\n        <td colspan=\"5\" style=\"padding:0;\" class=\"x_list\">\n        </td>\n    </tr>\n</table>\n<!--列表结束-->\n"
    }
}

6) 请求返回结果参数说明:

字段名称 字段说明 类型 必填 备注
code   string Y -
message   string Y -
return   string Y -
page   string Y -
totalPage   string Y -
count   string Y -
html   string Y -

猜你喜欢

转载自blog.csdn.net/qq_36664772/article/details/108254166