Singapore Changi Airport (SIN) Flight Delays API
Singapore Changi Airport (SIN) flight displays and delay alerts need more than a scheduled time: they need a consistent way to interpret updates without presenting missing data as a confirmed delay. Changi is in Singapore and has ICAO code WSSS. This guide shows how to request SIN schedules, interpret the available flight fields, and design an update pipeline for boards and alerts.
Request schedules for SIN
FlightLabs exposes airport schedules through the GET https://api.goflightlabs.com/flights-schedules endpoint. Set iataCode to SIN and use type to select the schedule direction. Check the Documentation for accepted type values and the API-key authentication format before making the request.
The schedule response structure includes success and a data.schedules collection. Each schedule can contain a flight number, airline, departure and arrival airports, scheduled times, and terminals. That makes the endpoint useful for building the baseline against which a later update can be interpreted.
The Python example below calls the SIN schedules endpoint and reads those fields. Configure the environment variables using the authentication name and schedule type specified in the documentation. The authentication location can be set to header or query, depending on the documented format.
import os
import requests
url = "https://api.goflightlabs.com/flights-schedules"
params = {
"iataCode": "SIN",
"type": os.environ["FLIGHTLABS_SCHEDULE_TYPE"],
}
headers = {}
auth_name = os.environ["FLIGHTLABS_AUTH_NAME"]
auth_value = os.environ["FLIGHTLABS_API_KEY"]
auth_location = os.environ["FLIGHTLABS_AUTH_LOCATION"]
if auth_location == "header":
headers[auth_name] = auth_value
elif auth_location == "query":
params[auth_name] = auth_value
else:
raise ValueError("Set FLIGHTLABS_AUTH_LOCATION to header or query")
response = requests.get(url, params=params, headers=headers, timeout=8)
response.raise_for_status()
payload = response.json()
if not payload.get("success"):
raise RuntimeError("FlightLabs did not return a successful response")
for flight in payload.get("data", {}).get("schedules", []):
departure = flight.get("departure") or {}
arrival = flight.get("arrival") or {}
airline = flight.get("airline") or {}
print(
flight.get("flight_number"),
airline.get("iata"),
departure.get("airport"),
departure.get("scheduled"),
departure.get("terminal"),
arrival.get("airport"),
arrival.get("scheduled"),
arrival.get("terminal"),
)
Install the requests package before running the example. Keep the API key outside source control and avoid logging an authenticated URL or request headers. The example processes the returned collection; a production schedule sync should also account for pagination as described later in this guide.
Interpret schedule and tracking fields
A schedule is the planned view of a flight, not by itself evidence that the flight is late. The FlightLabs real-time tracking example shows a separate data.flight structure with status, departure and arrival timestamps, terminals, and gates. Use the schedule endpoint to establish the planned service, and use an appropriate tracking response when the application needs operational updates.
| Information | Fields to read | How to use it for SIN |
|---|---|---|
| Flight identity | flight_number, airline.iata; tracking: flight.iata, flight.number |
Label a schedule row and associate updates with the appropriate service. |
| Airport and direction | departure.airport, arrival.airport |
Check which side of the journey is SIN before displaying departure or arrival information. |
| Planned time | departure.scheduled, arrival.scheduled |
Display the published baseline and compare it with a corresponding operational time when available. |
| Operational update | Tracking: status, departure.actual, arrival.estimated |
Show the returned status and distinguish an observed departure from an estimated arrival. |
| Passenger location | terminal; tracking: gate within departure or arrival |
Show the location relevant to SIN, and treat a missing value as unknown. |
Keep departure and arrival values separate. For a flight departing SIN, the SIN terminal is the departure terminal; for a flight arriving at SIN, it is the arrival terminal. Do not show a terminal or gate from the other airport as if it belonged to Changi.
To calculate an estimated arrival delay, compare arrival.estimated with arrival.scheduled for the same flight occurrence. A positive difference indicates that the estimate is later than the scheduled arrival. Label the result as estimated, preserve the original timestamps, and do not calculate a delay if either timestamp is missing.
Similarly, comparing departure.actual with departure.scheduled describes a departure that has occurred; it is not an arrival delay. A flight can make up or lose time after departure, so an application should not reuse a departure difference as its arrival estimate.
Codeshares need special handling when matching schedules to tracking updates. A marketed flight number and an operating service may not have a one-to-one relationship. Preserve the identifiers returned by the API, avoid merging records on a flight number alone, and check the documentation for the available codeshare information before presenting a relationship as confirmed.
Build a reliable update pipeline
Normalize times before comparing them
The example FlightLabs timestamps use the Z suffix, indicating UTC. Parse timestamps as timezone-aware values, compare them as instants, and store the original value as well as any normalized representation your application uses.
For a passenger-facing SIN display, convert the relevant instant to Singapore local time and label it clearly. Singapore uses Asia/Singapore, which is UTC+08:00. Avoid comparing formatted clock strings: two timestamps can refer to the same instant while displaying different local times.
If a timestamp is missing or cannot be parsed, retain an unknown state rather than substituting the current time. For an alert, it is better to wait for a usable scheduled and estimated pair than to send a false delay notification.
Poll, cache, and reconcile
Choose a polling interval based on how quickly the SIN application needs to reflect changes and the request allowance of the account. A public display may need fresher updates than an internal schedule sync. Check account limits and endpoint behavior before fixing an interval; the appropriate cadence depends on the product and plan.
Cache the latest successful response for each schedule direction and serve it to display clients rather than letting every browser call the API independently. Record when the data was fetched, show a freshness indicator where appropriate, and retain the last successful result during a temporary request failure. A cached status should not be presented as a current confirmation indefinitely.
For schedule synchronization, follow the pagination instructions for the endpoint if the response is paginated. Process every page before marking a sync complete, and keep the previous complete snapshot if a later page fails. Do not assume that the first returned collection represents every SIN flight.
Make repeated syncs safe to apply. Use the available flight identifiers together with the relevant scheduled occurrence and airport context, and reconcile changes rather than blindly appending duplicate rows. Where a record cannot be matched confidently, keep it separate for review instead of attaching an update to the wrong flight.
Handle cancellations and diversions explicitly
When a tracking response reports a cancellation or diversion, display the returned status prominently rather than treating the flight as merely late. Do not calculate a normal arrival delay from an old estimate after a cancellation. For a diversion, distinguish the originally scheduled SIN arrival from any operational destination information actually returned for that flight.
Keep the last known scheduled times for context, but label stale estimates and location details appropriately. If the response lacks enough information to explain a diversion or identify a replacement destination, show the status without guessing. A missing status is also not proof that a flight is operating normally.
Three applications for SIN data
Arrival and departure boards
Request the relevant SIN schedule direction and display flight_number, airline.iata, the opposite airport, and the appropriate scheduled time. Use the terminal on the SIN side of the journey. When a matching tracking update is available, add its status, estimated or actual time, and gate without replacing the scheduled baseline.
Sort the board consistently by the time relevant to the view, and make the distinction between scheduled and estimated visible. If a gate is absent, leave it unknown rather than copying a gate from the other end of the route.
Delay and disruption alerts
For an arrival alert, watch arrival.scheduled and arrival.estimated on the matched tracking record. Compare the timestamps in UTC, then format the result in Singapore local time for the recipient. Include the returned status so that a cancellation or diversion is not reduced to a time difference.
Send an update when the relevant information changes, rather than on every poll. Store the last notified state and avoid sending an alert when the estimate is missing, unchanged, or cannot be matched confidently to the subscribed flight.
Schedule synchronization
A corporate travel or logistics system can periodically import data.schedules for SIN and retain the returned flight number, airline code, airports, scheduled times, and terminals. Complete pagination before publishing a new snapshot, and record the fetch time so downstream users know which schedule version they are viewing.
Keep schedule synchronization separate from operational tracking. A terminal change in a schedule response and a new estimated arrival in a tracking response may have different freshness characteristics; preserving their sources helps consumers interpret each value correctly.
FAQ
Can the SIN schedule response alone tell me a flight is delayed?
A scheduled time is a baseline, not a delay indication. Compare it with a matching estimated or actual time from an appropriate operational response, and label the result according to which time you used.
How should I display a missing terminal or gate?
Treat it as unknown and update the display when a value is returned. Do not infer the SIN gate or terminal from the other airport in the flight record.
How often should I refresh SIN flight data?
Choose a cadence that meets your freshness needs and fits your account allowance. Cache results centrally, show their fetch time, and avoid issuing identical requests from every client.
Can I use MCP alongside the REST integration?
FlightLabs provides an MCP service. Review its interface separately from the REST schedule endpoint when deciding how it fits your workflow.
Ready to build with SIN schedules? Register for a FlightLabs API key, then configure the schedule direction and authentication details for your integration.