Flight Price API: Search Fares by Airport IATA
A flight price API returns fares between two airports as JSON — not a live map pin, and not an airport timetable. FlightLabs exposes that as GET /retrieveFlights (product page: flight prices). Pass origin and destination IATA codes plus a departure date. Auth is the access_key query parameter, same as other FlightLabs endpoints.
There is no frozen fare fixture in the public docs or in this repo: the product page’s live response pane is empty until you run the endpoint, and no sample JSON is checked into infra. Use the official request curl, then read the field list on the docs page. Interactive docs: api.goflightlabs.com/flight-prices.
Flight price API request
curl "https://api.goflightlabs.com/retrieveFlights?access_key=YOUR_ACCESS_KEY&originIATACode=LGW&destinationIATACode=JFK&date=YYYY-MM-DD&mode=oneway&sortBy=cheapest"
Required (from the public parameter table and the product MCP): originIATACode, destinationIATACode, date (YYYY-MM-DD). Optional: returnDate (roundtrips), sortBy (best | cheapest | quickest), mode (roundtrip | oneway). The example airports are London Gatwick (LGW) to New York JFK (JFK). Replace YYYY-MM-DD with the departure date you are searching — it is not a frozen sample date.
This is the fare-search URL. It is not /flights-schedules (airport board) and not live-map /flights.
What the flight price JSON includes
Public docs list these fields. There is no frozen fare object to paste here — run the curl with your key:
flights— array of flight options (default whengroup_by_roundtripis false or omitted).pairs— roundtrip itineraries whengroup_by_roundtrip=true; each item hasoutboundandinboundlegs.unpairedholds legs that could not be grouped.price— numeric price for the flight or leg.currency— currency code (docs example: USD).origin/destination— airport objects withcode(IATA) andcity.departure/arrival— datetimes (ISO 8601).durationInMinutes.stopCount.flightNumber,marketingCarrier,operatingCarrier.
Need a roundtrip? Add returnDate and mode=roundtrip:
curl "https://api.goflightlabs.com/retrieveFlights?access_key=YOUR_ACCESS_KEY&originIATACode=LGW&destinationIATACode=JFK&date=YYYY-MM-DD&returnDate=YYYY-MM-DD&mode=roundtrip&sortBy=best"
JavaScript: search LGW → JFK
Same query params as the documented curl. Replace YYYY-MM-DD with a real departure date — it is not a frozen sample:
const params = new URLSearchParams({
access_key: 'YOUR_ACCESS_KEY',
originIATACode: 'LGW',
destinationIATACode: 'JFK',
date: 'YYYY-MM-DD',
mode: 'oneway',
sortBy: 'cheapest',
});
const res = await fetch('https://api.goflightlabs.com/retrieveFlights?' + params);
const json = await res.json();
console.log(json.flights?.[0]?.price, json.flights?.[0]?.currency);
Field names follow the public docs list (flights, price, currency). There is no frozen fare fixture to assert against — log the live object once with your key.
Go live with FlightLabs prices
1. Create an account — 7-day trial on every plan (or 50 requests, whichever comes first).
2. Copy your access_key from the dashboard.
3. Call /retrieveFlights with origin/destination IATA and a YYYY-MM-DD date (example: LGW → JFK).
4. Read price and currency from the live payload. Cache per search; fares move.
Starter is $24.99/mo for 4,000 calls (10 req / 10 sec). Same aviation dataset as higher tiers: live flights, historical, delays, routes, prices. Upgrade only when the quota runs out. Soft Limit (extra usage beyond the plan) is on by default and can be turned off in account settings.
Endpoint page: goflightlabs.com/flight-prices. Interactive docs: api.goflightlabs.com/flight-prices.
FAQ: flight price API
Is this the airport timetable?
No. Schedules are /flights-schedules. /retrieveFlights is fare search by origin/destination IATA and date.
What do I pass?
Required originIATACode, destinationIATACode, and date. Optional returnDate, sortBy (best | cheapest | quickest), mode (roundtrip | oneway).
Which plan includes prices?
Paid plans list the same aviation dataset including prices. Starter is $24.99/mo, 4,000 calls, 7-day trial (or 50 requests).