API for Flights from Singapore Changi Airport (SIN) — Connections, Layovers, and Schedule Queries
You need to list live departures from Singapore Changi Airport (SIN), keep them synced across apps and screens, and react to last‑minute gate or delay changes. By the end of this guide, you’ll query SIN departures with FlightLabs, parse status/timing fields that matter, choose the right endpoint for your use case, and implement polling/caching that won’t melt your rate limits.
Why focus on Singapore Changi (SIN)
Singapore Changi Airport (IATA: SIN, ICAO: WSSS) is a major Southeast Asia hub with extensive regional and long‑haul connectivity. Developers track SIN to power departure boards, itinerary builders, crew tools, and logistics workflows where accurate schedules and timely change notifications are essential.
Choosing the right FlightLabs endpoint for SIN departures
FlightLabs exposes several endpoints that can drive a SIN‑centric departures workflow. Here’s how they compare for technical fit and output fields when your anchor is “What’s leaving SIN soon?”
| Endpoint | Purpose | Typical filters | Useful fields for departures | Best when you need |
|---|---|---|---|---|
| /flights-schedules | Published schedules and operational times | iataCode=SIN, type=departure | departure.scheduled, departure.terminal, arrival.airport, airline.iata, flight_number | Departure boards, day‑of schedule sync, bulk querying with pagination |
| Real‑time Flight Tracking | Live status and in‑flight telemetry | By flight IATA/ICAO, callsign, or other filters | status, departure.actual, arrival.estimated, terminal, gate, position | Push alerts for delays/gate changes, en‑route updates |
| Future Flights | Forthcoming planned flights | Route, airline, timeframe | Similar to schedules data structure | Layover planning for later dates, predictive itinerary building |
| Flight History | Past flights | By flight, date range, or route | Actual times vs scheduled | Analytics, SLA verification, historical ETD/ATD deltas |
For a practical “departures board for SIN,” start with the schedules endpoint filtered by IATA and type. Layer real‑time updates to surface status, gates, and last‑minute changes.
Query SIN departures with the schedules endpoint
The schedules endpoint supports filtering by an airport IATA code and direction (departure/arrival). Use SIN with type=departure to isolate outbound flights.
Example curl
curl -G "https://api.goflightlabs.com/flights-schedules" \
--data-urlencode "iataCode=SIN" \
--data-urlencode "type=departure" \
--data-urlencode "api_key=YOUR_API_KEY"
Notes:
- Authentication: Pass your API key via the api_key query parameter.
- Timestamps: ISO 8601 with a trailing Z (UTC). Convert to Asia/Singapore when rendering locally.
- Pagination: When the result set is large (e.g., full‑day boards), paginate through pages. If the response includes pagination metadata in your plan, follow those cursors/links. If not, slice by time windows (e.g., 2–4 hour blocks) to keep results manageable.
What the schedules shape looks like
The official schedule response structure is below. Your SIN result will use the same fields; map them as shown to build boards, layover planners, and alerts.
{
"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 mapping to a SIN departures view:
- flight_number and airline.iata: Display together (e.g., UA456). If your UI supports codeshares, pair multiple flight numbers per leg when available.
- departure.scheduled: The UTC scheduled time. Convert to local time for SIN or show UTC alongside to align with ops tools.
- departure.terminal: Terminal assignment for the outbound flight (display only if present).
- arrival.airport: IATA of the destination. Useful to filter by region or to compute layover chains.
- aircraft.type and aircraft.registration: Helpful for equipment‑specific notifications or gate compatibility displays.
Get live status for SIN flights (gate changes, ETDs, delays)
Use real‑time tracking to overlay operational state on top of published schedules. This provides live status, last‑minute time deltas, and gates.
{
"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 for SIN departures:
- status: Determine whether to show a flight as scheduled, off‑blocks, airborne, arrived, or in a non‑nominal state. Use this to trigger alerts and change UI color/state.
- departure.scheduled vs departure.actual: Compute the pushback delay in minutes. If actual is absent, fall back to scheduled.
- arrival.estimated vs arrival.scheduled: For through‑services or turnarounds originating at SIN later in the day, track whether inbound slippage will impact outbound ETD.
- terminal and gate: Surface last‑minute gate swaps. If gate is missing, keep the previous known value and timestamp it.
- position block: For en‑route legs (e.g., positioning or multi‑segment itineraries), show map pins and ETA logic in your ops UI.
Build it in code: fetch SIN departures and normalize times
The example below requests departures from SIN and prepares records for a board, highlighting scheduled UTC time, terminal, destination, and airline/flight number.
/**
* Fetch SIN departures from FlightLabs schedules
* Replace YOUR_API_KEY with your key
*/
async function fetchSinDepartures({ sinceUtc, untilUtc } = {}) {
const base = "https://api.goflightlabs.com/flights-schedules";
const params = new URLSearchParams({
iataCode: "SIN",
type: "departure",
api_key: "YOUR_API_KEY"
});
// Optional windowing approach (if your plan does not expose paging)
if (sinceUtc) params.set("since", sinceUtc); // Use only if supported in your plan
if (untilUtc) params.set("until", untilUtc); // Use only if supported in your plan
const url = base + "?" + params.toString();
const res = await fetch(url);
if (!res.ok) throw new Error("FlightLabs request failed: " + res.status);
const json = await res.json();
// Defensive parsing
const schedules = (json && json.data && Array.isArray(json.data.schedules))
? json.data.schedules
: [];
// Normalize to a board-friendly shape
return schedules.map(item => {
const airlineIata = item.airline && item.airline.iata ? item.airline.iata : "";
const number = item.flight_number || "";
const destination = item.arrival && item.arrival.airport ? item.arrival.airport : "";
const dep = item.departure || {};
const scheduledUtc = dep.scheduled || null;
const terminal = dep.terminal || null;
const equipment = item.aircraft && item.aircraft.type ? item.aircraft.type : null;
// Convert UTC to Asia/Singapore for display if needed
// Note: rely on a timezone library on the client for stable conversion
return {
flight: airlineIata + number,
airlineIata,
number,
origin: "SIN",
destination,
scheduledUtc,
terminal,
equipment
};
});
}
// Example usage
fetchSinDepartures().then(rows => {
console.log("SIN departures:", rows.slice(0, 5));
}).catch(err => {
console.error(err);
});
Implementation tips:
- Always store UTC times internally. Convert to Asia/Singapore (UTC+8, no DST) at render time.
- If your plan doesn’t expose paging parameters in the schedules endpoint, query in time windows (e.g., rolling 180 minutes) and merge results in a local cache keyed by flight+scheduled datetime.
- When pairing with real‑time status, match on airline IATA + flight number + scheduled date, then prefer “actual/estimated” over “scheduled” when present.
Practical SIN use cases built from these fields
1) Departures/connection boards for SIN
- Data: flight_number, airline.iata, departure.scheduled, departure.terminal, arrival.airport.
- Logic: Group by rolling windows (e.g., next 90 minutes). Sort by departure.scheduled UTC, then display local time.
- Fallbacks: If terminal is absent, omit that column. If multiple codeshares appear in your dataset, list the primary marketing flight first and provide a collapsible codeshare list.
2) Delay and gate change alerts
- Data: status, departure.actual vs departure.scheduled, arrival.estimated vs arrival.scheduled, departure.gate, arrival.gate.
- Logic: Define alert rules like “actual minus scheduled >= N minutes” or “gate changed from X to Y.” Push once per threshold, suppress duplicates via a hash of key fields + timestamp.
- UX: Annotate the timestamp of the last update. For partial data (e.g., gate missing), keep prior known value and label it “last confirmed.”
3) Layover and turnaround planning at SIN
- Data: arrival.estimated for inbound legs to SIN, paired with departure.scheduled for outbound connections; airline.iata and flight_number to stitch segments.
- Logic: When inbound estimated arrival slips, recalculate connection feasibility and flag tight layovers. For aircraft‑specific turnarounds, compare inbound actual arrival and outbound scheduled departure of matching registration if present (aircraft.registration).
Time zones, polling frequency, and caching
- Time handling: Store and compare all times in UTC. Convert to Asia/Singapore at render time with a reliable timezone library.
- Polling: For schedules, refresh every 10–15 minutes for boards. For real‑time status, a 30–60 second interval near departure time balances freshness with quota usage. Back off outside critical windows.
- Caching: Cache schedule slices (e.g., next 3 hours) for several minutes; revalidate gates and ETDs more frequently via the real‑time endpoint. Use ETag/conditional requests if supported in your stack.
- Merge strategy: Treat schedules as your base record and overlay real‑time fields when present (status, gate, actual/estimated). Keep provenance flags so your UI can show “Live” when data is real‑time.
Handling cancellations, diversions, and partial data
- status field: Use it to detect non‑nominal states (e.g., cancelled/diverted when present). When the status indicates a non‑operational state, dim the row and stop polling aggressively.
- Missing gates or terminals: Not all flights publish gate/terminal. Design your UI to tolerate nulls and avoid stale assumptions after a schedule change.
- Data precedence: Prefer “actual” or “estimated” times over “scheduled” when available. Record the timestamp of your last update for each flight to reconcile out‑of‑order responses.
Airport and reference data for context
When displaying SIN, you may want airport metadata to augment boards (e.g., naming or time zone). Below is the official airport response structure example. Use it to understand where to find the time zone and location fields in your plan.
{
"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
}
}
}
}
}
For Singapore Changi, follow the same field structure and use the IATA code SIN. The timezone mapping helps your UI decide whether to present UTC, local time, or both.
Comparison: when to use schedules vs real‑time for SIN
- Schedules (/flights-schedules): Efficient for bulk departure boards and syncing next‑N hours. Use when you need broad coverage and predictable payload shapes. Overlay with real‑time only near departure for changes.
- Real‑time: Best for alerting, mobile push, and gate/ETD deltas. Use for specific flights of interest or within short windows to control cost.
- Future Flights: Use for trip planning widgets beyond the current schedule window—e.g., “next Wednesday’s SIN departures at 08:00.”
- Flight History: Use for analytics (e.g., actual vs scheduled deltas) or to explain a missed connection after the fact.
Operational guardrails for production
- De‑duplication: Key by airline IATA + flight number + scheduled departure date. This avoids duplicates across re‑queries and eases merges with real‑time.
- Backfill strategy: If an update returns fewer flights than a prior poll, do not drop flights immediately; keep them until their scheduled time window elapses or you receive a definitive status change.
- Error handling: Implement retries with jitter on HTTP failures and treat “success: false” payloads as soft errors logged for operator review.
- Observability: Log response sizes and parse latencies; a sudden spike can indicate an upstream event day where you should extend cache TTLs to protect your app.
Authentication, pricing, and tooling
All calls are simple HTTPS GETs against the base API. You authenticate with an API key as shown in the curl example. You can explore and test requests in your browser or via the MCP console, and reference endpoint details in the Documentation.
Plans are designed to start small and scale. A Starter plan is available at $24.99/month, and you can trial the service for 7 days or up to 50 requests. To begin, request your key here: Register. Visit the homepage for an overview and updates: www.goflightlabs.com.
End-to-end flow: from schedules to live status at SIN
- Query schedules for iataCode=SIN&type=departure in rolling windows (e.g., next 180 minutes) and cache results keyed by flight + scheduled date.
- For flights departing within the next 60 minutes, subscribe or poll on the real‑time endpoint to capture status, actual pushback, and gate changes.
- Reconcile fields by precedence: actual/estimated override scheduled; terminal/gate from live data override schedule assignments.
- Surface alerts for material changes and store a change log so end users can see what changed and when.
Field-by-field checklist for a robust SIN departures board
- Identity: airline.iata + flight_number
- Timing: departure.scheduled (UTC), plus overlay of departure.actual if present
- Destination: arrival.airport (IATA)
- Facilities: departure.terminal, departure.gate when present
- State: status from real‑time endpoint to drive UI state and alerts
- Equipment: aircraft.type and aircraft.registration for ops users
- Timestamps: track last update timestamp per flight to reconcile polling order
Testing and monitoring tools
- Use goflightlabs.com for service overview and changelogs.
- Prototype queries and review JSON in MCP.
- Keep the Documentation open for field references and endpoint capabilities.
FAQ
How do I filter only departures from SIN?
Use the schedules endpoint with iataCode=SIN and type=departure. Combine with windowing or pagination to control payload size.
Are times returned in local time or UTC?
Times in the samples are ISO 8601 with Z (UTC). Convert to Asia/Singapore before display, and keep UTC internally for comparisons.
How often should I poll for gate and delay changes?
Poll schedules every 10–15 minutes for board accuracy, and the real‑time endpoint every 30–60 seconds during the 60 minutes before scheduled departure. Use exponential backoff outside peak windows.
How do I detect cancellations or diversions?
Check the status field in real‑time responses. When it indicates a non‑nominal state, downshift polling, annotate the row, and remove the flight only after you confirm the terminal state.
Can I show aircraft type and registration on my board?
Yes. The schedules response includes aircraft.type and aircraft.registration when available. Display these for ops users, or keep them behind a detail toggle for travelers.
Ready to power departures, connections, and live updates for SIN? Get your API key and start building today: Register. Explore endpoints and parameters in the Documentation and prototype queries in MCP.