实用程序 API

非AI实用程序API

机场数据库和飞行时间计算器

提供详细的机场信息(3万个机场)并计算机场之间的旅行时间。

探索一个包含近30,000个机场的广泛、先进的数据库,并通过机场数据库和飞行时间API计算精确的飞行时长。使用灵活的过滤器和全面的端点无缝访问详细的机场信息和行程时间。

主要特点:

  • 广泛的机场数据库: 获取全球近30,000个机场的信息,包括ICAO、IATA、LID代码,机场名称,城市名称,细分,国家,时区,海拔和地理坐标。
  • 高级过滤: 使用ICAO代码、IATA代码、LID代码、城市名称和机场名称高效浏览和过滤机场数据,以准确找到所需信息。
  • 飞行时长计算: 使用飞行长度端点计算任意两个机场之间的总行程时间。提供出发和到达机场代码、日期和时间等参数以获取准确的旅行时间。
  • 详细响应: 以JSON格式获取全面数据,包括详细的机场信息和可读的飞行时长摘要。

FlightDuration.Online 是使用此SharpAPI端点构建的,作为其功能的示例。

👉 在线试用: https://flightduration.online/



🛩️ 机场数据库查询

示例 API 请求:

  • 检索机场列表:
curl -X 'GET' \
'https://sharpapi.com/api/v1/airports' \
-H 'accept: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'

响应

{
  "data": [
    {
      "id": "1ef266de-5a6c-67d6-86a1-06bb2780ed98",
      "icao": "00AA",
      "iata": "",
      "lid": "00AA",
      "name": "Aero B Ranch Airport",
      "city": "Leoti",
      "subdivision": "Kansas",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 3435,
      "latitude": 38.7,
      "longitude": -101.47
    },
    {
      "id": "1ef266de-5ad4-6660-bae6-06bb2780ed98",
      "icao": "00SC",
      "iata": "",
      "lid": "00SC",
      "name": "Flying O Airport",
      "city": "Sumter",
      "subdivision": "South Carolina",
      "country": "US",
      "timezone": "America/New_York",
      "elevation": 150,
      "latitude": 34.01,
      "longitude": -80.27
    }
  ],
  "links": {
    "first": "https://sharpapi.com/api/v1/airports?page=1",
    "last": "https://sharpapi.com/api/v1/airports?page=1128",
    "prev": null,
    "next": "https://sharpapi.com/api/v1/airports?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1128,
    "links": [
      {
        "url": null,
        "label": "« Previous",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=1127",
        "label": "1127",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=1128",
        "label": "1128",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=2",
        "label": "Next »",
        "active": false
      }
    ],
    "path": "https://sharpapi.com/api/v1/airports",
    "per_page": 25,
    "to": 25,
    "total": 28186
  }
}

机场详情

  • 通过 ID 检索特定机场数据:
curl -X 'GET' \
'https://sharpapi.com/api/v1/airports/1ef266e0-00ca-656e-b481-06bb2780ed98' \
-H 'accept: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'

响应

{
  "data": {
    "id": "1ef266e0-00ca-656e-b481-06bb2780ed98",
    "icao": "WSSS",
    "iata": "SIN",
    "lid": "",
    "name": "Singapore Changi International Airport",
    "city": "Singapore",
    "subdivision": "North East",
    "country": "SG",
    "timezone": "Asia/Singapore",
    "elevation": 22,
    "latitude": 1.35,
    "longitude": 103.99
  }
}
  • 通过 IATA 代码检索特定机场数据:
curl -X 'GET' \
'https://sharpapi.com/api/v1/airports/iata/SIN' \
-H 'accept: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'

飞行时长计算

curl -X 'GET' \
'https://sharpapi.com/api/v1/airports/flight_duration/IATA/SIN/2024-06-27/01%3A40/IATA/DXB/2024-06-27/12%3A10' \
-H 'accept: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'

响应

{
  "flight_length": {
    "days": 0,
    "hours": 14,
    "minutes": 30,
    "human": "14 hours 30 minutes",
    "human_cn": "14 小时 30 分钟"
  },
  "departure_local": "2024-06-27 01:40:00",
  "arrival_local": "2024-06-27 12:10:00",
  "departure_airport": {
    "id": "1ef266e0-00ca-656e-b481-06bb2780ed98",
    "icao": "WSSS",
    "iata": "SIN",
    "lid": "",
    "name": "Singapore Changi International Airport",
    "city": "Singapore",
    "subdivision": "North East",
    "country": "SG",
    "timezone": "Asia/Singapore",
    "elevation": 22,
    "latitude": 1.35,
    "longitude": 103.99
  },
  "arrival_airport": {
    "id": "1ef266df-80aa-62e4-ac59-06bb2780ed98",
    "icao": "OMDB",
    "iata": "DXB",
    "lid": "",
    "name": "Dubai International Airport",
    "city": "Dubai",
    "subdivision": "Dubai",
    "country": "AE",
    "timezone": "Asia/Dubai",
    "elevation": 34,
    "latitude": 25.25,
    "longitude": 55.36
  }
}

联系我们

有关于集成的问题吗?需要一个自定义端点?我们通常会在几个小时内回复。

SharpAPI 正在改变旅游技术的 10 种方式

在一个时区转换比你吃完机上免费小吃还快的行业中,AI已成为塑造旅行各个角落的无声副驾驶。想象一下自动生成行程邮件、分类独特住宿或即时翻译旅游描述——所有这些都在你专注于提供难忘体验的同时完成。SharpAPI将这一愿景变为现实,提供了一套AI驱动的工具,不仅简化了操作,还为客户互动增添了额外的火花,使旅行更加顺畅、智能且无疑更令人兴奋。

喜欢 SharpAPI?分享它并获得 30% 的永久性佣金。

您的客户已经需要人工智能。通过推荐最简单的添加方式来获得报酬。