The Flight Labs API was built to provide a simple way of accessing global aviation data for real-time and historical flights as well as allow customers to tap into an extensive data set of airline routes and other up-to-date aviation-related information.
Quickstart
Requests to the REST API are made using a straightforward HTTP GET URL structure and responses are provided in lightweight JSON format.
Example API Request:
https://goflightlabs.com/flights?access_key=YOUR_ACCESS_KEY
# Retrieve Countries
This API endpoint offers a list of countries along with essential details such as country code, market, currency title, currency code, and currency symbol.
Example API Request:
https://app.goflightlabs.com/retrieveCountries?access_key=YOUR_ACCESS_KEY
HTTP GET Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Your API access key, which can be found in your acccount dashboard. |
Example API Response:
{
"country": "Andorra",
"countryCode": "AD",
"market": "es-ES",
"currencyTitle": "Euro",
"currency": "EUR",
"currencySymbol": "€",
"site": "www.skyscanner.net"
},
{
"country": "United Arab Emirates",
"countryCode": "AE",
"market": "en-US",
"currencyTitle": "United Arab Emirates Dirham",
"currency": "AED",
"currencySymbol": "AED",
"site": "www.skyscanner.ae"
},
{
"country": "Afghanistan",
"countryCode": "AF",
"market": "en-GB",
"currencyTitle": "Afghan Afghani",
"currency": "AFN",
"currencySymbol": "AFN",
"site": "www.skyscanner.net"
},
# Retrieve Airport
This API endpoint enables the retrieval of a list of airports situated at the specified location.
Example API Request:
https://app.goflightlabs.com/retrieveAirport?access_key=YOUR_ACCESS_KEY&query=New
HTTP GET Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Your API access key, which can be found in your acccount dashboard. |
query |
[Required] Location name of the situated Airport. |
Example API Response:
{
"skyId": "NYCA",
"entityId": "27537542",
"presentation": {
"title": "New York",
"suggestionTitle": "New York (Any)",
"subtitle": "United States"
},
"navigation": {
"entityId": "27537542",
"entityType": "CITY",
"localizedName": "New York",
"relevantFlightParams": {
"skyId": "NYCA",
"entityId": "27537542",
"flightPlaceType": "CITY",
"localizedName": "New York"
},
"relevantHotelParams": {
"entityId": "27537542",
"entityType": "CITY",
"localizedName": "New York"
}
}
},
# Retrieve Flights
This API endpoint offers the functionality to retrieve, monitor, and explore a wide range of flight options. It allows you to search for flights between specified origin and destination, including pricing details. The API further supports the application of filters and provides the ability to sort results according to your preferences.
Example API Request:
https://app.goflightlabs.com/retrieveFlights?access_key=YOUR_ACCESS_KEY&originSkyId=LOND&destinationSkyId=NYCA&originEntityId=27544008&destinationEntityId=27537542&date=2023-10-29
HTTP GET Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Your API access key, which can be found in your acccount dashboard. |
originSkyId |
[Required] Extract the originSkyId code from the retrieveAirport endpoint. |
destinationSkyId |
[Required] Retrieve the destinationSkyId code from the retrieveAirport endpoint. |
originEntityId |
[Required] The originEntityId code is attainable from the retrieveAirport endpoint. |
destinationEntityId |
[Required] The destinationEntityId code is retrievable from the retrieveAirport endpoint. |
date |
[Required] Date of departure or travel. Format: YYYY-MM-DD. |
returnDate |
[Optional] Date of return. Format: YYYY-MM-DD. |
adults |
[Optional] Number of adults (aged 18 and over) Default value: 1. |
cabinClass |
[Optional] Possible values: economy, premium_economy, business, first. |
sortBy |
[Optional] Possible values: best, price_high, fastest, outbound_take_off_time, outbound_landing_time, return_take_off_time, return_landing_time. |
childrens |
[Optional] Number of children (aged 2-12 years). |
infants |
[Optional] Number of infants (under 2 years old). |
currency |
[Optional] Desired currency. For example USD. Can be obtained from the endpoint retrieveCountries. |
market |
[Optional] For example en-US. Can be obtained from the endpoint retrieveCountries. |
countryCode |
[Optional] For example US. Can be obtained from the endpoint retrieveCountries. |
Example API Response:
{
"context": {
"status": "incomplete",
"totalResults": 10
},
"itineraries": [
{
"id": "13542-2310291235--30598-0-12712-2310291650",
"price": {
"raw": 221.56,
"formatted": "$222"
},
"legs": [
{
"id": "13542-2310291235--30598-0-12712-2310291650",
"origin": {
"id": "LGW",
"name": "London Gatwick",
"displayCode": "LGW",
"city": "London",
"isHighlighted": false
},
"destination": {
"id": "JFK",
"name": "New York John F. Kennedy",
"displayCode": "JFK",
"city": "New York",
"isHighlighted": false
},
"durationInMinutes": 495,
"stopCount": 0,
"isSmallestStops": false,
"departure": "2023-10-29T12:35:00",
"arrival": "2023-10-29T16:50:00",
"timeDeltaInDays": 0,
"carriers": {
"marketing": [
{
"id": -30598,
"logoUrl": "https://logos.skyscnr.com/images/airlines/favicon/I%29.png",
"name": "Norse Atlantic Airways (UK)"
}
],
"operationType": "fully_operated"
},
"segments": [
{
"id": "13542-12712-2310291235-2310291650--30598",
"origin": {
"flightPlaceId": "LGW",
"displayCode": "LGW",
"parent": {
"flightPlaceId": "LOND",
"displayCode": "LON",
"name": "London",
"type": "City"
},
"name": "London Gatwick",
"type": "Airport"
},
"destination": {
"flightPlaceId": "JFK",
"displayCode": "JFK",
"parent": {
"flightPlaceId": "NYCA",
"displayCode": "NYC",
"name": "New York",
"type": "City"
},
"name": "New York John F. Kennedy",
"type": "Airport"
},
"departure": "2023-10-29T12:35:00",
"arrival": "2023-10-29T16:50:00",
"durationInMinutes": 495,
"flightNumber": "701",
"marketingCarrier": {
"id": -30598,
"name": "Norse Atlantic Airways (UK)",
"alternateId": "I)",
"allianceId": 0
},
"operatingCarrier": {
"id": -30598,
"name": "Norse Atlantic Airways (UK)",
"alternateId": "I)",
"allianceId": 0
}
}
]
}
],
"isSelfTransfer": false,
"isProtectedSelfTransfer": false,
"farePolicy": {
"isChangeAllowed": false,
"isPartiallyChangeable": false,
"isCancellationAllowed": false,
"isPartiallyRefundable": false
},
"eco": {
"ecoContenderDelta": 12.586456
},
"tags": [
"cheapest"
],
"isMashUp": false,
"hasFlexibleOptions": false,
"score": 0.931935
}
],
"messages": [],
"filterStats": {
"duration": {
"min": 490,
"max": 939
},
"airports": [
{
"city": "London",
"airports": [
{
"id": "LGW",
"name": "London Gatwick"
},
{
"id": "LHR",
"name": "London Heathrow"
},
{
"id": "STN",
"name": "London Stansted"
}
]
},
{
"city": "New York",
"airports": [
{
"id": "JFK",
"name": "New York John F. Kennedy"
},
{
"id": "EWR",
"name": "New York Newark"
},
{
"id": "SWF",
"name": "Stewart International"
}
]
}
],
"stopPrices": {
"direct": {
"isPresent": true,
"formattedPrice": "$222"
},
"one": {
"isPresent": true,
"formattedPrice": "$308"
},
"twoOrMore": {
"isPresent": false
}
}
},
"flightsSessionId": "8fe142bc-68c4-448c-828b-fcb768678acd",
"sessionId": "418d0088-89c8-4586-a8a3-590e4c7f677b"
}
# Retrieve Flight Details
This API endpoint enables the retrieval of comprehensive details for a specific flight based on an individual ID.
Example API Request:
https://app.goflightlabs.com/retrieveFlightDetails?access_key=YOUR_ACCESS_KEY
HTTP GET Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Your API access key, which can be found in your acccount dashboard. |
itineraryId |
[Required] itineraryId can be obtained from the retrieveFlights endpoint as the "id." |
legs (object) |
[Required] The leg entries should include origin, originEntityId, destination, destinationEntityId, and date, formatted as objects within an array. Example: [{'origin': 'LHR','originEntityId': '95565050','destination': 'JFK','destinationEntityId': '95565058','date': '2024-01-07'},…] |
sessionId |
[Required] The sessionId code is attainable from the retrieveFlight endpoint. |
returnDate |
[Optional] Date of return. Format: YYYY-MM-DD. |
adults |
[Optional] Number of adults (aged 18 and over) Default value: 1. |
childrens |
[Optional] Number of children (aged 2-12 years). |
infants |
[Optional] Number of infants (under 2 years old). |
currency |
[Optional] Desired currency. For example USD. Can be obtained from the endpoint retrieveCountries. |
HTTP GET Request Body Example:
{
"itineraryId" : "13554-2310290600--31781-2-11442-2310292300",
"legs":[
{
"origin": "LHR",
"originEntityId": "95565050",
"destination": "EWR",
"destinationEntityId": "95565059",
"date": "2023-10-29"
}
],
"sessionId" : "b2ed9636-4571-4f19-b3fd-89f6498d9a8d"
}
Example API Response:
{
"itinerary": {
"legs": [
{
"id": "13554-2310290600--31781-2-11442-2310292300",
"origin": {
"id": "13554",
"name": "London Heathrow",
"displayCode": "LHR",
"city": "London"
},
"destination": {
"id": "11442",
"name": "New York Newark",
"displayCode": "EWR",
"city": "New York"
},
"segments": [
{
"id": "13554-13577-2310290600-2310290845--31781",
"origin": {
"id": "13554",
"name": "London Heathrow",
"displayCode": "LHR",
"city": "London"
},
"destination": {
"id": "13577",
"name": "Lisbon",
"displayCode": "LIS",
"city": "Lisbon"
},
"duration": 165,
"dayChange": 0,
"flightNumber": "TP1363",
"departure": "2023-10-29T06:00:00",
"arrival": "2023-10-29T08:45:00",
"marketingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"operatingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"goodToKnowItems": [
{
"icon": "duration",
"body": {
"value": "3h 15m connection in airport",
"isHighlighted": false,
"position": 0
}
}
]
},
{
"id": "13577-15055-2310291200-2310291300--31781",
"origin": {
"id": "13577",
"name": "Lisbon",
"displayCode": "LIS",
"city": "Lisbon"
},
"destination": {
"id": "15055",
"name": "Porto",
"displayCode": "OPO",
"city": "Porto"
},
"duration": 60,
"dayChange": 0,
"flightNumber": "TP1926",
"departure": "2023-10-29T12:00:00",
"arrival": "2023-10-29T13:00:00",
"marketingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"operatingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"goodToKnowItems": [
{
"icon": "duration",
"body": {
"value": "You have a 5h 45m wait here",
"isHighlighted": false,
"position": 1
},
"badge": {
"value": "Long Wait",
"isHighlighted": false,
"position": 0
}
}
]
},
{
"id": "15055-11442-2310291845-2310292300--31781",
"origin": {
"id": "15055",
"name": "Porto",
"displayCode": "OPO",
"city": "Porto"
},
"destination": {
"id": "11442",
"name": "New York Newark",
"displayCode": "EWR",
"city": "New York"
},
"duration": 495,
"dayChange": 0,
"flightNumber": "TP211",
"departure": "2023-10-29T18:45:00",
"arrival": "2023-10-29T23:00:00",
"marketingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"operatingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
}
}
],
"layovers": [
{
"segmentId": "13554-13577-2310290600-2310290845--31781",
"origin": {
"id": "13577",
"name": "Lisbon",
"displayCode": "LIS",
"city": "Lisbon"
},
"destination": {
"id": "13577",
"name": "Lisbon",
"displayCode": "LIS",
"city": "Lisbon"
},
"duration": 195
},
{
"segmentId": "13577-15055-2310291200-2310291300--31781",
"origin": {
"id": "15055",
"name": "Porto",
"displayCode": "OPO",
"city": "Porto"
},
"destination": {
"id": "15055",
"name": "Porto",
"displayCode": "OPO",
"city": "Porto"
},
"duration": 345
}
],
"duration": 1260,
"stopCount": 2,
"departure": "2023-10-29T06:00:00",
"arrival": "2023-10-29T23:00:00",
"dayChange": 0,
"orderedGoodToKnow": [
"Long Wait"
]
}
],
"pricingOptions": [
{
"agents": [
{
"id": "tap_",
"name": "TAP Air Portugal",
"isCarrier": true,
"bookingProposition": "PBOOK",
"url": "https://www.skyscanner.net/transport_deeplink/4.0/US/en-US/USD/tap_/1/13554.11442.2023-10-29/air/airli/flights?itinerary=flight|-31781|1363|13554|2023-10-29T06:00|13577|2023-10-29T08:45|165|HL0BSI03|H|BASINT;flight|-31781|1926|13577|2023-10-29T12:00|15055|2023-10-29T13:00|60|HL0BSI03|H|BASINT;flight|-31781|211|15055|2023-10-29T18:45|11442|2023-10-29T23:00|495|HL0BSI03|H|BASINT&carriers=-31781&operators=-31781;-31781;-31781&passengers=1&channel=iphone&cabin_class=economy&fps_session_id=2af65e99-5c24-493e-9cae-14997dad9952&ticket_price=958.25&is_npt=false&is_multipart=false&client_id=skyscanner_app&q_ids=H4sIAAAAAAAA_-OS4mIpSSyIF2LmuKUixczRo6vQcPDbSjYjJgVGAFrjKR4cAAAA|-3768974980205434529|2&q_sources=JACQUARD&commercial_filters=false&q_datetime_utc=2023-08-14T16:24:25&pqid=false",
"price": 958.25,
"rating": {
"value": 2.7,
"count": 374
},
"updateStatus": "PENDING",
"segments": [
{
"id": "13554-13577-2310290600-2310290845--31781",
"origin": {
"id": "13554",
"name": "London Heathrow",
"displayCode": "LHR",
"city": "London"
},
"destination": {
"id": "13577",
"name": "Lisbon",
"displayCode": "LIS",
"city": "Lisbon"
},
"duration": 165,
"dayChange": 0,
"flightNumber": "TP1363",
"departure": "2023-10-29T06:00:00",
"arrival": "2023-10-29T08:45:00",
"marketingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"operatingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"goodToKnowItems": [
{
"icon": "duration",
"body": {
"value": "3h 15m connection in airport",
"isHighlighted": false,
"position": 0
}
}
]
},
{
"id": "13577-15055-2310291200-2310291300--31781",
"origin": {
"id": "13577",
"name": "Lisbon",
"displayCode": "LIS",
"city": "Lisbon"
},
"destination": {
"id": "15055",
"name": "Porto",
"displayCode": "OPO",
"city": "Porto"
},
"duration": 60,
"dayChange": 0,
"flightNumber": "TP1926",
"departure": "2023-10-29T12:00:00",
"arrival": "2023-10-29T13:00:00",
"marketingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"operatingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"goodToKnowItems": [
{
"icon": "duration",
"body": {
"value": "You have a 5h 45m wait here",
"isHighlighted": false,
"position": 1
},
"badge": {
"value": "Long Wait",
"isHighlighted": false,
"position": 0
}
}
]
},
{
"id": "15055-11442-2310291845-2310292300--31781",
"origin": {
"id": "15055",
"name": "Porto",
"displayCode": "OPO",
"city": "Porto"
},
"destination": {
"id": "11442",
"name": "New York Newark",
"displayCode": "EWR",
"city": "New York"
},
"duration": 495,
"dayChange": 0,
"flightNumber": "TP211",
"departure": "2023-10-29T18:45:00",
"arrival": "2023-10-29T23:00:00",
"marketingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
},
"operatingCarrier": {
"id": "-31781",
"name": "TAP Air Portugal",
"displayCode": "TP",
"displayCodeType": "IATA",
"brandColor": "#ED1C24",
"logo": "https://content.skyscnr.com/26a519b98d3d202b05c9c26c57ed0d48/ai-template-tap-air-portugal-thumb-1-xxxhdpi.png",
"altId": "TP"
}
}
],
"isDirectDBookUrl": false,
"quoteAge": 17
}
],
"totalPrice": 958.25
}
],
"isTransferRequired": false,
"destinationImage": "https://content.skyscnr.com/b62fd4346123d1eb9f7525c8f72f2a8a/stock-photo-new-york-city-at-twilight-128894587.jpg",
"operatingCarrierSafetyAttributes": [
{
"carrierID": "-31781",
"carrierName": "TAP Air Portugal",
"faceMasksCompulsory": null,
"aircraftDeepCleanedDaily": null,
"attendantsWearPPE": null,
"cleaningPacksProvided": null,
"foodServiceChanges": null,
"safetyUrl": null
}
],
"flexibleTicketPolicies": []
},
"pollingCompleted": false
}