FlightAPI
HomePricingContactLogin
  • Getting Started!
  • ✈️Oneway Trip API
  • ✈️Round Trip API
  • ✈️Multi Trip API
  • 🎯Flight Tracking API
  • 🛂Track Flights between Airports
  • 🌎Airline & Airport code API
  • ⌛Airport Schedule API
Powered by GitBook
On this page
  • Guide
  • Usage
  • Response

Airline & Airport code API

With this API you can generate airport and airline codes.

API endpoint for this API is: https://api.flightapi.io/iata

Guide

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

You can generate an API key from your Dashboard at any time.

Here is the list of default parameters you have to use with this API:

Parameters
Description
Type

api_key required

This is your personal API key. You can find this on your Dashboard.

String

name required

This could be any string matching an airline or an airport.

String

type required

type could be either an airline or airport. required

String

Usage

You have to send a GET request to https://api.flightapi.io/trackbyroute along with all the parameters.

Take a look at how you might call this API using various different coding languages.

curl "https://api.flightapi.io/iata/api-key?name=american&type=airline"
// require the Unirest or any other module to make an HTTP GET request
const unirest = require('unirest')

unirest.get('https://api.flightapi.io/iata/api-key?name=american&type=airline')
  .then(response => {
    console.log(response.body);
  })
  .catch(error => {
    console.log(error);
  });

// Set your API key before making the request
import requests

resp = requests.get('https://api.flightapi.io/iata/api-key?name=american&type=airline')
print (resp.json())

Response

The sample response of the API will look somewhat like this.

// Sample Response
{
  "data": [
    {
      "fs": "AA",
      "name": "American Airlines"
    },
    {
      "fs": "SCM",
      "name": "American Jet International"
    },
    {
      "fs": "NA",
      "name": "North American Airlines"
    },
    {
      "fs": "GTW",
      "name": "American Air Charter"
    }
  ]
}
  

It is just a sample API response. Some objects will have more attributes. A new array might also be there.

PreviousTrack Flights between AirportsNextAirport Schedule API

Last updated 1 year ago

🌎