EVA Air (JFK) Flights API
To build an EVA Air departure board or status page for John F. Kennedy International Airport, you need to distinguish the airline from the airport, select the relevant schedule records, and handle updates without presenting stale information as live. This guide shows how to work with the documented FlightLabs schedule fields and use live-flight data alongside them.
EVA Air Corporation is a Taiwanese airline with the IATA airline code BR. John F. Kennedy International Airport in New York has the IATA airport code JFK; JFK identifies the airport, not the airline.
Choose the data for the job
Documentation covers the FlightLabs interfaces for schedules and other flight data. For a JFK board, begin with the schedule endpoint and retain records whose airline and airport fields match the intended view.
The schedule request uses GET https://api.goflightlabs.com/flights-schedules with the documented iataCode and type parameters. Consult the documentation for the supported values, authentication format, and pagination procedure before constructing the request. Keep the API key on the server rather than embedding it in a public display or browser application.
| Data | Fields in the supplied response examples | Use for an EVA Air JFK application |
|---|---|---|
| Schedule | flight_number, airline.iata, departure and arrival airport, scheduled time and terminal |
Build a planned-flight list and select BR flights involving JFK. |
| Live flight | status, scheduled, actual and estimated times, terminals and gates |
Update a flight detail view when operational information is available. |
| Airport | iata, name, timezone |
Identify JFK and format its times for local display. |
A schedule record and a live-flight record have different shapes. For example, the supplied schedule example places the flight identifier in flight_number, while the live example uses flight.iata. Treat them as separate contracts when building your data model.
Read and filter the schedule response
The following Python example calls a schedule URL supplied in the FLIGHTLABS_SCHEDULES_URL environment variable. Set that variable to the authenticated URL constructed using the documentation, including the appropriate iataCode and type values. The program filters the returned page for EVA Air records with JFK as either the departure or arrival airport.
import json
import os
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
url = os.environ["FLIGHTLABS_SCHEDULES_URL"]
request = Request(url, method="GET")
try:
with urlopen(request) as response:
payload = json.load(response)
except (HTTPError, URLError) as exc:
raise SystemExit(f"Schedule request failed: {exc.reason}")
except json.JSONDecodeError:
raise SystemExit("Schedule response was not valid JSON")
if not payload.get("success"):
raise SystemExit("FlightLabs did not report a successful request")
for schedule in payload.get("data", {}).get("schedules", []):
airline = schedule.get("airline") or {}
departure = schedule.get("departure") or {}
arrival = schedule.get("arrival") or {}
if airline.get("iata") != "BR":
continue
if "JFK" not in (departure.get("airport"), arrival.get("airport")):
continue
print(
schedule.get("flight_number"),
departure.get("airport"),
departure.get("scheduled"),
departure.get("terminal"),
arrival.get("airport"),
arrival.get("scheduled"),
arrival.get("terminal"),
)
The relevant schedule structure is data.schedules, a list of records. Each record can contain airline.iata, flight_number, and nested departure and arrival objects. The sample uses defensive lookups so that an absent terminal or time does not crash the whole page.
This code processes the response it receives; it does not automatically fetch additional pages. It also prints raw values for inspection rather than making assumptions about how missing values should appear in a customer-facing interface. In production, map absent fields to an explicit display such as “not available.”
Turn flight fields into useful views
Build a JFK flight status page
Use airline.iata to identify EVA Air and the departure or arrival airport field to identify JFK. Show flight_number and the scheduled time for each matching record, together with the terminal if it is present. A departure board should select JFK as the departure airport; an arrivals view should select it as the arrival airport.
When a corresponding live-flight record is available, its status and operational times can enrich the detail view. The supplied live example also includes departure and arrival gate fields. Display a gate only when the relevant record supplies one, and distinguish it from the terminal.
Monitor changes and delays
The live example includes departure scheduled and actual times, as well as arrival scheduled and estimated times. Where both values are present and refer to the same event, an application can calculate the difference between scheduled and actual departure, or scheduled and estimated arrival.
Label the result according to the inputs: an estimate can change, whereas an actual time describes an event reported as having occurred. If one of the times is absent, do not infer a delay or treat the flight as on time. Preserve the underlying timestamps so that a later update can be recalculated.
Analyze routes
For route analysis, group schedule records by their departure and arrival airport values after filtering for airline.iata equal to BR. Record the period and pages included in the analysis so that a partial retrieval is not mistaken for a complete route picture.
Codeshares require extra care. The supplied examples do not define a codeshare relationship field, so a matching airport pair or similar time is not enough to establish that two records represent the same operation. Consult the documentation for the relevant data before merging marketed and operating flights or labeling a flight as a codeshare.
Handle time, updates, and exceptions
Flight timestamps in the supplied examples use a trailing Z, indicating UTC. Parse timestamps as timezone-aware values, store the instant in UTC, and convert it for presentation. JFK’s airport example identifies its timezone as America/New_York, which lets a timezone-aware library apply the appropriate daylight-saving rules.
Make the display context clear: a JFK terminal board may show New York local time, while an analyst may prefer UTC for comparisons. Keep the date as well as the time when converting; a local date can differ from the UTC date. For the other end of a journey, use the relevant airport’s timezone rather than applying JFK’s timezone to both events.
Live tracking needs a polling and caching policy. Poll active views more frequently than historical or inactive views, cache shared responses on the server, and show when the displayed data was last refreshed. Choose the actual interval based on the application’s freshness needs and the limits of the account, and avoid a separate upstream request for every viewer.
If an update fails, retain the last successful result only with a clear stale-data indication. Avoid replacing a known gate, time, or status with an unqualified blank without deciding how the interface should distinguish “not supplied” from “previously known.” The position example contains latitude, longitude, altitude, speed, and heading; verify the documented units before displaying or calculating with those values.
Cancelled and diverted flights need explicit treatment in the presentation layer. Map the status information returned by the relevant flight interface to your product’s labels using the documented values, rather than assuming every possible status has the same spelling. Do not silently remove a cancelled flight from a board, and do not present the original arrival airport as a confirmed diversion destination unless the returned data supports that conclusion.
For schedules, follow the documented pagination procedure until the requested result set is complete, and handle an empty page or failed request explicitly. The example filter runs on one response, so its output alone cannot establish that no other matching flight exists. Cache pages where appropriate, but keep the retrieval scope visible to downstream reports.
FAQ
Should I filter for BR or JFK?
They identify different things. Use BR to identify EVA Air in airline.iata, and JFK in the departure or arrival airport field to identify the airport. Select the schedule request parameters according to the documented endpoint semantics.
Does a schedule include live gate and delay information?
The supplied schedule example includes scheduled times and terminals. The live-flight example additionally shows status, operational times, and gates. Check which fields are present in the response you are using rather than treating the two shapes as interchangeable.
How should I display a flight with no estimated arrival?
Show the scheduled arrival if available and indicate that an estimate is unavailable. Do not calculate an arrival delay without both the scheduled and estimated values.
Can I use FlightLabs through MCP?
FlightLabs also provides an MCP interface. Check its documentation for the operations and authentication available to your integration.
Ready to build the EVA Air JFK view? Register for an API key, then configure the schedule request and test your filtering, time conversion, and refresh handling against the returned data.