接口简介:
查询常用机场三字码,四字码,归属地等信息。
请求地址:
https://cn.apihz.cn/api/jiaotong/airport.php
请求方式:
POST或GET。
请求参数:
【名称】【参数】【必填】【说明】
【用户ID】【id】【是】【用户中心的数字ID,例:id=10000000】
【用户KEY】【key】【是】【用户中心通讯秘钥,例:key=15he5h15ty854j5sr152hs2】
【查询关键词】【words】【是】【查询关键词,长度1-50。例:words=大兴】
【页码】【page】【否】【查询页码,每页最多返回10条内容,最大查询50页,默认第1页。例:page=1】
返回参数:
【名称】【参数】【说明】
【状态码】【code】【200成功,400错误】
【信息提示】【msg】【信息提示。】
【页码】【page】【当前页码。】
【结果集】【data】【结果数据集。】
【机场名称】【data.airport_name】【机场名称。】
【三字码】【data.three_code】【三字码。】
【四字码】【data.four_code】【四字码。】
【所属城市】【data.polis】【所属城市。】
【地区】【data.region】【地区。】
【时区】【data.zone】【时区。】
【大洲】【data.continent】【大洲。】
【海关机场】【data.customs】【海关机场。】
GET请求示例:
https://cn.apihz.cn/api/jiaotong/airport.php?id=88888888&key=88888888&words=大兴&page=1
注意:示例里的ID与KEY为公共ID与KEY,共享每分钟调用频次限制,接口本身免费,请使用自己的ID与KEY,独享每分钟调用频次。每日调用无上限。
POST请求示例:
请根据开发语言自行POST。
返回数据示例:
示例:{"code":400,"msg":"通讯秘钥错误。"}
示例:
{
"code": 200,
"page": 1,
"data": [{
"airport_name": "费希尔斯岛机场?Elizabeth Field Airport",
"three_code": "FID",
"four_code": null,
"polis": "费希尔斯岛",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "北美洲",
"customs": "否"
}, {
"airport_name": "敦刻尔克机场?Chautauqua County/Dunkirk Airport",
"three_code": "DKK",
"four_code": "KDKK",
"polis": "敦刻尔克",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "北美洲",
"customs": "否"
}, {
"airport_name": "科特兰机场?Cortland County Airport-Chase Field",
"three_code": "CTX",
"four_code": null,
"polis": "科特兰",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "北美洲",
"customs": "否"
}, {
"airport_name": "埃希贝机场?Maxson Airfield",
"three_code": "AXB",
"four_code": null,
"polis": "埃希贝",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "北美洲",
"customs": "否"
}, {
"airport_name": "纽约冲洗机场?Flushing Airport",
"three_code": "FLU",
"four_code": "KFLU",
"polis": "纽约",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "亚洲",
"customs": "否"
}, {
"airport_name": "格伦斯福尔斯机场?Floyd Bennett Memorial Airport",
"three_code": "GFL",
"four_code": "KGFL",
"polis": "格伦斯福尔斯",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "北美洲",
"customs": "否"
}, {
"airport_name": "西安普敦机场?Francis S Gabreski Airport",
"three_code": "FOK",
"four_code": "KFOK",
"polis": "西安普敦",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "北美洲",
"customs": "否"
}, {
"airport_name": "丹尼尔斯维尔机场?Dansville Municipal Airport",
"three_code": "DSV",
"four_code": "KDSV",
"polis": "丹尼尔斯维尔",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "北美洲",
"customs": "否"
}, {
"airport_name": "奥尔巴尼机场?Albany International Airport",
"three_code": "ALB",
"four_code": "KALB",
"polis": "奥尔巴尼",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "北美洲",
"customs": "是"
}, {
"airport_name": "法明代尔机场?Republic Airport",
"three_code": "FRG",
"four_code": "KFRG",
"polis": "法明代尔",
"region": "New York 纽约",
"zone": "-05:00",
"continent": "北美洲",
"customs": "否"
}]
}
参考资料(版权):
https://www.apihz.cn/api/jiaotongairport.html