Utility APIs

Non-AI Utility API

Airports Database & Flight Duration Calculator

Provides detailed airports information (30k airports) and calculates travel times between airports.

Discover an extensive, advanced database of nearly 30,000 airports and calculate precise flight durations with the Airports Database & Flight Duration API. Seamlessly accesses detailed airport information and journey times using flexible filters and comprehensive endpoints.

Key Features:

  • Extensive Airport Database: Access information on almost 30,000 airports worldwide, including ICAO, IATA, LID codes, airport names, city names, subdivisions, countries, time zones, elevations, and geographical coordinates.
  • Advanced Filtering: Efficiently browse and filter airport data using ICAO codes, IATA codes, LID codes, city names, and airport names to find exactly what you need.
  • Flight Duration Calculations: Utilize the Flight Length endpoint to calculate the total journey duration between any two airports. Provide parameters such as departure and arrival airport codes, dates, and times to get accurate travel times.
  • Detailed Responses: Get comprehensive data in JSON format, including detailed airport information and human-readable flight duration summaries.

🛩️ Airports Database Querying

Example API Requests:

  • Retrieve Airport List:
curl -X 'GET' \
'https://sharpapi.com/api/v1/airports' \
-H 'accept: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'

Response

{
  "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
  }
}

Airport Details

  • Retrieve Specific Airport Data by 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'

Response

{
  "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
  }
}
  • Retrieve Specific Airport Data by IATA Code:
curl -X 'GET' \
'https://sharpapi.com/api/v1/airports/iata/SIN' \
-H 'accept: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'

Flight Duration Calculations

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'

Response

{
  "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
  }
}

Get in touch

Whether you have questions, feedback, or need assistance, we're here to help.

We believe in community-driven and OpenSource-based development.
Are you missing any obvious functionalities in our API?
Please let us know and we will make it happen :)

Subscribe to our Newsletter

for the latest insights and updates and stay ahead in the world of AI integration!

Leveraging AI for Enhanced Online Engagement

Leveraging AI for Enhanced Online Engagement

Jul 18, 2024

Let’s explore how AI can be leveraged to build scalable solutions for online engagement across various industries seeking to enhance efficiency and productivity through AI-driven workflow automation.