Qantas (GIB) Routes API
If you are trying to build a Qantas route view from the code GIB, first resolve an identifier mismatch: GIB identifies Gibraltar International Airport, not Qantas. This guide shows how to interpret the documented FlightLabs schedule fields, extract Qantas records when they are available, and avoid presenting airport results as an airline’s complete route network.
Qantas is an Australian airline. Its airline identifier and the GIB airport identifier represent different entities and should not be used interchangeably.
Choose the right data for a route view
FlightLabs exposes schedule, live-flight, and route-reference capabilities. The documented schedule request uses the endpoint https://api.goflightlabs.com/flights-schedules with the parameters iataCode and type. Check the Documentation for the accepted parameter values, identifier scope, and API-key authentication method before constructing a request.
A schedule record can support a route view by pairing departure.airport with arrival.airport. That pair describes the endpoints of a scheduled flight; it does not by itself establish how frequently the route operates or whether it is currently served. Use the route-reference capability when you need a route catalog rather than a collection of scheduled flight instances.
Do not pass GIB as though it were Qantas’s airline code. If a schedule query is scoped to an airport, its results are also not necessarily a complete list of the airline’s services. Store the scope and retrieval time alongside any derived route list so downstream users can tell what the list represents.
Read schedule records
The documented schedule response has a top-level success field and a data.schedules collection. Each illustrated schedule includes flight_number, departure and arrival objects, and an airline object with name and iata.
The Python function below accepts an authenticated urllib.request.Request that you have constructed using the current documentation. It calls that request and returns the fields useful for a Qantas schedule view. The name filter is a simple example; verify the returned airline identifiers and their meaning before relying on it in production.
import json
from urllib.request import urlopen
def load_qantas_schedules(authenticated_request):
with urlopen(authenticated_request, timeout=30) as response:
payload = json.load(response)
if not payload.get("success"):
raise RuntimeError("Schedule request was not successful")
schedules = payload.get("data", {}).get("schedules", [])
results = []
for schedule in schedules:
airline = schedule.get("airline") or {}
if (airline.get("name") or "").casefold() != "qantas":
continue
departure = schedule.get("departure") or {}
arrival = schedule.get("arrival") or {}
results.append({
"flight_number": schedule.get("flight_number"),
"airline_iata": airline.get("iata"),
"departure_airport": departure.get("airport"),
"departure_scheduled": departure.get("scheduled"),
"departure_terminal": departure.get("terminal"),
"arrival_airport": arrival.get("airport"),
"arrival_scheduled": arrival.get("scheduled"),
"arrival_terminal": arrival.get("terminal"),
})
return results
Handle HTTP and JSON parsing errors at the call site, and distinguish a failed request from a successful response containing no matching schedules. An empty result can reflect the query’s scope or the available data; it is not proof that Qantas has no routes.
Turn flight records into useful views
Scheduled route analysis
Group Qantas schedule records by departure.airport and arrival.airport to create directional airport pairs. Keep flight_number and the scheduled departure time with each underlying record, so users can inspect the flights behind a route rather than treating the pair as an independently verified route listing.
Count records only within the period and pages actually retrieved. A schedule count is not an on-time percentage, a passenger count, or a guarantee that a flight operated.
Flight status pages
For a live status page, use the live-flight response rather than assuming a schedule record contains live status. The illustrated live response places status under data.flight, with airport, time, terminal, and gate information under its departure and arrival objects.
Show scheduled and actual departure times separately, and distinguish a scheduled arrival from an estimated arrival. Terminal and gate values may be unavailable or change, so display an unknown value rather than filling one from an older record without indicating its age.
Delay monitoring
Where both values are present, compare departure.actual with departure.scheduled to calculate observed departure variance. Comparing arrival.estimated with arrival.scheduled gives a current estimate, not a final arrival delay. Preserve that distinction in labels and alerts.
Make the integration reliable
The example timestamps use ISO 8601 with a trailing Z, meaning UTC. Parse them as timezone-aware values, retain UTC for comparisons, and convert to the relevant airport’s local timezone for display. Do not infer an airport’s timezone from its code or from the user’s device.
Poll live tracking according to the freshness your display needs and the limits of your plan. Cache the latest successful result with its retrieval time, and show when it was last updated. Schedule and route views can generally use a longer cache than an active flight display, but refresh them when a user needs current information.
Handle cancellations and diversions as explicit operational states when the returned data identifies them. Do not treat a missing position or an unchanged estimated time as proof of either event. Preserve the last known record, mark stale data clearly, and avoid presenting a scheduled arrival airport as a confirmed diverted destination.
For schedules, follow the pagination mechanism described in the documentation for the endpoint and your request. Process every available page before reporting a complete count, and make partial results visible if a page fails. The illustrated schedule response does not establish a pagination field or parameter, so the integration should use the documented mechanism rather than assume one.
Codeshares need similar care. The illustrated response contains an airline and flight number but does not show a codeshare relationship or identify a separate operating carrier. Do not infer either from matching airport pairs; consult the applicable documentation and returned data before combining or labeling records.
FAQ
Can I use GIB to request all Qantas routes?
No. GIB is an airport code, not Qantas’s airline code. Even an airport-scoped schedule result would not establish the airline’s complete network.
Is a schedule the same as live flight status?
No. A schedule describes planned service; the illustrated live response provides a separate status and may include actual or estimated times and gate information.
How should I handle a missing gate or time?
Keep the field unknown and retain the retrieval time. Do not calculate a delay until the relevant timestamps are present.
Can I use these schedule fields to identify codeshares?
Not reliably. The illustrated schedule fields do not establish a codeshare relationship or separate marketing and operating carriers.
To start an integration, Register for an API key, then confirm the schedule query and authentication details in the documentation. Developers using an MCP client can also explore MCP.