JFK Flight Schedule API: New York Departures as JSON
You need a reliable way to pull the live John F. Kennedy International Airport (JFK) departures board as JSON so you can show customers what’s leaving next, alert travelers about delays, or feed operations dashboards. By the end of this guide you’ll call the FlightLabs JFK Flight Schedule API, parse the response, and ship a production-ready integration for departures from JFK (IATA: JFK).
What you’ll build: a JFK departures feed you can ship
FlightLabs exposes a single REST endpoint for flight schedules that you can query with JFK and the direction you care about (departures). You’ll get structured JSON you can store and reuse across:
- Gate- and terminal-aware departure boards for airport displays
- Traveler-facing apps (alerts for “departed,” “scheduled,” “delayed,” “cancelled”)
- Operations workflows (pickup/drop-off timing, ground transport orchestration)
- Corporate travel and data products needing consistent flight identifiers
Everything below focuses on JFK departures only and uses the documented request and response fields you’ll actually consume: flight_iata, dep_iata, arr_iata, and status, along with the key timing and location details in the sample JSON.
Endpoint overview: JFK departures as JSON
The FlightLabs schedule endpoint for JFK departures is a GET to:
https://api.goflightlabs.com/flights-schedules
Query with these parameters:
- iataCode=JFK — the IATA airport code (John F. Kennedy International Airport)
- type=departure — we want departures only
The response returns flight schedule records as JSON.
If you’re new to FlightLabs, start with a free 7-day trial on the Starter plan ($24.99/mo, 4,000 calls) and get an API key. Then call the endpoint and begin caching results in your app.
Explore FlightLabs or jump directly to the Register page to get your access key.
Make your first request (JFK → departures)
Below is the official request for JFK departures. Copy it, swap YOUR_API_KEY for your actual key, and run it. It hits the live endpoint and returns the departures board for JFK in JSON.
curl "https://api.goflightlabs.com/flights-schedules?access_key=YOUR_ACCESS_KEY&iataCode=JFK&type=departure"
The sample response that follows is the documented JFK example from September 16, 2026. Treat it as a stable example payload that shows you what fields to expect; when you call the API today, you’ll receive live data for current departures.
Understand the JFK JSON response
Here is the official JFK departure schedule sample response (for 16 Sep 2026). Use it to map the fields you need in your code:
{
"success": true,
"type": "departure",
"data": [
{
"airline_iata": "TG",
"flight_iata": "TG6173",
"dep_iata": "JFK",
"arr_iata": "BKK",
"status": "scheduled"
}
]
}
Key fields you will actually use in production:
- flight_iata — The primary IATA flight number (e.g., “AA100”). Use this as a display identifier and to deduplicate across sources.
- dep_iata — Departure airport IATA code. For this article, it should be “JFK” in each record you care about.
- arr_iata — Arrival airport IATA code (the destination of the flight).
- status — High-level state of the flight (e.g., “scheduled,” “active,” “landed,” “cancelled,” “diverted,” “delayed”). Drive your UI badges and alerts from this field.
- Scheduled vs. Estimated/Actual times — Use scheduled times for the board backbone, and prefer estimated or actual times when available to reflect delays, early departures, or operational changes.
- Terminal and gate — If present, these fields power wayfinding and traveler notifications. Always handle missing values gracefully because not all flights publish them at the same time.
- Codeshares — If present, you may see related flight numbers. Show them together or map them to a canonical flight_iata depending on your UX.
Store at least flight_iata, dep_iata, arr_iata, and status for your primary keys and change detection; enrich with times, terminal, and gate for traveler-facing features.
Go live in four steps
- Register — Free 7-day trial on the Starter plan ($24.99/mo, 4,000 calls).
- Copy your access_key from your account.
- Call GET /flights-schedules with iataCode=JFK and type=departure.
- Persist flight_iata, dep_iata, arr_iata, and status. Update the record on new polls when status or timing fields change.
You can also review the endpoint and parameters in the Documentation, or test and inspect data models in the MCP console.
Practical implementation details that save time
Time zones and UTC
Airports and airlines publish schedules in local time by default; some fields may also include UTC. Your best practice is:
- Associate every timestamp with its source time zone when you store it.
- Convert to the user’s local time (or a fixed time zone) only in your presentation layer.
- When both scheduled and estimated times are present, favor estimated in your UI while retaining scheduled for reference and comparisons.
Polling frequency and caching
- Departure schedules are relatively stable but can change within minutes of pushback. A practical polling cadence is every 30–90 seconds for “now to next 2 hours,” and every 5–10 minutes for the broader rest-of-day board. Adjust to your traffic and caching strategy.
- Cache by flight_iata + departure date + dep_iata. Invalidate on any status or time change. Maintain a small rolling window for flights that recently departed (e.g., 30–60 minutes) so late updates don’t get lost.
- If you serve many clients the same JFK board, implement an internal cache layer keyed by the request parameters to reduce API calls.
Handling cancelled, delayed, or diverted flights
- Cancelled: Keep the flight on the board with a “Cancelled” state and clear terminal/gate if you show wayfinding. If you need analytics, retain a tombstone record rather than deleting it.
- Delayed: Prefer estimated times if provided and clearly label the delay. If you compute delay minutes, always show users which baseline you compared against (scheduled vs. estimated/actual).
- Diverted: If status indicates a diversion, communicate it as a terminal exception. Some downstream systems treat diversions like a separate arrival; do not clone or re-key unless that’s your explicit requirement.
Pagination for large schedules
Airport-wide schedules can be large. Use the pagination guidance in the Documentation to retrieve the full day in batches and avoid timeouts. Always store a continuation pointer or page markers and resume where you left off on retries.
Missing or partial data
- Terminals and gates: Often set late. Default to “TBD” or hide when absent, and notify users when a gate posts or changes.
- Codeshares: Display the operating carrier prominently and list codeshares if present. If you deduplicate, choose a canonical operating flight_iata and group the rest.
- Unknown times: If an estimated or actual time is missing, fall back to scheduled and label it clearly.
Errors and success=false
The API may return a flag or structure indicating a non-successful response. Handle this by:
- Checking the HTTP status and any success indicator in the JSON.
- Logging the request ID or correlation info if present.
- Retrying with exponential backoff for transient errors and surfacing operator-friendly messages for persistent ones.
Production-ready code: request, parse, and store
The curl example above gives you a one-liner to test your key and endpoint. Here’s a minimal JavaScript fetch example you can drop into a Node.js task or serverless worker that polls JFK departures and extracts the core fields you should store (flight_iata, dep_iata, arr_iata, status), plus common display fields when present.
// Node.js 18+ or any environment with fetch
// Install: none (uses built-in fetch in Node 18+/browsers)
// Purpose: poll JFK departures and persist essential fields
const API_URL = 'https://api.goflightlabs.com/flights-schedules';
const API_KEY = process.env.FLIGHTLABS_KEY || 'YOUR_API_KEY';
// A simple in-memory store example; replace with your DB of choice
const store = new Map();
async function fetchJfkDepartures() {
const params = new URLSearchParams({
access_key: API_KEY,
iataCode: 'JFK',
type: 'departure'
});
const res = await fetch(`${API_URL}?${params.toString()}`, {
method: 'GET',
headers: { 'Accept': 'application/json' }
});
if (!res.ok) {
const text = await res.text();
throw new Error(`HTTP ${res.status}: ${text}`);
}
const data = await res.json();
// If the API wraps data with a success flag, handle it here.
// For example: if (data.success === false) { ... }
// The official sample shows the shape you'll parse below.
// Normalize to an array of flight objects (shape per official sample)
const flights = Array.isArray(data) ? data : (data.results || data.data || []);
for (const f of flights) {
// Safely read fields if present in the response
const flightIata = f.flight_iata || (f.flight && f.flight.iata);
const depIata = f.dep_iata || (f.departure && (f.departure.iata || f.departure.iataCode));
const arrIata = f.arr_iata || (f.arrival && (f.arrival.iata || f.arrival.iataCode));
const status = f.status || (f.flight_status || f.current_status);
if (!flightIata || !depIata) continue; // skip malformed rows
// Store the minimal record; attach optional fields if present
const record = {
flight_iata: flightIata,
dep_iata: depIata,
arr_iata: arrIata || null,
status: status || 'unknown',
// Optional display fields when present in the JSON:
scheduled_departure: (f.departure && (f.departure.scheduled || f.departure.scheduledTime)) || f.scheduled_departure || null,
estimated_departure: (f.departure && (f.departure.estimated || f.departure.estimatedTime)) || f.estimated_departure || null,
terminal: (f.departure && f.departure.terminal) || f.terminal || null,
gate: (f.departure && f.departure.gate) || f.gate || null
};
const key = `${record.flight_iata}|${record.dep_iata}`;
const prev = store.get(key);
if (!prev || JSON.stringify(prev) !== JSON.stringify(record)) {
store.set(key, record);
// In your app, upsert to DB and notify subscribers on changes (status/times/gate)
console.log('Updated:', record);
}
}
return flights.length;
}
(async () => {
try {
const count = await fetchJfkDepartures();
console.log(`Processed ${count} JFK departure rows.`);
} catch (err) {
console.error('Fetch failed:', err.message);
// Optionally retry with backoff
}
})();
Notes for adapting this into your system:
- Replace the in-memory Map with your database. Key by flight_iata + dep_iata (+ date if you store historical snapshots).
- Normalize timestamps to the database’s preferred time zone and keep the original source value for audits.
- Emit update events when status, estimated/actual times, terminal, or gate changes.
Data modeling for a robust JFK departures board
A minimal schema that scales well:
- Primary key: flight_iata + dep_iata + service_date
- Core fields: arr_iata, status
- Timing fields: scheduled_departure, estimated_departure, actual_departure (if present)
- Operational fields: terminal_departure, gate_departure
- Audit fields: first_seen_at, last_seen_at, last_source (your polling job identifier)
How to use it:
- Build the board from all rows where dep_iata=“JFK” and service_date=today.
- Sort primarily by the best-known departure time (estimated, else scheduled).
- Group by terminal for terminal-specific screens.
- Apply a status-driven filter to hide flights that have already departed beyond your look-back window.
Testing, monitoring, and documentation
Use the MCP console to experiment with the JFK departures parameters and inspect responses without writing code. It’s useful for confirming field availability (e.g., when gates begin to appear) before tuning your UI logic.
Keep the Documentation handy to confirm supported parameters and any pagination or filtering options you want to apply as your board grows. If you need to validate edge cases (e.g., overnight departures that slip past midnight), run ad-hoc queries in your staging environment and compare the observed response structure with your parser.
For general orientation, you can also browse the homepage at www.goflightlabs.com to see the breadth of aviation data you can pair with JFK schedules, such as real-time tracking or historical lookups.
Deployment checklist for JFK departures
- API key management: Load from secure config, rotate on schedule, and never hardcode in clients.
- Polling cadence: 30–90 seconds for near-term flights; slower for the rest of day. Cache results between polls.
- Change detection: Diff status, all time fields, terminal, and gate. Push notifications only on change.
- Resilience: Retry with backoff on transient errors; surface diagnostics for persistent issues.
- Pagination: Fetch in pages if needed, and store continuation markers.
- Observability: Log request duration, response sizes, and per-page counts so you can detect anomalies.
- Data retention: Keep recent historical snapshots if you need to audit schedule changes or compute delay metrics.
FAQ
What endpoint returns the JFK departures board?
Use GET https://api.goflightlabs.com/flights-schedules with iataCode=JFK and type=departure. Include your access key.
How do I authenticate?
Pass your access_key with the request. If you don’t have one, start a free 7-day trial on the Starter plan and get your key from your account.
Which fields should I store to build a reliable board?
At minimum: flight_iata, dep_iata, arr_iata, and status. Add scheduled/estimated times, terminal, and gate to power delay indicators and wayfinding.
How often should I poll?
Every 30–90 seconds for flights departing in the next couple of hours, and every 5–10 minutes for the rest of the day. Cache by request parameters and only push UI changes when fields actually change.
How do I handle cancelled or diverted flights?
Rely on status. Keep cancelled flights visible as cancelled; prefer estimated/actual times for delays; if diverted, communicate it clearly and avoid duplicating the flight unless your downstream requires it.
Ready to ship a JFK departures board? Get your key, call the endpoint with iataCode=JFK and type=departure, and start caching results in your app. Register now and use the 7-day trial to build and test your integration.