✈️Multi Trip API

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.

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

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

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

String

arr3 required

String

date3 required

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

String

Usage

You have to send a GET request to https://api.flightapi.io/multicity 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/multicity/610ae5eb1c7b751ef42b2e75ae1/2/1/0/0/Economy/USD?dep1=SFO&arr1=ARN&date1=2024-12-11&dep2=ARN&arr2=LHR&date2=2024-12-15"

Response

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

// Sample Response

{
  "legs": [
    {      
      "id": "JAI-GOA:UK564~5:LX155~6:LX3618~6:LH6920~6:0",
      "departureTime": "19:55",
      "arrivalTime": "12:50",
      "duration": "20h 25m",
      "departureAirportCode": "JAI",
      "arrivalAirportCode": "GOA",
      "airlineCodes": [
        "LX",
        "UK",
        "LH"
      ],
      "stopoverAirportCodes": [
        "BOM",
        "ZRH",
        "MUC"
      ],
      "allianceCodes": [
        "",
        "star_alliance"
      ],
      "stopoversCount": 3,
      "departureTimeMinutes": 1195,
      "arrivalTimeMinutes": 770,
      "departureDateTime": "2023-07-05T19:55:00.000+05:30",
      "arrivalDateTime": "2023-07-06T12:50:00.000+02:00",
      "stopoverDurationMinutes": 445,
      "durationMinutes": 1225,
      "overnight": true,
      "stopoverDuration": "07h 25m",
      "durationDays": 1,
      "longStopover": true,
      "segments": [
        {
          "durationMinutes": 125,
          "stopoverDurationMinutes": 175,
          "departureAirportCode": "JAI",
          "arrivalAirportCode": "BOM",
          "airlineCode": "UK",
          "cabin": "economy",
          "designatorCode": "UK564",
          "departureDateTime": "2023-07-05T19:55:00.000+05:30",
          "arrivalDateTime": "2023-07-05T22:00:00.000+05:30"
        },
        {
          "durationMinutes": 530,
          "stopoverDurationMinutes": 185,
          "departureAirportCode": "BOM",
          "arrivalAirportCode": "ZRH",
          "airlineCode": "LX",
          "cabin": "economy",
          "designatorCode": "LX155",
          "departureDateTime": "2023-07-06T00:55:00.000+05:30",
          "arrivalDateTime": "2023-07-06T06:15:00.000+02:00"
        },
        {
          "durationMinutes": 50,
          "stopoverDurationMinutes": 85,
          "departureAirportCode": "ZRH",
          "arrivalAirportCode": "MUC",
          "airlineCode": "LX",
          "operatingAirlineCode": "LH",
          "cabin": "economy",
          "designatorCode": "LX3618",
          "departureDateTime": "2023-07-06T09:20:00.000+02:00",
          "arrivalDateTime": "2023-07-06T10:10:00.000+02:00"
        },
        {
          "durationMinutes": 75,
          "stopoverDurationMinutes": 0,
          "departureAirportCode": "MUC",
          "arrivalAirportCode": "GOA",
          "airlineCode": "LH",
          "operatingAirlineCode": "EN",
          "cabin": "economy",
          "designatorCode": "LH6920",
          "departureDateTime": "2023-07-06T11:35:00.000+02:00",
          "arrivalDateTime": "2023-07-06T12:50:00.000+02:00"
        }
      ],
      "operatingAirlineCodes": [
        "EN"
      ],
      "stopoverCode": "MORE_THAN_ONE_STOP",
      "shortStopover": false,
      "earlyDeparture": false,
      "lateArrival": false,
      "newAircraft": false,
      "oldAircraft": true,
      "highlyRatedCarrier": false,
      "score": 628.5
    }       
  ],
  "tags": [
    
  ],
  "search": {
    "id": "f03653ce738ae2e5msr",
    "cabin": "economy",
    "adultsCount": 1,
    "childrenCount": 0,
    "infantsCount": 0,
    "siteCode": "US",
    "currencyCode": "USD",
    "locale": "en",
    "deviceType": "desktop",
    "appType": "WEB_APP",
    "createdAt": "2023-05-27T11:51:26.651Z",
    "key": "[JAI:GOA:2023-07-05]~1~0~0~US~economy~desktop~WEB_APP",
    "userCountryCode": "US",
    "wgCampaign": "",
    "legs": [
      {
        "id": "JAI:GOA:2023-07-05",
        "outboundDate": "2023-07-05",
        "departureAirportCode": "JAI",
        "arrivalAirportCode": "GOA",
        "departureCity": {
          "code": "JAI",
          "name": "Jaipur",
          "enName": "Jaipur",
          "countryCode": "IN",
          "countryName": "India",
          "countryEnName": "India",
          "worldRegionCode": "i",
          "worldRegionName": "Asia",
          "worldRegionEnName": "Asia"
        },
        "arrivalCity": {
          "code": "GOA",
          "name": "Genoa",
          "enName": "Genoa",
          "countryCode": "IT",
          "countryName": "Italy",
          "countryEnName": "Italy",
          "worldRegionCode": "e",
          "worldRegionName": "Europe",
          "worldRegionEnName": "Europe"
        },
        "departureAirport": {
          "name": "Jaipur Airport",
          "code": "JAI",
          "cityCode": "JAI"
        },
        "arrivalAirport": {
          "name": "Genoa Airport",
          "code": "GOA",
          "cityCode": "GOA"
        }
      }
    ]
  },"airlines": [
    {
      "name": "Air Dolomiti",
      "code": "EN"
    },
    {
      "name": "Air France",
      "code": "AF"
    },
    {
      "name": "Emirates",
      "code": "EK"
    },
    {
      "name": "Etihad Airways",
      "code": "EY"
    },
    {
      "name": "KLM",
      "code": "KL"
    },
    {
      "name": "KLM Cityhopper",
      "code": "WA"
    },
    {
      "name": "Lufthansa",
      "code": "LH"
    },
    {
      "name": "Turkish Airlines",
      "code": "TK"
    },
    {
      "name": "Virgin Atlantic Airways",
      "code": "VS"
    },
    {
      "name": "Vistara",
      "code": "UK"
    }
  ],
  "airports": [
    {
      "name": "Abu Dhabi International Airport",
      "code": "AUH",
      "cityCode": "AUH"
    },
    {
      "name": "Geneva Airport",
      "code": "GVA",
      "cityCode": "GVA"
    },
    {
      "name": "Genoa Airport",
      "code": "GOA",
      "cityCode": "GOA"
    },
    {
      "name": "Hamad International Airport",
      "code": "DOH",
      "cityCode": "DOH"
    },
    {
      "name": "Istanbul Airport",
      "code": "IST",
      "cityCode": "IST"
    },
    {
      "name": "Jaipur Airport",
      "code": "JAI",
      "cityCode": "JAI"
    },
    {
      "name": "Zurich Airport",
      "code": "ZRH",
      "cityCode": "ZRH"
    }
  ],
  "trips": [
    {
      "id": "f03653ce738ae2e5msr:KL3661~5-KL872~6-KL1565~6",
      "code": "KL3661~5-KL872~6-KL1565~6",
      "legIds": [
        "JAI-GOA:KL3661~5:KL872~6:KL1565~6:0"
      ]
    },
    {
      "id": "f03653ce738ae2e5msr:6E5237~5-EY203~5-EY85~6-AZ1383~6",
      "code": "6E5237~5-EY203~5-EY85~6-AZ1383~6",
      "legIds": [
        "JAI-GOA:6E5237~5:EY203~5:EY85~6:AZ1383~6:0"
      ]
    },
    {
      "id": "f03653ce738ae2e5msr:6E2405~5-AZ769~6-AZ1383~6",
      "code": "6E2405~5-AZ769~6-AZ1383~6",
      "legIds": [
        "JAI-GOA:6E2405~5:AZ769~6:AZ1383~6:0"
      ]
    }
  ],
  "fares": [
    {
      "paymentFees": [
        {
          "paymentMethodId": 15,
          "currencyCode": "USD",
          "amount": 0,
          "amountUsd": 0,
          "totalAmount": 0,
          "totalAmountUsd": 0
        },
        {
          "paymentMethodId": 10,
          "currencyCode": "USD",
          "amount": 0,
          "amountUsd": 0,
          "totalAmount": 0,
          "totalAmountUsd": 0
        },
        {
          "paymentMethodId": 3,
          "currencyCode": "USD",
          "amount": 0,
          "amountUsd": 0,
          "totalAmount": 0,
          "totalAmountUsd": 0
        }
      ],
      "id": "f03653ce738ae2e5msr:mytrip.com.us:7755cd345469a40f",
      "price": {
        "totalAmount": 465,
        "totalAmountUsd": 464.88,
        "amount": 465,
        "amountUsd": 464.88,
        "originalAmount": 464.88,
        "originalAmountUsd": 464.88,
        "amountPerAdult": 464.88,
        "amountPerChild": 0,
        "amountPerInfant": 0,
        "taxAmount": 0,
        "taxAmountUsd": 0,
        "totalTaxAmount": 0,
        "totalTaxAmountUsd": 0,
        "currencyCode": "USD",
        "paymentFeeAmountUsd": 0,
        "bookingFee": 0,
        "bookingFeeUsd": 0,
        "totalBookingFee": 0,
        "totalBookingFeeUsd": 0
      },
      "providerCode": "mytrip.com.us",
      "handoffUrl": "https://handoff.wego.com/flights/continue?currency=USD&url_locale=en&site_code=US&device_type=desktop&app_type=WEB_APP&domain=www.wego.com&fare_id=f03653ce738ae2e5msr:mytrip.com.us:7755cd345469a40f&route=JAI-GOA&search_id=f03653ce738ae2e5msr&trip_id=JAI:GOA:2023-07-05&pwa=false&api_version=2&integration_code=mytrip.com&region=ap-southeast-1&placement_type=metasearch",
      "ecpc": 0.560586,
      "remainingSeatsCount": 0,
      "conditionIds": [
        
      ],
      "legConditionIds": [
        
      ],
      "refundable": false,
      "exchangeable": false,
      "tags": [
        
      ],
      "score": 286.12,
      "tripId": "f03653ce738ae2e5msr:I5773~5-AZ769~6-AZ1383~6"
    }
  ]
  }
  

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.

Last updated