In this API you will get prices from multiple airlines and vendors for a multi-city trip. You can pass any airport IATA code, future date, currency, and pax.
// require the Unirest or any other module to make an HTTP GET requestconstunirest=require('unirest')unirest.get('https://api.flightapi.io/multicity/610ae5eb1c7b751ef42b2e75ae1/2/1/0/0/Economy/USD?dep1=SFO&arr1=ARN&date1=2024-12-11&dep2=ARN&arr2=LHR&date2=2024-12-15')
.then(response => {console.log(response.body); }).catch(error => {console.log(error); });
// Set your API key before making the requestimport requestsresp = requests.get('https://api.flightapi.io/multicity/610ae5eb1c7b751ef42b2e75ae1/2/1/0/0/Economy/USD?dep1=SFO&arr1=ARN&date1=2024-12-11&dep2=ARN&arr2=LHR&date2=2024-12-15')
print (resp.json())
Response
The sample response of the API will look somewhat like this.
It is just a sample API response. Some objects will have more attributes. New arrays will also be there.
Understanding the Response
In the JSON response, you may observe that many objects include references (IDs or codes) to objects from other lists. This pattern is employed in our API to prevent redundant data and reduce the overall size by allowing multiple objects to reference the same data.
api_key
required
This is your personal API key. You can find this on your Dashboard.
String
numberofFlights
required
Number of Flights one wants to take. Minimum value is 2 and maximum value is 3.
String
dep1
required
This is the IATA code of first departure airport.
String
arr1
required
This is the IATA code of first arrival airport.
String
date1
required
Date of departure from the first airport.
Format - YYYY-MM-DD
String
dep2
required
This is the IATA code of the second departure airport.
String
arr2
required
This is the IATA code of the second arrival airport.
String
date2
required
Date of departure from the second airport.
Format - YYYY-MM-DD
String
dep3
required
This is the IATA code of the third departure airport.
String
arr3
required
This is the IATA code of the third arrival airport.
String
date3
required
Date of departure from the third airport.
String
number_of_adults
required
This is the number of adults.
String
number_of_childrens
required
This is the number of childrens.
String
number_of_infants
required
This is the number of infants.
String
cabin_class
required
This is the class of the seat in the plane.
Possible Values- "Economy", "Business", "First" or "Premium_Economy"
String
currency
required
You can use any currency code like USD, INR, EUR, etc