API.Market
Go to API.market
  • Welcome to API.market
  • What are API Products?
  • How to subscribe to a SaaS API Product?
  • Managing Subscriptions
  • Analytics & Logs
  • How can I cancel my Subscription?
  • How do I add payment details?
  • How does API.market charges me?
  • Error Codes
  • Seller Docs
    • API Seller Console
    • What is an API Product?
    • What is a Pricing Plan
    • Importing an API Source
    • Creating a Product using the Wizard
    • Testing Your APIs & Products
    • Analytics & Logs
    • Custom Usage
    • Overriding Custom Usage on Result Retrieval
  • FUNDAMENTALS
    • Convert Postman Collection to OpenAPI Yaml
    • Create OpenAPI spec using ChatGPT
  • About Us
  • API Product Docs
    • MagicAPI
      • Screenshot API
      • Domain Availability Checker API
      • WhoIS API
      • PDF Conversion API
      • Image Upscale API
      • DNS Checker API
      • Ageify API
      • Image Restoration API
      • Toon Me API
      • Coding Assistant
      • 🎭 FaceSwap API: Instantaneous replaces face with one another
      • 🏞️ Image Upload API
      • Deblurer API
      • Hair Changer API
      • 🤳🏻🤖AI Qr Code Generator API
      • Whisper API
      • Image Colorizer API
      • OpenJourney API
      • Object Remover API
      • Image Captioner API
      • Object Detector API
      • NSFW API
      • Crunchbase API
      • Pipfeed's Extract API Developer Documentation
      • Migrating from Capix FaceSwap API to magicapi/faceswap-capix API
    • BridgeML
      • Meta-Llama-3-8B-Instruct
      • Meta-Llama-3-70B-Instruct
      • Mistral-7B-Instruct-v0.1
      • Mixtral-8x22B-Instruct-v0.1
      • Meta-Llama-2-7b
      • Meta-Llama-2-13b
      • Meta-Llama-2-70b
      • Gemma-7b-it
      • NeuralHermes-2.5-Mistral-7B
      • BAAI/bge-large-en-v1.5
      • CodeLlama-70b-Instruct-hf
      • 🤖🧗Text-to-Image API
      • 📝🎧 Text to Audio API
    • Capix AI
      • FaceSwap Image and Video Face Swap API
      • MakeUp
      • Photolab.me
      • AI Picture Colorizer
      • AI Picture Upscaler
      • AI Background Remover
      • Object Remover
      • TTS Universal
      • Home GPT
      • AI & Plagiarism Checker
      • AI Story Generator
      • AI Essay Generator
      • Book Title Generator
    • Trueway
      • ⛕ 🗺️ Trueway Routing API
      • 🌐📍Trueway Geocoding API: Forward and Reverse Geocoding
      • 🛤️ ⏱️Trueway Matrix API: Travel Distance and Time
      • 🏛️ Trueway Places API
    • AILabTools
      • Cartoon-Yourself
    • SharpAPI
      • 📄 AI-Powered Resume/CV Parsing API
      • 🛩️ Airports Database & Flight Duration API
    • Text to Speech
      • Turn your text into Magical-sounding Audio
Powered by GitBook
On this page
  1. API Product Docs
  2. SharpAPI

🛩️ Airports Database & Flight Duration API

🛩️ Comprehensive Airport Data and Accurate Flight Duration Calculations for 30,000 airports + flights

Previous📄 AI-Powered Resume/CV Parsing APINextText to Speech

Last updated 10 months ago

Developer Portal :

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

Description:

SharpAPI.com presents the Airports Database & Flight Duration API, designed to provide developers and businesses with a robust and detailed resource for global airport information and flight duration calculations.

Key Features:

  • Extensive Airport Database: Access information on almost 30,000 airports worldwide, including ICAO, IATA, LID codes, airport names, city names, subdivisions, countries, timezones, 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.

Example API Requests:

  • Retrieve Airport List:

    curl -X 'GET' \
      'https://api.magicapi.dev/api/v1/sharpapi.com/airports/v1/airports' \
      -H 'accept: application/json' \
      -H 'x-magicapi-key: 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-5a8e-6f02-ba5c-06bb2780ed98",
      "icao": "00AK",
      "iata": "",
      "lid": "00AK",
      "name": "Lowell Field",
      "city": "Anchor Point",
      "subdivision": "Alaska",
      "country": "US",
      "timezone": "America/Anchorage",
      "elevation": 252,
      "latitude": 59.95,
      "longitude": -151.69
    },
    {
      "id": "1ef266de-5a93-63ae-b408-06bb2780ed98",
      "icao": "00AL",
      "iata": "",
      "lid": "00AL",
      "name": "Epps Airpark",
      "city": "Harvest",
      "subdivision": "Alabama",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 820,
      "latitude": 34.86,
      "longitude": -86.77
    },
    {
      "id": "1ef266de-5a97-6166-bced-06bb2780ed98",
      "icao": "00AN",
      "iata": "",
      "lid": "00AN",
      "name": "Katmai Lodge Airport",
      "city": "King Salmon",
      "subdivision": "Alaska",
      "country": "US",
      "timezone": "America/Anchorage",
      "elevation": 80,
      "latitude": 59.09,
      "longitude": -156.46
    },
    {
      "id": "1ef266de-5a9a-6578-b79f-06bb2780ed98",
      "icao": "00AR",
      "iata": "",
      "lid": "00AR",
      "name": "Arland Airport",
      "city": "Bennington",
      "subdivision": "Kansas",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 1352,
      "latitude": 38.97,
      "longitude": -97.6
    },
    {
      "id": "1ef266de-5a9d-6a5c-8cd4-06bb2780ed98",
      "icao": "00AS",
      "iata": "",
      "lid": "00AS",
      "name": "Fulton Airport",
      "city": "Alex",
      "subdivision": "Oklahoma",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 1100,
      "latitude": 34.94,
      "longitude": -97.82
    },
    {
      "id": "1ef266de-5aa0-6c5c-91b1-06bb2780ed98",
      "icao": "00CA",
      "iata": "",
      "lid": "00CA",
      "name": "Goldstone /Gts/ Airport",
      "city": "Barstow",
      "subdivision": "California",
      "country": "US",
      "timezone": "America/Los_Angeles",
      "elevation": 3038,
      "latitude": 35.35,
      "longitude": -116.89
    },
    {
      "id": "1ef266de-5aa3-6d80-a6d9-06bb2780ed98",
      "icao": "00CL",
      "iata": "",
      "lid": "00CL",
      "name": "Williams Ag Airport",
      "city": "Biggs",
      "subdivision": "California",
      "country": "US",
      "timezone": "America/Los_Angeles",
      "elevation": 87,
      "latitude": 39.43,
      "longitude": -121.76
    },
    {
      "id": "1ef266de-5aa6-681e-873c-06bb2780ed98",
      "icao": "00FA",
      "iata": "",
      "lid": "00FA",
      "name": "Grass Patch Airport",
      "city": "Bushnell",
      "subdivision": "Florida",
      "country": "US",
      "timezone": "America/New_York",
      "elevation": 53,
      "latitude": 28.65,
      "longitude": -82.22
    },
    {
      "id": "1ef266de-5aa9-683e-9f64-06bb2780ed98",
      "icao": "00FL",
      "iata": "",
      "lid": "00FL",
      "name": "River Oak Airport",
      "city": "Okeechobee",
      "subdivision": "Florida",
      "country": "US",
      "timezone": "America/New_York",
      "elevation": 35,
      "latitude": 27.23,
      "longitude": -80.97
    },
    {
      "id": "1ef266de-5aac-6624-ad2a-06bb2780ed98",
      "icao": "00GA",
      "iata": "",
      "lid": "00GA",
      "name": "Lt World Airport",
      "city": "Lithonia",
      "subdivision": "Georgia",
      "country": "US",
      "timezone": "America/New_York",
      "elevation": 700,
      "latitude": 33.77,
      "longitude": -84.07
    },
    {
      "id": "1ef266de-5aaf-6414-b9b6-06bb2780ed98",
      "icao": "00ID",
      "iata": "",
      "lid": "00ID",
      "name": "Delta Shores Airport",
      "city": "Clark Fork",
      "subdivision": "Idaho",
      "country": "US",
      "timezone": "America/Los_Angeles",
      "elevation": 2064,
      "latitude": 48.15,
      "longitude": -116.21
    },
    {
      "id": "1ef266de-5ab2-63da-9d73-06bb2780ed98",
      "icao": "00IG",
      "iata": "",
      "lid": "00IG",
      "name": "Goltl Airport",
      "city": "Mcdonald",
      "subdivision": "Kansas",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 3359,
      "latitude": 39.72,
      "longitude": -101.4
    },
    {
      "id": "1ef266de-5ab5-603a-8621-06bb2780ed98",
      "icao": "00IL",
      "iata": "",
      "lid": "00IL",
      "name": "Hammer Airport",
      "city": "Polo",
      "subdivision": "Illinois",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 840,
      "latitude": 41.98,
      "longitude": -89.56
    },
    {
      "id": "1ef266de-5ab7-6ed4-b9b7-06bb2780ed98",
      "icao": "00IS",
      "iata": "",
      "lid": "00IS",
      "name": "Hayenga's Cant Find Farms Airport",
      "city": "Kings",
      "subdivision": "Illinois",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 820,
      "latitude": 40.03,
      "longitude": -89.12
    },
    {
      "id": "1ef266de-5aba-6a1c-ae17-06bb2780ed98",
      "icao": "00KS",
      "iata": "",
      "lid": "00KS",
      "name": "Hayden Farm Airport",
      "city": "Gardner",
      "subdivision": "Kansas",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 1100,
      "latitude": 38.73,
      "longitude": -94.93
    },
    {
      "id": "1ef266de-5abd-6abe-80fb-06bb2780ed98",
      "icao": "00KY",
      "iata": "",
      "lid": "00KY",
      "name": "Robbins Roost Airport",
      "city": "Stanford",
      "subdivision": "Kentucky",
      "country": "US",
      "timezone": "America/New_York",
      "elevation": 1265,
      "latitude": 37.41,
      "longitude": -84.62
    },
    {
      "id": "1ef266de-5ac0-6782-acb9-06bb2780ed98",
      "icao": "00LS",
      "iata": "",
      "lid": "00LS",
      "name": "Lejeune Airport",
      "city": "Esterwood",
      "subdivision": "Louisiana",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 12,
      "latitude": 30.14,
      "longitude": -92.43
    },
    {
      "id": "1ef266de-5ac3-620c-9932-06bb2780ed98",
      "icao": "00MD",
      "iata": "",
      "lid": "00MD",
      "name": "Slater Field",
      "city": "Federalsburg",
      "subdivision": "Maryland",
      "country": "US",
      "timezone": "America/New_York",
      "elevation": 45,
      "latitude": 38.76,
      "longitude": -75.75
    },
    {
      "id": "1ef266de-5ac5-6f70-879b-06bb2780ed98",
      "icao": "00MN",
      "iata": "",
      "lid": "00MN",
      "name": "Battle Lake Municipal Airport",
      "city": "Battle Lake",
      "subdivision": "Minnesota",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 1365,
      "latitude": 46.3,
      "longitude": -95.7
    },
    {
      "id": "1ef266de-5ac8-6ad6-b894-06bb2780ed98",
      "icao": "00NC",
      "iata": "",
      "lid": "00NC",
      "name": "North Raleigh Airport",
      "city": "Louisburg",
      "subdivision": "North Carolina",
      "country": "US",
      "timezone": "America/New_York",
      "elevation": 348,
      "latitude": 36.09,
      "longitude": -78.37
    },
    {
      "id": "1ef266de-5acb-67f4-9d80-06bb2780ed98",
      "icao": "00NY",
      "iata": "",
      "lid": "00NY",
      "name": "Weiss Airfield",
      "city": "West Bloomfield",
      "subdivision": "New York",
      "country": "US",
      "timezone": "America/New_York",
      "elevation": 1000,
      "latitude": 42.9,
      "longitude": -77.5
    },
    {
      "id": "1ef266de-5ace-6968-8dfe-06bb2780ed98",
      "icao": "00OK",
      "iata": "",
      "lid": "00OK",
      "name": "Gull Bay Landing Airport",
      "city": "Sandsprings",
      "subdivision": "Oklahoma",
      "country": "US",
      "timezone": "America/Chicago",
      "elevation": 960,
      "latitude": 36.2,
      "longitude": -96.22
    },
    {
      "id": "1ef266de-5ad1-6906-8051-06bb2780ed98",
      "icao": "00PN",
      "iata": "",
      "lid": "00PN",
      "name": "Ferrell Field",
      "city": "Mercer",
      "subdivision": "Pennsylvania",
      "country": "US",
      "timezone": "America/New_York",
      "elevation": 1301,
      "latitude": 41.3,
      "longitude": -80.21
    },
    {
      "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=2",
        "label": "2",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=3",
        "label": "3",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=4",
        "label": "4",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=5",
        "label": "5",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=6",
        "label": "6",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=7",
        "label": "7",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=8",
        "label": "8",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=9",
        "label": "9",
        "active": false
      },
      {
        "url": "https://sharpapi.com/api/v1/airports?page=10",
        "label": "10",
        "active": false
      },
      {
        "url": null,
        "label": "...",
        "active": false
      },
      {
        "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
  }
}
  • Calculate Flight Duration:

    curl -X 'GET' \
      'https://api.magicapi.dev/api/v1/sharpapi.com/airports/v1/airports/flight_duration/IATA/SIN/2024-06-27/01%3A40/IATA/DXB/2024-06-27/12%3A10' \
      -H 'accept: application/json' \
      -H 'x-magicapi-key: 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
  }
}
  • Retrieve Specific Airport Data by ID:

curl -X 'GET' \
  'https://api.magicapi.dev/api/v1/sharpapi.com/airports/v1/airports/1ef266e0-00ca-656e-b481-06bb2780ed98' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: 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://api.magicapi.dev/api/v1/sharpapi.com/airports/v1/airports/iata/SIN' \
      -H 'accept: application/json' \
      -H 'x-magicapi-key: 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
  }
}

With the Airports Database & Flight Duration API by SharpAPI.com, streamline your travel planning, enhance your logistics operations, and provide valuable insights to your users with accurate and up-to-date airport data and flight duration information.

Developer Portal :

https://api.market/store/sharpapi.com/airports
https://api.market/store/sharpapi.com/airports