Flight Schedules API for John F. Kennedy International Airport (JFK)
You need to keep a dependable schedule feed for New York’s busiest international gateway without babysitting another brittle scraper. By the end of this guide, you’ll fetch, cache, and enrich John F. Kennedy International Airport (JFK) schedules using FlightLabs, and wire them into arrival boards, delay alerts, and calendar sync in a way that scales.
Why focus on JFK schedules
John F. Kennedy International Airport (IATA: JFK, ICAO: KJFK) serves New York City and is a major global hub with multiple terminals and a dense long-haul network. Developers track JFK because changes ripple across international connections, VIP pickups, airport displays, and logistics. A robust schedules feed lets you plan reliably, while real-time status can be layered on top for last‑minute adjustments.
Endpoints you’ll use for JFK
This article centers on the schedules endpoint, and shows how you can combine it with real-time flight status and airport info to build production features for JFK:
| Endpoint | Primary Use at JFK | Key Query/Filter | Important Fields | Notes |
|---|---|---|---|---|
| /flights-schedules | Fetch arrival/departure schedules baseline | iataCode=JFK, type=arrival|departure | flight_number, departure.scheduled, arrival.scheduled, airline.iata/name, aircraft.type | Use as your canonical daily plan for boards, calendar sync, staffing |
| Real-time Flight Tracking | Overlay live status, terminal and gate changes | Filter by flight IATA/ICAO or origin/destination | status, departure.actual, departure.gate/terminal, arrival.estimated/gate/terminal, position | Poll at a sensible cadence; cache to minimize load |
| Airport Information | Resolve JFK metadata for displays | iata=JFK | name, timezone, terminals, runways | Timezone is essential for rendering local times correctly |
Getting JFK schedules with a single request
The schedules API returns a normalized timetable you can consume regardless of airline. Use the IATA code for JFK and specify the flow (arrivals or departures).
cURL: JFK arrival schedules
curl -G "https://api.goflightlabs.com/flights-schedules" \
--data-urlencode "iataCode=JFK" \
--data-urlencode "type=arrival" \
--data-urlencode "access_key=YOUR_API_KEY"
Notes:
- iataCode: Always “JFK” to target John F. Kennedy International.
- type: Use “arrival” for inbound schedules or “departure” for outbound.
- Authentication: Replace YOUR_API_KEY with your key. If you don’t have one, you can Register for a 7‑day trial (or 50 requests).
JavaScript example: integrate JFK arrivals
async function fetchJfkArrivals() {
const params = new URLSearchParams({
iataCode: "JFK",
type: "arrival",
access_key: "YOUR_API_KEY"
});
const res = await fetch(`https://api.goflightlabs.com/flights-schedules?${params.toString()}`);
if (!res.ok) {
throw new Error(`HTTP ${res.status}`);
}
const json = await res.json();
// Expect a structure similar to the official schedule sample below.
// Normalize to the fields your UI needs.
const schedules = (json.data && json.data.schedules) ? json.data.schedules : [];
return schedules.map(s => ({
flightNumber: s.flight_number,
airlineIata: s.airline && s.airline.iata,
airlineName: s.airline && s.airline.name,
origin: s.departure && s.departure.airport, // For arrivals into JFK
originTerminal: s.departure && s.departure.terminal,
originScheduledUtc: s.departure && s.departure.scheduled,
destination: s.arrival && s.arrival.airport, // Should be "JFK"
arrivalTerminal: s.arrival && s.arrival.terminal,
arrivalScheduledUtc: s.arrival && s.arrival.scheduled,
aircraftType: s.aircraft && s.aircraft.type,
aircraftReg: s.aircraft && s.aircraft.registration
}));
}
// Example usage
fetchJfkArrivals()
.then(arrivals => {
// Render top 5 arrivals by scheduled time
const top = arrivals
.filter(a => !!a.arrivalScheduledUtc)
.sort((a, b) => new Date(a.arrivalScheduledUtc) - new Date(b.arrivalScheduledUtc))
.slice(0, 5);
console.log(top);
})
.catch(err => console.error(err));
Official schedule response format
The response for JFK follows the same structure as the official sample below. You will see the same keys (flight_number, departure/arrival blocks, airline, aircraft), with airport codes corresponding to your query (JFK for the selected flow).
{
"success": true,
"data": {
"schedules": [
{
"flight_number": "UA456",
"departure": {
"airport": "SFO",
"scheduled": "2024-03-20T08:00:00Z",
"terminal": "3"
},
"arrival": {
"airport": "ORD",
"scheduled": "2024-03-20T14:15:00Z",
"terminal": "1"
},
"aircraft": {
"type": "Boeing 787-9",
"registration": "N123UA"
},
"airline": {
"name": "United Airlines",
"iata": "UA"
}
}
]
}
}
Field highlights:
- flight_number: Use this to key each schedule item and to correlate with real-time status calls.
- departure/arrival.airport: IATA airports involved. For JFK arrivals, expect arrival.airport to be “JFK”. For JFK departures, expect departure.airport to be “JFK”.
- departure/arrival.scheduled: ISO‑8601 timestamps in UTC (note the trailing “Z”). Convert to JFK’s local time zone for UI display.
- departure/arrival.terminal and gate (when present): Use for signage, wayfinding, and pickup instructions.
- airline.iata/name: Render logo and branding, or filter by carrier.
- aircraft.type/registration: Useful for seat maps and ops planning.
Layering real-time status on top of schedules
Schedules are your baseline; real-time is your truth source for changes on the day of operation. The FlightLabs real-time structure includes status, live time adjustments, and gate/terminal details you can merge onto your schedule entries keyed by the flight number or IATA code.
{
"success": true,
"data": {
"flight": {
"iata": "AA123",
"icao": "AAL123",
"number": "123",
"status": "en-route",
"departure": {
"airport": "JFK",
"scheduled": "2024-03-20T10:00:00Z",
"actual": "2024-03-20T10:05:00Z",
"terminal": "8",
"gate": "B12"
},
"arrival": {
"airport": "LAX",
"scheduled": "2024-03-20T13:15:00Z",
"estimated": "2024-03-20T13:20:00Z",
"terminal": "4",
"gate": "45A"
},
"position": {
"latitude": 39.8729,
"longitude": -98.7372,
"altitude": 35000,
"speed": 495,
"heading": 270
}
}
}
}
How to use these fields with JFK schedules:
- status: Distinguish scheduled, en‑route, landed, diverted, canceled. If a flight is canceled, suppress it from boards or mark clearly.
- departure.actual and arrival.estimated: Derive delay minutes by comparing to scheduled. Update ETAs/ETDs without rewriting the base schedule record.
- terminal and gate: Overwrite schedule terminal/gate for live displays. Use JFK terminal IDs to route passengers and drivers.
- position: Helpful for in‑air ETAs, but most schedule UIs only need the estimated time and status.
Time zones, polling, and caching for JFK
Timestamps in samples are UTC (ending in “Z”). JFK’s local time zone is America/New_York. Convert UTC to local for display, but keep UTC in storage and comparisons.
- Conversion: Store scheduled, estimated, and actual times in UTC. Convert to local only at render time.
- Polling cadence: For schedules, fetch once per planning cycle (e.g., a day or rolling 24h) and cache. For real-time overlays, poll more frequently during active windows (e.g., every 1–2 minutes within ±3 hours of scheduled time) and back off otherwise.
- Caching: Index cached items by a composite key (date + airline.iata + flight_number). Merge real-time updates onto the cached schedule object.
- Error handling: If the real-time request fails, fall back to schedule times but indicate “Live update unavailable”.
Three JFK use cases built on the schedule feed
1) Terminal arrival board for JFK
Start with /flights-schedules arrivals for JFK to build the list and order it by arrival.scheduled. For each row, if a real-time record exists, render: status, arrival.estimated, and arrival.gate/terminal. If a flight’s status indicates canceled or diverted, style it distinctly. Fields used: flight_number, arrival.scheduled, arrival.terminal, airline (name/iata); real-time: status, arrival.estimated, arrival.gate/terminal.
2) SMS delay alerts for ground transport pickups
For pickups at JFK, subscribe riders to flights (airline.iata + flight_number). Use the schedule for the initial ETA. Poll real-time and send alerts when arrival.estimated drifts from arrival.scheduled beyond a threshold (e.g., 15 minutes). Include terminal and gate if available. Fields used: arrival.scheduled, arrival.estimated, status, arrival.terminal/gate.
3) Calendar sync for corporate travelers
Create ICS events using schedule times as the event bounds. Store the flight key to backfill real-time changes. If the real-time status is “canceled,” mark the calendar event as canceled and notify the traveler. Fields used: departure.scheduled, arrival.scheduled, airline.iata/name, flight_number; real-time: status, departure.actual, arrival.estimated.
Building a JFK-aware data model
Represent each schedule as a normalized record with references to airline and airport codes. A recommended shape (conceptual, based on fields shown in samples):
- id: hash of flight_number + airline.iata + date
- flight: { number, airline: { iata, name } }
- legs: { departure: { airport, scheduled, terminal }, arrival: { airport, scheduled, terminal } }
- aircraft: { type, registration }
- live overlay: { status, times: { departureActual, arrivalEstimated }, terminalGate: { depTerminal, depGate, arrTerminal, arrGate } }
This lets you render JFK-specific screens by filtering arrival.airport === "JFK" or departure.airport === "JFK" and then layering in live updates if available.
Handling special cases at JFK
- Canceled flights: In real-time status, look for a canceled indicator and hide or mark in the UI. Preserve the schedule record for audit.
- Diverted flights: If status indicates diversion, remove from JFK arrival boards or annotate as diverted with the new arrival airport if available via your real-time integration.
- Gate or terminal swaps: Always prefer the latest real-time gate/terminal over schedule values. JFK has multiple active terminals; swaps are common.
- Day rollovers: When generating “today’s” schedules, account for UTC vs. local midnight to avoid off‑by‑one errors. Use UTC date partitions internally.
Pagination and windowing strategy
Flight schedule datasets can be large. When requesting JFK schedules, query in rolling windows (e.g., next 6–12 hours) and page through results if the endpoint supports pagination. If pagination parameters are not exposed in the request schema you’re using, segment by time windows or by airline to keep responses predictable and cacheable. Store a cursor in your cache for incremental refresh.
Tie-in: JFK metadata for displays and local times
To present local times and terminal lists correctly, fetch airport information once and cache it:
{
"success": true,
"data": {
"airport": {
"iata": "JFK",
"icao": "KJFK",
"name": "John F. Kennedy International Airport",
"location": {
"lat": 40.6413,
"lon": -73.7781,
"city": "New York",
"country": "United States"
},
"timezone": "America\/New_York",
"terminals": [
"1",
"2",
"4",
"5",
"7",
"8"
],
"runways": [
{
"length_ft": 14511,
"width_ft": 150,
"surface": "concrete",
"designator": "13L\/31R"
}
],
"weather": {
"temp_c": 22,
"visibility_km": 10,
"wind": {
"speed_kts": 8,
"direction_deg": 180
}
}
}
}
}
Use timezone for correct local rendering, and terminals for filtering and signage. You can browse endpoint options and schemas in the Documentation and manage keys and usage in the MCP.
Objective comparison: which endpoint to call when
Here’s a practical way to decide which API to use for a given JFK feature:
- Build boards, calendar entries, staffing rosters: Start with /flights-schedules using iataCode=JFK and the appropriate type. These fields are stable and uniform.
- Update boards and notify users: Pull real-time for status and estimated times. Merge onto schedule by flight_number and airline.iata.
- Show terminal lists and local timezone: Query airport information once and cache it for several hours or a day unless you need frequent weather updates.
On the technical side, schedules responses are compact and predictable for bulk operations. Real-time adds volatility and should be polled with exponential backoff and per-flight windows to control costs and rate usage. Airport info is low-churn and ideal for long-lived caches.
Pricing and getting started
FlightLabs offers a Starter plan (from $24.99/mo) and a trial option (7 days or 50 requests), which is enough to prototype a JFK board or alert service. Create your key here: Register. For endpoint details and parameter references, check the Documentation.
Implementation checklist for a JFK schedule app
- Call /flights-schedules with iataCode=JFK and type=arrival or departure.
- Persist results keyed by date + airline.iata + flight_number.
- Fetch real-time by the same key within a ±3h window; merge status, estimated/actual times, and gate/terminal.
- Convert all timestamps from UTC to America/New_York only at render time.
- Cache airport info (JFK timezone and terminals) for rendering and validation.
- Handle canceled/diverted statuses with explicit UI states.
- Implement rate-aware polling and caching to reduce duplicated calls.
FAQ
How do I filter just JFK arrivals versus departures?
Use iataCode=JFK and set type=arrival for inbound flights or type=departure for outbound in /flights-schedules.
Are schedule timestamps in local time or UTC?
Samples show ISO‑8601 UTC (with “Z”). Convert to JFK’s “America/New_York” for display; store UTC internally.
How do I get delay or gate changes?
Use the real-time flight tracking fields: status, departure.actual, arrival.estimated, and terminal/gate. Overlay these onto the static schedule record.
What about pagination on the schedules endpoint?
If pagination parameters are not available in your schema, segment by time windows (e.g., next 6–12 hours) or by airline to keep payloads manageable and implement rolling refresh.
Can I test this without committing to a paid plan?
Yes. A trial (7 days or 50 requests) is available so you can validate JFK use cases before scaling.
Ready to ship your JFK schedule integration? Get an API key in minutes and start calling the schedules endpoint: Register. Manage your keys and usage in the MCP and explore examples in the Documentation.