# Retrieve Flights
The following Endpoint will provide you with the price of a flight based on the input parameters entered. In addition to the price, it will provide you with detailed information about the origin, destination, duration, information about the carrier, among others.
Example API Request:
https://www.goflightlabs.com/retrieveFlights?
access_key=YOUR_ACCESS_KEY&originIATACode=LGW&destinationIATACode=JFK&date=2025-12-04&returnDate=2025-12-11&sortBy=best&mode=roundtrip
HTTP GET Request Parameters:
| Parameter | Description | |
|---|---|---|
access_key |
required | Your API access key, which can be found in your account dashboard. |
originIATACode |
required | Three-letter IATA code for the origin airport (use Retrieve Airports to obtain it). |
destinationIATACode |
required | Three-letter IATA code for the destination airport. |
date |
required | Date of departure (YYYY-MM-DD). |
returnDate |
optional | Date of return for roundtrips (YYYY-MM-DD). |
sortBy |
optional | Sort order for the scraping output. Possible values: best, cheapest, quickest. Default: best. |
mode |
optional | Flight mode. Possible values: roundtrip (default) or oneway. |
Example API Response:
{
"flights": [
{
"price": 283,
"currency": "USD",
"origin": {
"code": "LGW",
"city": "London"
},
"destination": {
"code": "JFK",
"city": "New York"
},
"departure": "2024-04-25T13:05:00",
"arrival": "2024-04-25T15:55:00",
"durationInMinutes": 470,
"stopCount": 0,
"flightNumber": "701",
"marketingCarrier": "Norse Atlantic Airways (UK)",
"operatingCarrier": "Norse Atlantic Airways (UK)"
},
{...}
]
}
API Response Objects:
| Response Object | Description |
|---|---|
flights |
Array of scraped flight options. |
price |
Numeric price value for the flight. |
currency |
Currency code associated with the price (e.g., USD). |
origin |
Object describing the departure airport. |
origin.code |
IATA code of the origin airport. |
origin.city |
City where the origin airport is located. |
destination |
Object describing the arrival airport. |
destination.code |
IATA code of the destination airport. |
destination.city |
City where the destination airport is located. |
departure |
ISO datetime for takeoff. |
arrival |
ISO datetime for landing. |
durationInMinutes |
Total flight duration in minutes. |
stopCount |
Number of stops or layovers. |
flightNumber |
Marketing flight number. |
marketingCarrier |
Carrier selling or marketing the flight. |
operatingCarrier |
Carrier operating the aircraft. |