飞机航班信息查询(国内)

查询国内所有航线航班信息,提供最低价格信息。

  • 0元/10次
  • 10元 / 800次
  • 100元 / 9000次
  • 500元 / 50000次
  • 1000元 / 120000次
  • 10次
  • 0.0
  • 支付宝
  • 暂无。
  • 免费试用

    免费提供试用服务
    满意再下单

  • 服务保障

    客服极速响应
    快速解决客户问题

  • 技术支持

    专业技术团队
    为客户提供技术支持

API接口
  • 飞机航班信息查询

飞机航班信息查询

接口地址:http://apigateway.jianjiaoshuju.com/api/v_1/air.html

请求方式:POST

返回类型:JSON

调试工具: 登录后方可调试

请求参数(Headers)
名称 类型 是否必须 描述
appCode STRING 必选 鉴权AppCode
appKey STRING 必选 鉴权AppKey
appSecret STRING 必选 鉴权AppSecret
请求参数(Body)
名称 类型 是否必须 描述
leave_code STRING 必选 出发城市code,全球城市code见产品说明
arrive_code STRING 必选 到达城市code,全球城市code见产品说明
query_date STRING 必选 航班日期,格式:yyyy-MM-dd,如 213-01-0
请求示例
  • curl
  • Java
  • C#
  • PHP
  • Python
  • ObjectC
curl -i -X POST 'http://apigateway.jianjiaoshuju.com/api/v_1/air.html' -H 'AppCode:你自己的AppCode' -H 'AppKey:你自己的AppKey' -H 'AppSecret:你自己的AppSecret' --data 'arrive_code=arrive_code&leave_code=leave_code&query_date=query_date'
public static void main(String[] args) {
	String host = "http://apigateway.jianjiaoshuju.com";
	String path = "/api/v_1/air.html";
	String method = "POST";
	String appcode = "你自己的AppCode";
	String appKey = "你自己的AppKey";
	String appSecret = "你自己的AppSecret";
	Map headers = new HashMap();
	headers.put("appcode",appcode);
	headers.put("appKey",appKey);
	headers.put("appSecret",appSecret);
	headers.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	Map querys = new HashMap();
	Map bodys = new HashMap();
	bodys.put("arrive_code", "arrive_code");
	bodys.put("leave_code", "leave_code");
	bodys.put("query_date", "query_date");
	try {
		/**
		* 重要提示如下:
		* HttpUtils请从
		* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java
		* 下载
		*
		* 相应的依赖请参照
		* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml
		*/
		HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys);
		System.out.println(response.toString());
		//获取response的body
		//System.out.println(EntityUtils.toString(response.getEntity()));
	} catch (Exception e) {
		e.printStackTrace();
	}
}
	    													
//using System.IO;
//using System.Text;
//using System.Net;
//using System.Net.Security;
//using System.Security.Cryptography.X509Certificates;

        private const String host = "http://apigateway.jianjiaoshuju.com";
        private const String path = "/api/v_1/air.html";
        private const String method = "POST";
        private const String appcode = "你自己的AppCode";
        private const String appKey = "你自己的AppKey";
        private const String appSecret = "你自己的AppSecret";

        static void Main(string[] args)
        {
            String querys = "";
            String bodys = "arrive_code=arrive_code&leave_code=leave_code&query_date=query_date";
            String url = host + path;
            HttpWebRequest httpRequest = null;
            HttpWebResponse httpResponse = null;

            if (0 < querys.Length)
            {
                url = url + "?" + querys;
            }

            if (host.Contains("https://"))
            {
                ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
                httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
            }
            else
            {
                httpRequest = (HttpWebRequest)WebRequest.Create(url);
            }
            httpRequest.Method = method;
            httpRequest.Headers.Add("appcode",appcode);
            httpRequest.Headers.Add("appKey",appKey);
            httpRequest.Headers.Add("appSecret",appSecret);
            //根据API的要求,定义相对应的Content-Type
            httpRequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
            if (0 < bodys.Length)
            {
                byte[] data = Encoding.UTF8.GetBytes(bodys);
                using (Stream stream = httpRequest.GetRequestStream())
                {
                    stream.Write(data, 0, data.Length);
                }
            }
            try
            {
                httpResponse = (HttpWebResponse)httpRequest.GetResponse();
            }
            catch (WebException ex)
            {
                httpResponse = (HttpWebResponse)ex.Response;
            }

            Console.WriteLine(httpResponse.StatusCode);
            Console.WriteLine(httpResponse.Method);
            Console.WriteLine(httpResponse.Headers);
            Stream st = httpResponse.GetResponseStream();
            StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
            Console.WriteLine(reader.ReadToEnd());
            Console.WriteLine("\n");

        }

        public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
        {
            return true;
        }
<?php
    $host = "http://apigateway.jianjiaoshuju.com";
    $path = "/api/v_1/air.html";
    $method = "POST";
    $appcode = "你自己的AppCode";
    $appKey = "你自己的AppKey";
    $appSecret = "你自己的AppSecret";
    $headers = array();
    array_push($headers, "appcode:" . $appcode);
    array_push($headers, "appKey:" . $appKey);
    array_push($headers, "appSecret:" . $appSecret);
    //根据API的要求,定义相对应的Content-Type
    array_push($headers, "Content-Type".":"."application/x-www-form-urlencoded; charset=UTF-8");
    $querys = "";
    $bodys = "arrive_code=arrive_code&leave_code=leave_code&query_date=query_date";
    $url = $host . $path;

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, false);
    if (1 == strpos("$".$host, "https://"))
    {
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    }
    curl_setopt($curl, CURLOPT_POSTFIELDS, $bodys);
    echo curl_exec($curl);
?>

import urllib, urllib2, sys

host = 'http://apigateway.jianjiaoshuju.com'
path = '/api/v_1/air.html'
method = 'POST'
appcode = '你自己的AppCode'
appKey = '你自己的AppKey'
appSecret = '你自己的AppSecret'
querys = ''
bodys = {}
url = host + path

bodys['arrive_code'] = '''arrive_code'''
bodys['leave_code'] = '''leave_code'''
bodys['query_date'] = '''query_date'''
post_data = urllib.urlencode(bodys)
request = urllib2.Request(url, post_data)
request.add_header('appcode', appcode)
request.add_header('appKey', appKey)
request.add_header('appSecret', appSecret)
//根据API的要求,定义相对应的Content-Type
request.add_header('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
response = urllib2.urlopen(request)
content = response.read()
if (content):
    print(content)
NSString *appcode = @"你自己的AppCode";
NSString *appKey = @"你自己的AppKey";
NSString *appSecret = @"你自己的AppSecret";
NSString *host = @"http://apigateway.jianjiaoshuju.com";
NSString *path = @"/api/v_1/air.html";
NSString *method = @"POST";
NSString *querys = @"";
NSString *url = [NSString stringWithFormat:@"%@%@%@",  host,  path , querys];
NSString *bodys = @"arrive_code=arrive_code&leave_code=leave_code&query_date=query_date";

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString: url]  cachePolicy:1  timeoutInterval:  5];
request.HTTPMethod  =  method;
[request addValue:  [NSString  stringWithFormat:appcode]  forHTTPHeaderField:  @"appcode"];
[request addValue:  [NSString  stringWithFormat:appKey]  forHTTPHeaderField:  @"appKey"];
[request addValue:  [NSString  stringWithFormat:appSecret]  forHTTPHeaderField:  @"appSecret"];
[request addValue: @"application/x-www-form-urlencoded; charset=UTF-8" forHTTPHeaderField: @"Content-Type"];
NSData *data = [bodys dataUsingEncoding: NSUTF8StringEncoding];
[request setHTTPBody: data];
NSURLSession *requestSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
NSURLSessionDataTask *task = [requestSession dataTaskWithRequest:request
    completionHandler:^(NSData * _Nullable body , NSURLResponse * _Nullable response, NSError * _Nullable error) {
    NSLog(@"Response object: %@" , response);
    NSString *bodyString = [[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding];

    //打印应答中的body
    NSLog(@"Response body: %@" , bodyString);
    }];

[task resume];
正常返回示例
{
    "errCode":0,
    "msg":"查询成功!",
    "flightInfos":[  //航班列表
        {
            "airlineCompany":"大连航空有限公司", //航空公司名称
            "lowestPriceInfo":{ //最低机票信息
                "discount":"7.5", //折扣
                "price":1350, //折后价
                "standardPrice":1800 //原价
                "oilFee":10, //燃油附加费
                "buildTax":50 //机场建设费
            },
            "leaveBuilding":"T3航站楼", //出发航站
            "leavePort":"首都机场(北京)", //出发机场
            "arTime":"2013-05-28 19:50:00", //到达时间
            "tkTime":"2013-05-28 17:00:00", //起飞时间
            "arriveBuilding":"T3航站楼", //到达航站
            "arrivePort":"重庆", //到达机场
            "flightNo":"CA1435" //航班号
            "onTimeRate":94.87, //准点率
        }
    ]
}
错误码定义
错误码 错误信息 描述
0 查询成功! 查询成功!
101 接口参数错误! 接口参数错误!
102 接口错误! 接口错误!
指定颜色文字识别(内容)

产品说明

城市编码和城市对照表如下:

城市名称	城市编码
阿勒泰	AAT
安康	AKA
阿克苏	AKU
安庆	AQC
包头	BAV
北海	BHY
北京	BJS
保山	BSD
广州	CAN
常德	CGD
郑州	CGO
长春	CGQ
朝阳	CHG
酒泉	CHW
赤峰	CIF
长治	CIH
重庆	CKG
长海	CNI
长沙	CSX
成都	CTU
常州	CZX
大同	DAT
达县	DAX
丹东	DDG
大连	DLC
敦煌	DNH
大庸	DYG
恩施	ENH
延安	ENY
福州	FOC
阜阳	FUG
富蕴	FYN
广汉	GHN
格尔木	GOQ
海口	HAK
黑河	HEK
呼和浩特	HET
合肥	HFE
杭州	HGH
黄花机场(长沙)	HHA
海拉尔	HLD
乌兰浩特	HLH
哈密	HMI
衡阳	HNY
哈尔滨	HRB
和田	HTN
汉中	HZG
银川	INC
且末	IQM
庆阳	IQN
景德镇	JDZ
嘉峪关	JGN
九江	JIU
晋江	JJN
佳木斯	JMU
库车	KCA
喀什	KHG
南昌	KHN
昆明	KMG
吉安	KNC
赣州	KOW
库尔勒	KRL
克拉玛依	KRY
贵阳	KWE
桂林	KWL
兰州	LHW
梁平	LIA
庐山	LUZ
拉萨	LXA
林西	LXI
洛阳	LYA
连云港	LYG
临沂	LYI
兰州东	LZD
柳州	LZH
牡丹江	MOG
梅县	MXZ
南充	NAO
齐齐哈尔	NDG
宁波	NGB
南京	NKG
南宁	NNG
南阳	NNY
首都机场(北京)	PEK
上海浦东	PVG
上海	SHA
沈阳	SHE
山海关	SHP
沙市	SHS
西安	SIA
汕头	SWA
思茅	SYM
三亚	SYX
深圳	SZX
青岛	TAO
铜仁	TEN
辽通	TGO
济南	TNA
天津	TSN
屯溪	TXN
太原	TYN
乌鲁木齐	URC
榆林	UYN
武汉	WUH
万县	WXN
兴城	XEN
襄樊	XFN
西昌	XIC
锡林浩特	XIL
兴宁	XIN
咸阳机场(西安)	XIY
厦门	XMN
西宁	XNN
徐州	XUZ
宜昌	YIH
伊宁	YIN
依兰	YLN
延吉	YNJ
烟台	YNT
昭通	ZAT
中川机场(兰州)	ZGC
湛江	ZHA
珠海	ZUH
												
联系我们  |  关于我们
重庆尖叫网络科技有限公司
4009030002转13663
kf@cqjianjiao.com
2459200267,1119712415
服务内容
图片验证码识别   |   汽车品牌配置查询
被执行人信息查询   |   失信信息查询   |   快递查询
国际航班信息查询   |   国内航班信息查询
验证码识别
全国免费服务热线
4009030002
转13663

周一至周五 9:00-18:00

尖叫网络

尖叫数据