Flight API Documentation

Getting Started

Flight API is designed to simplify data extraction like prices, live tracking and also schedule. A few things to consider before we get started:

Price Comparison API for Oneway Trip

Flight API exposes a single API endpoint, simply send a GET request to https://api.flightapi.io with eight query string parameters, api_key which contains your API key, the IATA code of departure location, IATA code of arrival location, date of departure,number of adults, number of children, number of infants, the cabin class and the currency.

Cabin Class are as follows:
  • Economy
  • Business
  • First
  • PremiumEconomy

Sample Code

Bash

      curl "https://api.flightapi.io/onewaytrip/YOURAPIKEY/LOND/LAX/2019-10-11/2/0/1/Economy/USD"
      

Result


      purchaseLinks: [
            {
            purchaseLinkId: "Ctrip|1|53",
            providerId: "Ctrip",
            commerceName: "CtripFlightsMeta",
            commerceBucket: "CtripGlobalInternationalMeta",
            currency: "USD",
            originalCurrency: "USD",
            seatAvailability: 0,
            taxesAndFees: 58,
            taxesAndFeesPerPassenger: 29,
            totalPrice: 408,
            totalPricePerPassenger: 204,
            fareBasisCodes: [ ],
            containedPurchaseLinks: [ ],
            impressionId: "fb1effce-1b8f-4d95-814f-6fd6f43dbb4a.111732",
            partnerData: { },
            isPaid: false,
            fareAttributesList: [ ]
            }
],
      

Price Comparison API for Round Trip

Flight API exposes a single API endpoint, simply send a GET request to https://api.flightapi.io with nine query string parameters, api_key which contains your API key, the IATA code of departure location, IATA code of arrival location, date of departure for first trip,date of departure for return trip,number of adults, number of children, number of infants, the cabinclass and the currency.

Cabin Class are as follows:
  • Economy
  • Business
  • First
  • PremiumEconomy

Sample Code

Bash

      curl "https://api.flightapi.io/roundtrip/YOURAPIKEY/LOND/LAX/2019-10-11/2019-10-15/2/0/1/Economy/USD"
      

Result


      purchaseLinks: [

            {
            purchaseLinkId: "Kiwi|1|14",
            providerId: "Kiwi",
            commerceName: "KiwiFlightsMeta",
            currency: "USD",
            originalCurrency: "USD",
            seatAvailability: 0,
            taxesAndFees: 0,
            taxesAndFeesPerPassenger: 0,
            totalPrice: 450,
            totalPricePerPassenger: 225,
            fareBasisCodes: [ ],
            containedPurchaseLinks: [ ],
            impressionId: "fb1effce-1b8f-4d95-814f-6fd6f43dbb4a.111733",
            partnerData: { },
            isPaid: false,
            fareAttributesList: [ ]
            }
],
      

Flight Traker API

Flight Tracker API exposes a single API endpoint, simply send a GET request to https://api.flightapi.io with five query string parameters, api_key which contains your API key, the IATA code of departure location, IATA code of arrival location, date of departure , time of tracking (It is a integer which has values 0,6,12 and 18).

Sample Code

Bash

      curl --header "X-MyHeader: 123" \
      "https://api.flightapi.io/tracker/5e15ab8d2366c880ddc60dec/LAX/BOM/2020-1-11/12"
      

Result


      {
        data: {
        header: {
        date: "11-Jan-2020",
        dateMDY: "Jan-11-2020",
        title: "(JAI) Jaipur Airport - (BOM) Chhatrapati Shivaji International Airport",
        mobileTitle: "JAI - BOM Flights",
        departureAirport: {
        fs: "JAI",
        iata: "JAI",
        icao: "VIJP",
        name: "Jaipur Airport",
        city: "Jaipur",
        state: "",
        country: "IN",
        active: true,
        classification: 3,
        timeZoneRegionName: "Asia/Kolkata"
        },
        arrivalAirport: {
        fs: "BOM",
        iata: "BOM",
        icao: "VABB",
        name: "Chhatrapati Shivaji International Airport",
        city: "Mumbai",
        state: "",
        country: "IN",
        active: true,
        classification: 1,
        timeZoneRegionName: "Asia/Kolkata"
        }
        },
        destOriginTitle: null,
        flights: [
        {
        sortTime: "2020-01-11T08:30:00.000Z",
        departureTime: {
        timeAMPM: "2:00PM",
        time24: "14:00"
        },
        arrivalTime: {
        timeAMPM: "3:50PM",
        time24: "15:50"
        },
        carrier: {
        fs: "AI",
        name: "Air India",
        flightNumber: "612"
        },
        operatedBy: null,
        url: "/flight-tracker/AI/612?year=2020&month=1&date=11&flightId=1027495334"
        },
        {
        sortTime: "2020-01-11T08:30:00.000Z",
        departureTime: {
        timeAMPM: "2:00PM",
        time24: "14:00"
        },
        arrivalTime: {
        timeAMPM: "3:50PM",
        time24: "15:50"
        },
        carrier: {
        fs: "ET",
        name: "Ethiopian Airlines",
        flightNumber: "1778"
        },
        operatedBy: "Operated by Air India 612",
        url: "/flight-tracker/ET/1778?year=2020&month=1&date=11&flightId=1027495334",
        isCodeshare: true
        },
        {
        sortTime: "2020-01-11T11:55:00.000Z",
        departureTime: {
        timeAMPM: "5:25PM",
        time24: "17:25"
        },
        arrivalTime: {
        timeAMPM: "7:30PM",
        time24: "19:30"
        },
        carrier: {
        fs: "6E",
        name: "IndiGo",
        flightNumber: "394"
        },
        operatedBy: null,
        url: "/flight-tracker/6E/394?year=2020&month=1&date=11&flightId=1027482365"
        }
        ]
        }
        }
      

Track a particular Airplane

Using this API you will be able to track a particular plane. This API will exposes a single GET request with 3 search parameters, api key, date and the unique id of the flight , you will get the id of the flight from the Flight Tracker API. It will return the speed , lats/logs ,weather ,etc.

Sample Code

Bash

      curl "https://api.flightapi.io/airplanetracker/api_key/2020-01-15/1027495334"

      

Result


      {
          data: {
          flightId: 1027905530,
          flightNote: {
          final: true,
          canceled: false,
          hasDepartedGate: true,
          hasDepartedRunway: true,
          landed: true,
          message: "The flight has landed",
          messageCode: "L",
          pastExpectedTakeOff: true,
          tracking: false,
          hasPositions: true,
          trackingUnavailable: false,
          phase: "Landed",
          hasActualRunwayDepartureTime: true,
          hasActualGateDepartureTime: true
          },
          isTracking: false,
          isLanded: true,
          isScheduled: false,
          sortTime: "2020-01-15T00:15:00.000Z",
          schedule: {
          scheduledDeparture: "2020-01-15T05:45:00.000",
          scheduledDepartureUTC: "2020-01-15T00:15:00.000Z",
          estimatedActualDepartureRunway: false,
          estimatedActualDepartureTitle: "Actual",
          estimatedActualDeparture: "2020-01-15T05:32:00.000",
          estimatedActualDepartureUTC: "2020-01-15T00:02:00.000Z",
          scheduledArrival: "2020-01-15T06:40:00.000",
          scheduledArrivalUTC: "2020-01-15T01:10:00.000Z",
          estimatedActualArrivalRunway: false,
          estimatedActualArrivalTitle: "Actual",
          estimatedActualArrival: "2020-01-15T06:23:00.000",
          estimatedActualArrivalUTC: "2020-01-15T00:53:00.000Z",
          graphXAxis: {
          dep: "2020-01-15T05:32:00.000",
          depUTC: "2020-01-15T00:02:00.000Z",
          arr: "2020-01-15T06:23:00.000",
          arrUTC: "2020-01-15T00:53:00.000Z"
          },
          tookOff: "2020-01-15T05:32:00.000",
          landing: "2020-01-15T06:23:00.000",
          isLanded: true
          },
          status: {
          statusCode: "L",
          status: "Arrived",
          color: "green",
          statusDescription: "On time",
          delay: {
          departure: {
          minutes: 0
          },
          arrival: {
          minutes: 0
          }
          },
          delayStatus: {
          wording: "On time",
          minutes: 0
          },
          lastUpdatedText: "Status Last Updated More Than 3 Hours Ago",
          finalStatus: "On Time",
          diverted: false
          },
          resultHeader: {
          statusDescription: "On time",
          carrier: {
          name: "IndiGo",
          fs: "6E"
          },
          flightNumber: "2042",
          status: "Arrived",
          diverted: false,
          color: "green",
          departureAirportFS: "DEL",
          arrivalAirportFS: "JAI",
          divertedAirport: null
          },
          ticketHeader: {
          carrier: {
          name: "IndiGo",
          fs: "6E"
          },
          flightNumber: "2042",
          iconURL: "https://d3brl4nqahsb3e.cloudfront.net/logos/png/150x50/6e-logo.png"
          },
          operatedBy: null,
          departureAirport: {
          fs: "DEL",
          iata: "DEL",
          name: "Indira Gandhi International Airport",
          city: "Delhi",
          country: "IN",
          timeZoneRegionName: "Asia/Kolkata",
          regionName: "Asia",
          gate: "25",
          terminal: "2",
          times: {
          scheduled: {
          time: "5:45",
          ampm: "AM",
          time24: "05:45",
          timezone: "IST"
          },
          estimatedActual: {
          title: "Actual",
          time: "5:32",
          ampm: "AM",
          time24: "05:32",
          runway: false,
          timezone: "IST"
          }
          },
          date: "2020-01-15T05:45:00.000"
          },
          arrivalAirport: {
          fs: "JAI",
          iata: "JAI",
          name: "Jaipur Airport",
          city: "Jaipur",
          country: "IN",
          timeZoneRegionName: "Asia/Kolkata",
          regionName: "Asia",
          gate: null,
          terminal: "2",
          baggage: null,
          times: {
          scheduled: {
          time: "6:40",
          ampm: "AM",
          time24: "06:40",
          timezone: "IST"
          },
          estimatedActual: {
          title: "Actual",
          time: "6:23",
          ampm: "AM",
          time24: "06:23",
          runway: false,
          timezone: "IST"
          }
          },
          date: "2020-01-15T06:40:00.000"
          },
          divertedAirport: null,
          additionalFlightInfo: {
          equipment: {
          iata: "32Q",
          name: "Airbus A321neo",
          title: "Actual"
          },
          flightDuration: "51m"
          },
          codeshares: [ ],
          positional: {
          departureAirportCode: "DEL",
          arrivalAirportCode: "JAI",
          divertedAirportCode: null,
          flexFlightStatus: "L",
          flexTrack: {
          flightId: 1027905530,
          carrierFsCode: "6E",
          flightNumber: "2042",
          tailNumber: "VT-IUD",
          callsign: "IGO2042",
          departureAirportFsCode: "DEL",
          arrivalAirportFsCode: "JAI",
          departureDate: {
          dateLocal: "2020-01-15T05:45:00.000",
          dateUtc: "2020-01-15T00:15:00.000Z"
          },
          equipment: "32Q",
          bearing: 87.95127528691366,
          heading: 199.79891277979158,
          positions: [
          {
          lon: 75.7568,
          lat: 26.8206,
          speedMph: 118,
          altitudeFt: 1263,
          source: "derived",
          date: "2020-01-15T00:51:55.000Z",
          course: -94,
          vrateMps: -2,
          lastObserved: "2020-01-15T00:49:25.000Z"
          },
          {
          lon: 75.7687,
          lat: 26.8501,
          speedMph: 192,
          altitudeFt: 1263,
          source: "derived",
          date: "2020-01-15T00:50:55.000Z",
          course: -70,
          vrateMps: -3,
          lastObserved: "2020-01-15T00:49:25.000Z"
          },
          {
          lon: 75.7937,
          lat: 26.8492,
          speedMph: 279,
          altitudeFt: 1263,
          source: "derived",
          date: "2020-01-15T00:49:55.000Z",
          course: -71,
          vrateMps: -3,
          lastObserved: "2020-01-15T00:49:25.000Z"
          },
          {
          lon: 75.8354,
          lat: 26.8265,
          speedMph: 164,
          altitudeFt: 1272,
          source: "derived",
          date: "2020-01-15T00:49:36.000Z",
          course: -96,
          vrateMps: -4,
          lastObserved: "2020-01-15T00:49:25.000Z"
          },
          {
          lon: 75.8608,
          lat: 26.8326,
          speedMph: 228,
          altitudeFt: 1666,
          source: "derived",
          date: "2020-01-15T00:48:55.000Z",
          course: -78,
          vrateMps: -3,
          lastObserved: "2020-01-15T00:49:25.000Z"
          },
          {
          lon: 75.9125,
          lat: 26.8298,
          speedMph: 202,
          altitudeFt: 2316,
          source: "derived",
          date: "2020-01-15T00:47:55.000Z",
          course: -85,
          vrateMps: -3,
          lastObserved: "2020-01-15T00:49:25.000Z"
          },
          {
          lon: 75.9584,
          lat: 26.8336,
          speedMph: 171,
          altitudeFt: 2843,
          source: "derived",
          date: "2020-01-15T00:46:55.000Z",
          course: -98,
          vrateMps: -4,
          lastObserved: "2020-01-15T00:49:25.000Z"
          },
          {
          lon: 76.0007,
          lat: 26.8433,
          speedMph: 142,
          altitudeFt: 3313,
          source: "derived",
          date: "2020-01-15T00:45:55.000Z",
          course: -126,
          vrateMps: -5,
          lastObserved: "2020-01-15T00:49:25.000Z"
          },
          {
          lon: 76.033,
          lat: 26.8655,
          speedMph: 164,
          altitudeFt: 4008,
          source: "derived",
          date: "2020-01-15T00:44:55.000Z",
          course: -168,
          vrateMps: -6,
          lastObserved: "2020-01-15T00:49:25.000Z"
          },
          {
          lon: 76.038,
          lat: 26.9082,
          speedMph: 240,
          altitudeFt: 5116,
          source: "derived",
          date: "2020-01-15T00:43:55.000Z",
          course: 155,
          vrateMps: -6,
          lastObserved: "2020-01-15T00:48:30.000Z"
          },
          {
          lon: 76.0206,
          lat: 26.9623,
          speedMph: 228,
          altitudeFt: 6236,
          source: "derived",
          date: "2020-01-15T00:42:55.000Z",
          course: 171,
          vrateMps: -7,
          lastObserved: "2020-01-15T00:47:32.000Z"
          },
          {
          lon: 75.9623,
          lat: 27.0069,
          speedMph: 327,
          altitudeFt: 6194,
          source: "derived",
          date: "2020-01-15T00:41:55.000Z",
          course: -149,
          vrateMps: -9,
          lastObserved: "2020-01-15T00:46:31.000Z"
          },
          {
          lon: 76.0081,
          lat: 27.0744,
          speedMph: 339,
          altitudeFt: 8247,
          source: "derived",
          date: "2020-01-15T00:40:55.000Z",
          course: -149,
          vrateMps: -8,
          lastObserved: "2020-01-15T00:45:33.000Z"
          },
          {
          lon: 76.0563,
          lat: 27.145,
          speedMph: 345,
          altitudeFt: 9808,
          source: "derived",
          date: "2020-01-15T00:39:55.000Z",
          course: -149,
          vrateMps: -8,
          lastObserved: "2020-01-15T00:44:35.000Z"
          },
          {
          lon: 76.1056,
          lat: 27.216,
          speedMph: 353,
          altitudeFt: 11489,
          source: "derived",
          date: "2020-01-15T00:38:55.000Z",
          course: -149,
          vrateMps: -7,
          lastObserved: "2020-01-15T00:43:32.000Z"
          },
          {
          lon: 76.1553,
          lat: 27.2902,
          speedMph: 349,
          altitudeFt: 13369,
          source: "derived",
          date: "2020-01-15T00:37:55.000Z",
          course: -149,
          vrateMps: -6,
          lastObserved: "2020-01-15T00:40:17.000Z"
          },
          {
          lon: 76.2053,
          lat: 27.3642,
          speedMph: 350,
          altitudeFt: 15019,
          source: "derived",
          date: "2020-01-15T00:36:55.000Z",
          course: -147,
          vrateMps: -5,
          lastObserved: "2020-01-15T00:40:17.000Z"
          },
          {
          lon: 76.2568,
          lat: 27.4384,
          speedMph: 356,
          altitudeFt: 16267,
          source: "derived",
          date: "2020-01-15T00:35:55.000Z",
          course: -147,
          vrateMps: -4,
          lastObserved: "2020-01-15T00:40:17.000Z"
          },
          {
          lon: 76.3101,
          lat: 27.5134,
          speedMph: 368,
          altitudeFt: 17787,
          source: "derived",
          date: "2020-01-15T00:34:55.000Z",
          course: -144,
          vrateMps: -3,
          lastObserved: "2020-01-15T00:39:04.000Z"
          },
          {
          lon: 76.3653,
          lat: 27.5896,
          speedMph: 387,
          altitudeFt: 18964,
          source: "derived",
          date: "2020-01-15T00:33:54.000Z",
          course: -144,
          vrateMps: -2,
          lastObserved: "2020-01-15T00:38:32.000Z"
          },
          {
          lon: 76.425,
          lat: 27.6678,
          speedMph: 411,
          altitudeFt: 19609,
          source: "derived",
          date: "2020-01-15T00:32:54.000Z",
          course: -147,
          vrateMps: -1,
          lastObserved: "2020-01-15T00:37:30.000Z"
          },
          {
          lon: 76.4844,
          lat: 27.7517,
          speedMph: 437,
          altitudeFt: 20168,
          source: "derived",
          date: "2020-01-15T00:31:54.000Z",
          course: -151,
          vrateMps: 1,
          lastObserved: "2020-01-15T00:36:23.000Z"
          },
          {
          lon: 76.5422,
          lat: 27.842,
          speedMph: 446,
          altitudeFt: 20567,
          source: "derived",
          date: "2020-01-15T00:30:54.000Z",
          course: -154,
          vrateMps: 3,
          lastObserved: "2020-01-15T00:35:29.000Z"
          },
          {
          lon: 76.5937,
          lat: 27.937,
          speedMph: 443,
          altitudeFt: 20796,
          source: "derived",
          date: "2020-01-15T00:29:54.000Z",
          course: -155,
          vrateMps: 6,
          lastObserved: "2020-01-15T00:34:29.000Z"
          },
          {
          lon: 76.6433,
          lat: 28.032,
          speedMph: 427,
          altitudeFt: 20843,
          source: "derived",
          date: "2020-01-15T00:28:54.000Z",
          course: -155,
          vrateMps: 10,
          lastObserved: "2020-01-15T00:33:28.000Z"
          },
          {
          lon: 76.6922,
          lat: 28.1249,
          speedMph: 414,
          altitudeFt: 20035,
          source: "derived",
          date: "2020-01-15T00:27:54.000Z",
          course: -155,
          vrateMps: 12,
          lastObserved: "2020-01-15T00:32:27.000Z"
          },
          {
          lon: 76.7388,
          lat: 28.2134,
          speedMph: 418,
          altitudeFt: 18090,
          source: "derived",
          date: "2020-01-15T00:26:54.000Z",
          course: -157,
          vrateMps: 12,
          lastObserved: "2020-01-15T00:31:30.000Z"
          },
          {
          lon: 76.7825,
          lat: 28.3024,
          speedMph: 449,
          altitudeFt: 15662,
          source: "derived",
          date: "2020-01-15T00:25:54.000Z",
          course: -163,
          vrateMps: 13,
          lastObserved: "2020-01-15T00:30:30.000Z"
          },
          {
          lon: 77.1,
          lat: 28.5562,
          speedMph: 168,
          altitudeFt: 744,
          source: "derived",
          date: "2020-01-15T00:25:00.000Z",
          course: 0,
          vrateMps: 0,
          lastObserved: "2020-01-15T00:19:29.000Z"
          },
          {
          lon: 76.8243,
          lat: 28.3899,
          speedMph: 438,
          altitudeFt: 12844,
          source: "derived",
          date: "2020-01-15T00:24:54.000Z",
          course: -162,
          vrateMps: 12,
          lastObserved: "2020-01-15T00:29:31.000Z"
          },
          {
          lon: 76.8663,
          lat: 28.4715,
          speedMph: 384,
          altitudeFt: 10262,
          source: "derived",
          date: "2020-01-15T00:23:54.000Z",
          course: -157,
          vrateMps: 11,
          lastObserved: "2020-01-15T00:28:30.000Z"
          },
          {
          lon: 76.9096,
          lat: 28.5413,
          speedMph: 296,
          altitudeFt: 8183,
          source: "derived",
          date: "2020-01-15T00:22:54.000Z",
          course: -142,
          vrateMps: 12,
          lastObserved: "2020-01-15T00:27:24.000Z"
          },
          {
          lon: 76.963,
          lat: 28.5819,
          speedMph: 259,
          altitudeFt: 6085,
          source: "derived",
          date: "2020-01-15T00:21:54.000Z",
          course: -103,
          vrateMps: 13,
          lastObserved: "2020-01-15T00:26:27.000Z"
          },
          {
          lon: 77.0329,
          lat: 28.579,
          speedMph: 249,
          altitudeFt: 3401,
          source: "derived",
          date: "2020-01-15T00:20:54.000Z",
          course: -75,
          vrateMps: 11,
          lastObserved: "2020-01-15T00:25:26.000Z"
          },
          {
          lon: 77.088,
          lat: 28.5663,
          speedMph: 179,
          altitudeFt: 1291,
          source: "derived",
          date: "2020-01-15T00:19:54.000Z",
          course: -76,
          vrateMps: 10,
          lastObserved: "2020-01-15T00:24:32.000Z"
          },
          {
          lon: 77.1236,
          lat: 28.561,
          speedMph: 66,
          source: "derived",
          date: "2020-01-15T00:18:54.000Z",
          course: -106,
          vrateMps: 7,
          lastObserved: "2020-01-15T00:23:33.000Z"
          },
          {
          lon: 77.1637,
          lat: 28.4936,
          speedMph: 223,
          source: "derived",
          date: "2020-01-15T00:17:54.000Z",
          course: -23,
          vrateMps: 13,
          lastObserved: "2020-01-15T00:22:30.000Z"
          },
          {
          lon: 77.1309,
          lat: 28.5653,
          speedMph: 73,
          source: "derived",
          date: "2020-01-15T00:16:54.000Z",
          course: 121,
          vrateMps: 10,
          lastObserved: "2020-01-15T00:21:31.000Z"
          },
          {
          lon: 77.2403,
          lat: 28.5201,
          speedMph: 114,
          altitudeFt: 744,
          source: "derived",
          date: "2020-01-15T00:15:54.000Z",
          course: -63,
          vrateMps: 11,
          lastObserved: "2020-01-15T00:20:30.000Z"
          }
          ],
          irregularOperations: [ ]
          }
          },
          flightState: "historical"
          }
          }
      

IATA/Autocomplete API

This API will help you to get a JSON response of the codes of the city and also for the airline ou are trying to track. This API exposes a single GET request endpoint with three search parameters, api-key, query (name of the city or airline) and the type which will be either airline or airport

Sample Code

Bash

      curl
      "https://api.flightapi.io/iata/api-key/new%20york/airport"
      

Result


      {
        data: [
        {
        iata: "LGA",
        fs: "LGA",
        name: "LaGuardia Airport"
        },
        {
        iata: "JFK",
        fs: "JFK",
        name: "John F. Kennedy International Airport"
        },
        {
        iata: "",
        fs: "X50",
        name: "Massey Ranch"
        },
        {
        iata: "RKH",
        fs: "RKH",
        name: "York County Airport-Bryant Field"
        },
        {
        iata: "ARA",
        fs: "ARA",
        name: "Acadiana Regional Airport"
        },
        {
        iata: "PSK",
        fs: "PSK",
        name: "New River Valley Airport"
        },
        {
        iata: "",
        fs: "X52",
        name: "New Hibiscus"
        },
        {
        iata: "",
        fs: "KJRB",
        name: "Wall St (Heliport)"
        },
        {
        iata: "",
        fs: "KJRA",
        name: "Port Authority-West 30Th St. Midtown. (Hel"
        },
        {
        iata: "",
        fs: "KHZR",
        name: "False River"
        }
        ]
        }
      
If you have any questions, you can contact support or email us at [email protected]
Our Story
We are working in this industry for 4 year now with Hotel Price Comparison API. Now we have launched Flight API.
Flight API