首頁 交通出行 航班查詢
航班查詢

航班查詢

  • 1553
  • 2111
兩個城市之間的實時航班信息、票價查詢。航班具體信息,支持城市等。
450.00/10000次
申請就送10次
https://api.jisuapi.com/flight/query
JSON
GET POST
https://api.jisuapi.com/flight/query?city=TYN&endcity=RMQ&flightno=&appkey=yourappkey

請求參數:

API在線測試
參數名稱類型必填說明
city string 出發城市/三字碼
endcity string 到達城市/三字碼
date string 日期 默認當天

返回參數:

參數名稱類型說明
city string 出發城市
endcity string 到達城市
flightno string 航班號
realflightno string 真實承運人
departportcode string 出發機場代號
arrivalportcode string 到達機場代號
departterminal string 出發機場航站樓
arrivalterminal string 到達機場航站樓
departdate string 計劃起飛日期
arrivaldate string 計劃到達日期
departtime string 預計到達時間
arrivaltime string 預計到達時間
departdateadd string 起飛日期修正(+1表示起飛日期是查詢日期的下一天)
arrivaldateadd string 到達日期修正(+1表示到達日期是查詢日期的下一天)
craft string 機型
stopnum string 經停次數
costtime string 用時
punctualrate string 準點率
pricelist string 價格表
cabinname string 艙位名稱
cabincode string 艙位代碼
price string 價格
discount string 折扣
minprice string 最低價
airporttax string 機建費
fueltax string 燃油費
food string 餐食標志
isasr string ASR支持標志
iseticket string 電子票標志
iscodeshare string 代碼共享標志
airline string 航空公司

請求代碼:

查看代碼
<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$city = 'TYN';  //出發城市
$endcity = 'RMQ'; //到達城市
$flightno =''; //航班號
$url = "https://api.jisuapi.com/flight/query?city=$city&endcity=$endcity&flightno=$flightno&appkey=$appkey";

$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);

if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}

$result = $jsonarr['result'];
echo $result['city'].' '.$result['endcity'].' '.$result['flightno'].'
'; foreach($result['list'] as $val) { echo $val['flightno'].' '.$val['realflightno'].' '.$val['departportcode'].' '.$val['arrivalportcode'].' '. $val['departterminal'].' '.$val['arrivalterminal'].' '.$val['departdate'].' '.$val['arrivaldate']. ' '. $val['departtime'].' '.$val['arrivaltime'].' '.$val['departdateadd'].' '.$val['arrivaldateadd']. ' '. $val['craft'].' '.$val['stopnum'].' '. $val['costtime'].' '.$val['punctualrate'].'
'; foreach($val['pricelist'] as $v) { echo $v['cabinname'].' '.$v['cabincode'].' '.$v['price'].' '.$v['discount'].'
'; } echo $val['minprice'].' '. $val['airporttax'].' '.$val['fueltax'].' '. $val['food'].' '.$val['isasr'].' '. $val['iseticket'].' '.$val['iscodeshare'].'
'; }

JSON返回示例 :

{
	"status": 0,
	"msg": "ok",
	"result": {
		"city": "SHA",
		"endcity": "CAN",
		"flightno": "",
		"list": [{
			"flightno": "BA2310",
			"realflightno": "MU2882",
			"departportcode": "PVG",
			"arrivalportcode": "NKG",
			"departterminal": "T1",
			"arrivalterminal": "T2",
			"departdate": "2018-06-05",
			"arrivaldate": "2018-06-05",
			"departtime": "22:50",
			"arrivaltime": "23:55",
			"departdateadd": "0",
			"arrivaldateadd": "0",
			"craft": "320",
			"stopnum": "0",
			"costtime": "1:05",
			"punctualrate": "95",
			"pricelist": [],
			"minprice": "1070",
			"airporttax": "50",
			"fueltax": "10",
			"food": "0",
			"isasr": "0",
			"iseticket": "1",
			"iscodeshare": "1"
		}, {
			"flightno": "MU2882",
			"realflightno": "",
			"departportcode": "PVG",
			"arrivalportcode": "NKG",
			"departterminal": "T1",
			"arrivalterminal": "T2",
			"departdate": "2018-06-05",
			"arrivaldate": "2018-06-05",
			"departtime": "22:50",
			"arrivaltime": "23:55",
			"departdateadd": "0",
			"arrivaldateadd": "0",
			"craft": "320",
			"stopnum": "0",
			"costtime": "1:05",
			"punctualrate": "95",
			"pricelist": [{
				"cabinname": "頭等艙",
				"cabincode": "F",
				"price": "2350",
				"discount": "220"
			}, {
				"cabinname": "公務艙",
				"cabincode": "J",
				"price": "2030",
				"discount": "190"
			}, {
				"cabinname": "公務艙",
				"cabincode": "C",
				"price": "1280",
				"discount": "120"
			}, {
				"cabinname": "公務艙",
				"cabincode": "D",
				"price": "1180",
				"discount": "110"
			}, {
				"cabinname": "公務艙",
				"cabincode": "Q",
				"price": "1120",
				"discount": "105"
			}, {
				"cabinname": "公務艙",
				"cabincode": "I",
				"price": "910",
				"discount": "85"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "Y",
				"price": "1070",
				"discount": "100"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "B",
				"price": "1060",
				"discount": "99"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "M",
				"price": "970",
				"discount": "91"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "E",
				"price": "870",
				"discount": "81"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "K",
				"price": "760",
				"discount": "71"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "L",
				"price": "710",
				"discount": "66"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "N",
				"price": "650",
				"discount": "61"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "R",
				"price": "550",
				"discount": "51"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "S",
				"price": "500",
				"discount": "47"
			}, {
				"cabinname": "經濟艙",
				"cabincode": "V",
				"price": "450",
				"discount": "42"
			}],
			"minprice": "1070",
			"airporttax": "50",
			"fueltax": "10",
			"food": "0",
			"isasr": "1",
			"iseticket": "1",
			"iscodeshare": "0"
		}]
	}
}
                    

API錯誤碼:

代號說明
201 航班號和城市都為空
202 航班號為空
210 未知錯誤

系統錯誤碼:

代號說明
101 APPKEY為空或不存在
102 APPKEY已過期
103 APPKEY無請求此數據權限
104 請求超過次數限制
105 IP被禁止
106 IP請求超過限制
107 接口維護中
108 接口已停用
計次套餐套餐規格價格
免費套餐 10次 0元 ≈0元/次
Level1 10000次 450.00元 ≈0.045元/次
Level2 20000次 890.00元 ≈0.0445元/次
Level3 50000次 2200.00元 ≈0.044元/次
Level4 100000次 4300.00元 ≈0.043元/次

活動推薦ACTIVITY 更多

  • orc活動

其它推薦RECOMMENDED DATA 更多

2021的欢乐真人麻将 mg真人在线游戏平台 体彩顶呱刮过期 六肖中特期期准管家笼 DS视讯-官网 辽宁11选5缩水 极速飞艇信誉平台 刘佰温四肖中特期免费 DG视讯官网 - 首页 河内5分彩开奖号码 江苏快三走势图基本 宁夏11选5推荐 极速飞艇是真的吗 云南快乐10分中奖规则 甘肃快3中奖规则 安徽快3群是真的吗 pk10投注模式