Track Air Caraibes Flights Live with Our Flight Info By Flight Number API (NRT).
You need to show live, trustworthy status for specific Air Caraïbes flights by flight number, and refresh it automatically without over-polling or missing edge cases like diversions or cancellations. By the end of this guide, you’ll use the FlightLabs “flight info by flight number” endpoint to fetch real-time JSON for Air Caraïbes (TX), parse the fields you care about, and implement a simple polling loop that handles UTC times, delays, gates, terminals, and codeshares cleanly.
Air Caraïbes (TX) at a glance
Air Caraïbes (IATA: TX) is a French airline serving the Caribbean. It operates across the French West Indies with key hubs in Pointe-à-Pitre (PTP) and Fort-de-France (FDF). For developers, the important point is that TX is the IATA airline prefix you’ll query against when tracking flights by number.
Endpoint to use: Flight info by flight number
The FlightLabs endpoint for retrieving detailed information about a single flight by its number is:
- Detailed Flight Info: https://www.goflightlabs.com/flight-info-by-flight-number
You’ll authenticate with your API key and pass the flight number (IATA format) for the Air Caraïbes service you want to track. If you don’t have a key yet, create one here: Register. You can also explore and test queries in the MCP.
Full parameter options and auth details are in the Documentation. The examples below demonstrate a common pattern for fetching a TX flight and reading status/times fields.
Complete curl: request by Air Caraïbes flight number
The snippet below illustrates calling the flight-info-by-flight-number endpoint for an Air Caraïbes IATA flight number. Replace YOUR_API_KEY with your key and TX540 with the flight you need. Values in the responses are illustrative.
curl -G "https://www.goflightlabs.com/flight-info-by-flight-number" \
--data-urlencode "api_key=YOUR_API_KEY" \
--data-urlencode "flight_iata=TX540"
If you prefer, you can call directly from your server or cloud worker. The response schema includes flight identification, current status, departure/arrival times, and when available, position data for en-route flights.
What you’ll get back: realistic JSON examples for TX flights
Below are multiple responses you may see across a flight lifecycle. Field names match the documented real-time example schema. Times are UTC.
1) Scheduled (before departure)
{
"success": true,
"data": {
"flight": {
"iata": "TX540",
"icao": "FWI540",
"number": "540",
"status": "scheduled",
"departure": {
"airport": "ORY",
"scheduled": "2024-03-20T10:00:00Z",
"terminal": "4",
"gate": "B12"
},
"arrival": {
"airport": "PTP",
"scheduled": "2024-03-20T14:15:00Z",
"terminal": "A",
"gate": "12"
}
}
}
}
Use cases: display scheduled times, pre-flight gate and terminal.
2) Active en-route (with position)
{
"success": true,
"data": {
"flight": {
"iata": "TX540",
"icao": "FWI540",
"number": "540",
"status": "en-route",
"departure": {
"airport": "ORY",
"scheduled": "2024-03-20T10:00:00Z",
"actual": "2024-03-20T10:07:00Z",
"terminal": "4",
"gate": "B12"
},
"arrival": {
"airport": "PTP",
"scheduled": "2024-03-20T14:15:00Z",
"estimated": "2024-03-20T14:28:00Z",
"terminal": "A",
"gate": "12"
},
"position": {
"latitude": 42.312,
"longitude": -15.481,
"altitude": 36000,
"speed": 495,
"heading": 251
}
}
}
}
Use cases: live maps (latitude/longitude), ETA calculations (arrival.estimated), and delay messaging (difference between scheduled and estimated).
3) Landed
{
"success": true,
"data": {
"flight": {
"iata": "TX540",
"icao": "FWI540",
"number": "540",
"status": "landed",
"departure": {
"airport": "ORY",
"scheduled": "2024-03-20T10:00:00Z",
"actual": "2024-03-20T10:07:00Z",
"terminal": "4",
"gate": "B12"
},
"arrival": {
"airport": "PTP",
"scheduled": "2024-03-20T14:15:00Z",
"estimated": "2024-03-20T14:25:00Z",
"terminal": "A",
"gate": "12"
}
}
}
}
Use cases: final delay calculation and on-time reporting (compare departure.actual and arrival.estimated to their scheduled values).
4) Cancelled
{
"success": true,
"data": {
"flight": {
"iata": "TX540",
"icao": "FWI540",
"number": "540",
"status": "cancelled",
"departure": {
"airport": "ORY",
"scheduled": "2024-03-20T10:00:00Z",
"terminal": "4",
"gate": "B12"
},
"arrival": {
"airport": "PTP",
"scheduled": "2024-03-20T14:15:00Z",
"terminal": "A",
"gate": "12"
}
}
}
}
Use cases: clear user messaging and rebooking flows. Do not display outdated ETAs once status is cancelled.
5) Diverted
{
"success": true,
"data": {
"flight": {
"iata": "TX540",
"icao": "FWI540",
"number": "540",
"status": "diverted",
"departure": {
"airport": "ORY",
"scheduled": "2024-03-20T10:00:00Z",
"actual": "2024-03-20T10:30:00Z",
"terminal": "4",
"gate": "B12"
},
"arrival": {
"airport": "PTP",
"scheduled": "2024-03-20T14:15:00Z",
"estimated": "2024-03-20T14:50:00Z",
"terminal": "A",
"gate": "12"
},
"position": {
"latitude": 17.311,
"longitude": -61.792,
"altitude": 8000,
"speed": 210,
"heading": 090
}
}
}
}
Use cases: surface a prominent diversion banner and suppress original arrival gate. If the diverted airport appears in the data model for your plan, show it; otherwise fall back to a generic “diverted” indicator and rely on status and position for map display.
Key fields to implement first
- flight.status: The most important driver for your UI state (scheduled, en-route, landed, cancelled, diverted).
- departure.scheduled / departure.actual: Gate departure timing and pushback slippage.
- arrival.scheduled / arrival.estimated: Arrival planning and delay messaging.
- departure.terminal / departure.gate and arrival.terminal / arrival.gate: Wayfinding for passengers at ORY, PTP, FDF, etc.
- position.latitude / position.longitude (+ altitude/speed/heading): Live map pins and progress indicators when en-route.
- flight.iata, flight.icao, flight.number: IDs for caching keys and UX labels.
If your workflow needs codeshares, read the airline’s codeshare mapping from your own lookup or a separate dataset. If codeshares appear in your plan, present them as alternates but always anchor the primary IATA flight number (TX###) in the UI and storage keys.
Polling strategy, caching, and time zones
- Polling frequency: For en-route TX flights, 30–60 seconds is a practical interval. Before departure or post-landing, 2–5 minutes is usually sufficient.
- Cache keys: Use flight.iata plus the date (UTC) the flight departs. Example: TX540-2024-03-20. This avoids cross-day collisions on red-eyes or long-hauls.
- Cache invalidation: Invalidate immediately on status changes (scheduled → en-route, en-route → landed, any → cancelled/diverted). Otherwise honor a short TTL, e.g., 30–60s in-flight, 2–5m pre/post.
- UTC handling: All example timestamps are in ISO 8601 with “Z” (UTC). Convert to the local zone for display at ORY, PTP, or FDF as needed, but keep UTC internally so you can compare reliably across stations.
- Error handling: If success is false or the flight object is missing, retry with backoff and show a soft “temporarily unavailable” message, not stale data.
Practical use cases for Air Caraïbes (TX)
- Passenger-facing flight status pages: Surface flight.status, arrival.estimated, and terminals/gates. When status is cancelled, return an HTTP 200 with a clear “Cancelled” state to avoid caching errors by CDNs.
- Delay monitoring and alerts: Compare departure.actual vs departure.scheduled and arrival.estimated vs arrival.scheduled. Trigger push/email when the difference exceeds your threshold (e.g., 15 minutes).
- Route analysis and ops dashboards: For a given TX number across dates, pair real-time status with historical outcomes to measure average slippage. Use the “Flight History” endpoint for retrospectives and “Flight Schedules” for planned baselines.
Quick comparison of related endpoints you may combine
| Endpoint | Best for | Key fields you’ll use | Notes |
|---|---|---|---|
| Flight Info by Flight Number | Single-flight TX lookups | flight.status, departure/arrival times, terminals/gates, position | Use for your primary “TX###” status card |
| Real-time Flight Tracking | Live map data | position.latitude/longitude/altitude/speed/heading | Ideal if you need frequent position refreshes |
| Flight History | Analytics and SLAs | Past departure/arrival actuals vs scheduled | Use to contextualize recurring delays |
| Flight Schedules | Future planning | Planned times and terminals | Paginate through busy days and cache results |
| Future Flights | Upcoming departures | Upcoming TX flights and times | Feed your “tomorrow” board or booking journeys |
End-to-end example: refresh a TX flight and surface changes
The snippet below polls the flight-info-by-flight-number endpoint for an Air Caraïbes flight number and prints fields that matter to most travel apps. It demonstrates minimal caching and status-aware refresh intervals.
/**
* Example: Node.js (fetch) polling for an Air Caraïbes (TX) flight by number.
* Replace YOUR_API_KEY and the TX flight number as needed.
*/
const API_URL = "https://www.goflightlabs.com/flight-info-by-flight-number";
const API_KEY = process.env.FLIGHTLABS_API_KEY || "YOUR_API_KEY";
const FLIGHT_IATA = "TX540";
// Basic in-memory cache
let last = null;
function fmt(ts) {
return ts ? new Date(ts).toISOString() : null; // keep in UTC for comparisons
}
async function fetchFlight() {
const url = new URL(API_URL);
url.searchParams.set("api_key", API_KEY);
url.searchParams.set("flight_iata", FLIGHT_IATA);
const res = await fetch(url.toString(), { method: "GET" });
if (!res.ok) throw new Error("HTTP " + res.status);
const json = await res.json();
if (!json.success || !json.data || !json.data.flight) {
throw new Error("No flight data");
}
return json.data.flight;
}
function summarize(f) {
return {
iata: f.iata,
icao: f.icao,
number: f.number,
status: f.status,
dep: {
airport: f.departure?.airport,
scheduled: fmt(f.departure?.scheduled),
actual: fmt(f.departure?.actual),
terminal: f.departure?.terminal,
gate: f.departure?.gate
},
arr: {
airport: f.arrival?.airport,
scheduled: fmt(f.arrival?.scheduled),
estimated: fmt(f.arrival?.estimated),
terminal: f.arrival?.terminal,
gate: f.arrival?.gate
},
pos: f.position ? {
lat: f.position.latitude,
lon: f.position.longitude,
alt: f.position.altitude,
spd: f.position.speed,
hdg: f.position.heading
} : null
};
}
function nextIntervalMs(status) {
switch (status) {
case "en-route":
return 45000; // ~45s in-flight
case "scheduled":
return 120000; // 2m before departure
case "landed":
case "cancelled":
return 300000; // 5m once stable
case "diverted":
return 60000; // 1m to react quickly
default:
return 120000;
}
}
async function loop() {
try {
const flight = await fetchFlight();
const snap = summarize(flight);
const changed = JSON.stringify(snap) !== JSON.stringify(last);
if (changed) {
console.log("[TX] Update:", JSON.stringify(snap, null, 2));
last = snap;
// TODO: push to clients, persist to DB, invalidate CDN cache, etc.
} else {
console.log("[TX] No change:", snap.status);
}
setTimeout(loop, nextIntervalMs(snap.status));
} catch (e) {
console.error("Fetch error:", e.message);
setTimeout(loop, 180000); // backoff 3m on error
}
}
loop();
Production notes:
- Guard against missing fields. Not every flight has a gate or a position, especially when it’s not yet boarded or if tracking is unavailable.
- UTC-only comparisons prevent false “delay” signals when users cross time zones (e.g., ORY → PTP → FDF).
- Push incremental updates to clients only when something has changed (status, gates, or ETA), to avoid chatty UIs.
How status and timing fields map to your UI
- scheduled: Show departure.scheduled and gate; hide position. Add a “Check back” message and refresh every 2–5 minutes.
- en-route: Show position, arrival.estimated, and any calculated delay (estimated − scheduled). Poll at 30–60 seconds.
- landed: Display final arrival.estimated as actual-arrival proxy if no explicit actual is returned in your plan. Stop polling after two stable reads.
- cancelled: Preserve schedule for context but grey it out; suppress gates/ETAs. Optionally show rebooking links.
- diverted: Override the UI banner and make the map primary. If a diversion airport isn’t present, rely on position for map context.
Sourcing and normalizing gates, terminals, and codeshares
The departure.terminal/gate and arrival.terminal/gate fields are suitable for signage and wayfinding. For Air Caraïbes flights, terminals at ORY, PTP, and FDF may change close to departure; polling every few minutes pre-flight helps keep displays current. Normalize terminal/gate strings in your UI (e.g., “Terminal 4” from “4”) to maintain a consistent look.
Codeshares vary by route and day. If your plan returns codeshare equivalents, store them alongside the primary TX flight number to match passenger queries. Always display the operating carrier’s TX code as the canonical label on airline-branded experiences.
Schedules, future flights, and pagination
When you switch from ad-hoc flight lookups (TX###) to daily boards, you’ll likely depend on:
- Flight Schedules: for planned times by date.
- Future Flights: for near-term upcoming operations.
For heavy traffic days or multiple stations (e.g., ORY + PTP + FDF), paginate through schedule results and pre-warm your cache. Maintain a short TTL on schedule pages (e.g., 10–15 minutes) and backstop with per-flight lookups for the next 1–2 hours to fill in terminal/gate changes.
Error handling and edge cases you should expect
- Missing fields: Treat undefined gate or terminal as “TBD”. Don’t guess.
- Late updates: A flight may switch from “scheduled” to “en-route” with minimal lead time. Deduplicate notifications by status + timestamps.
- Clock skew: If a device or server clock is off, you can mislabel delays. Always trust the API’s UTC timestamps over local clocks.
- Intermittent position data: Keep the last known position for a short grace period if a poll returns without position, but mark it as “stale”.
Additional JSON examples to test your parser
Minimal scheduled payload (no gates yet)
{
"success": true,
"data": {
"flight": {
"iata": "TX510",
"icao": "FWI510",
"number": "510",
"status": "scheduled",
"departure": {
"airport": "FDF",
"scheduled": "2024-03-21T16:00:00Z"
},
"arrival": {
"airport": "PTP",
"scheduled": "2024-03-21T16:45:00Z"
}
}
}
}
Gate change mid-boarding
{
"success": true,
"data": {
"flight": {
"iata": "TX510",
"icao": "FWI510",
"number": "510",
"status": "scheduled",
"departure": {
"airport": "FDF",
"scheduled": "2024-03-21T16:00:00Z",
"terminal": "A",
"gate": "C7"
},
"arrival": {
"airport": "PTP",
"scheduled": "2024-03-21T16:45:00Z",
"terminal": "A",
"gate": "5"
}
}
}
}
Short-haul en-route without gates assigned yet at arrival
{
"success": true,
"data": {
"flight": {
"iata": "TX510",
"icao": "FWI510",
"number": "510",
"status": "en-route",
"departure": {
"airport": "FDF",
"scheduled": "2024-03-21T16:00:00Z",
"actual": "2024-03-21T16:12:00Z",
"terminal": "A",
"gate": "C7"
},
"arrival": {
"airport": "PTP",
"scheduled": "2024-03-21T16:45:00Z",
"estimated": "2024-03-21T16:52:00Z"
},
"position": {
"latitude": 14.9,
"longitude": -61.1,
"altitude": 19000,
"speed": 320,
"heading": 310
}
}
}
}
Arrived with gate published
{
"success": true,
"data": {
"flight": {
"iata": "TX510",
"icao": "FWI510",
"number": "510",
"status": "landed",
"departure": {
"airport": "FDF",
"scheduled": "2024-03-21T16:00:00Z",
"actual": "2024-03-21T16:12:00Z",
"terminal": "A",
"gate": "C7"
},
"arrival": {
"airport": "PTP",
"scheduled": "2024-03-21T16:45:00Z",
"estimated": "2024-03-21T16:50:00Z",
"terminal": "A",
"gate": "2"
}
}
}
}
Documentation pointers and next steps
Use the Documentation to confirm the exact request pattern for your plan and explore other endpoints (real-time tracking, schedules, history). Test requests and inspect payloads in the MCP. If you’re new to FlightLabs, start by creating an API key and making a single TX lookup from your terminal or a serverless function.
FlightLabs provides consistent JSON across endpoints so you can reuse your parser between live tracking and schedules. See more about coverage at www.goflightlabs.com and build your own tools on top of our REST interface.
FAQ
- How often should I poll a TX flight that is en-route?
Every 30–60 seconds is typical. Back off to 2–5 minutes for scheduled/not-yet-departed and landed flights. - Are timestamps UTC or local?
The examples use ISO 8601 in UTC (Z). Convert to local time zones for display but compare in UTC to avoid errors. - What if a flight is cancelled or diverted?
Respect flight.status immediately. Suppress ETAs/gates on cancellations. For diversions, show a prominent state change and rely on position data when available. - How do I handle missing gates or terminals?
Treat them as “TBD” and avoid guessing. They often update close to departure or arrival. - Can I analyze trends across multiple TX flights?
Yes—combine “Flight Info by Flight Number” for live data with “Flight History” for outcomes and “Flight Schedules” or “Future Flights” for planned baselines.
Ready to integrate Air Caraïbes (TX) flight tracking into your app? Create your API key and start calling the endpoint today: Register. You can explore more features and capabilities at www.goflightlabs.com and test your queries in the MCP.