航班查询接口支持不同城市航班查询,下面将分享航班查询接口开发文档及调用实例。
接口名称:航班查询接口
接口平台:聚合数据
接口地址:http://apis.juhe.cn/plan/city
支持格式:JSON/XML
请求方式:GET
请求示例:http://apis.juhe.cn/plan/city?key=xxxxx
接口备注:spell可作为航线查询的参数 —— 北京 分为 北京(PEK),北京南苑(NAY)。上海 分为 上海(SHA),上海浦东(PVG)
航班查询接口JSON返回示例:
{
"resultcode":"200",
"reason":"SUCCESSED!",
"result":[
{
"city":"北京",
"spell":"PEK"
}
]
}
航班查询接口XML返回示例:
<?xml version="1.0" encoding="utf-8" ?>
- <root>
<resultcode>200</resultcode>
<reason>SUCCESSED!</reason>
- <result>
- <item>
<city>安庆</city>
<spell>AQG</spell>
</item>
- <item>
<city>阿克苏</city>
<spell>AKU</spell>
</item>
- <item>
<city>阿勒泰</city>
<spell>AAT</spell>
</item>
- <item>
<city>阿尔山</city>
<spell>YIE</spell>
</item>
- <item>
<city>保山</city>
<spell>BSD</spell>
</item>
- <item>
<city>包头</city>
<spell>BAV</spell>
</item>
- <item>
<city>北京</city>
<spell>PEK</spell>
</item>
- <item>
<city>北京南苑</city>
<spell>NAY</spell>
</item>
- <item>
<city>博乐</city>
<spell>BPL</spell>
</item>
- <item>
<city>巴彦淖尔</city>
<spell>RLK</spell>
</item>
- <item>
<city>百色</city>
<spell>AEB</spell>
</item>
- <item>
<city>常州</city>
<spell>CZX</spell>
</item>
- <item>
<city>常德</city>
<spell>CGD</spell>
</item>
- <item>
<city>成都</city>
<spell>CTU</spell>
</item>
- <item>
<city>昌都</city>
<spell>BPX</spell>
</item>
- <item>
<city>赤峰</city>
<spell>CIF</spell>
</item>
- <item>
<city>重庆</city>
<spell>CKG</spell>
</item>
- <item>
<city>长春</city>
<spell>CGQ</spell>
</item>
- <item>
<city>长沙</city>
<spell>CSX</spell>
</item>
</result>
</root>