Flight Schedules API for Paris Charles de Gaulle Airport (CDG)
Building an arrival board or schedule feed for Paris Charles de Gaulle Airport (CDG) means keeping flight times current without treating every scheduled time as a confirmed movement. This guide shows how to request CDG schedules, read the available fields, and design updates for delays, cancellations and changes.
Request schedules for CDG
Paris Charles de Gaulle Airport is near Paris, France. Developers can use its IATA code, CDG, to retrieve schedules for airport displays, travel applications and operational tools.
Documentation covers how to authenticate requests with an API key. The schedule endpoint is GET https://api.goflightlabs.com/flights-schedules; use iataCode=CDG to select the airport and type to select the schedule direction.
Check the documentation for supported type values and the API-key authentication format before making a request. Keep the key on your server rather than embedding it in a public display or browser application.
Read schedules in Python
The following function uses a preconfigured, authenticated requests.Session. Pass a supported schedule direction as schedule_type; the function requests CDG schedules and returns the schedule records for your application to process.
import requests
def get_cdg_schedules(session: requests.Session, schedule_type: str):
response = session.get(
"https://api.goflightlabs.com/flights-schedules",
params={"iataCode": "CDG", "type": schedule_type},
timeout=30,
)
response.raise_for_status()
payload = response.json()
if not payload.get("success"):
raise RuntimeError("FlightLabs schedule request was not successful")
schedules = payload.get("data", {}).get("schedules", [])
for schedule in schedules:
departure = schedule.get("departure") or {}
arrival = schedule.get("arrival") or {}
print(
schedule.get("flight_number"),
departure.get("airport"),
departure.get("scheduled"),
departure.get("terminal"),
arrival.get("airport"),
arrival.get("scheduled"),
arrival.get("terminal"),
)
return schedules
Configure the session with the authentication method described in the documentation before calling the function. The function checks both the HTTP result and the response’s success field, but production code should also decide how to report failures and retain the last usable data.
Understand the schedule fields
The schedule response places records in data.schedules. Each record can describe a flight number, its departure and arrival, and aircraft and airline information. Treat fields as potentially missing: a blank terminal is better than a guessed terminal.
| Field | Use in a CDG application | Handling note |
|---|---|---|
flight_number |
Label a flight on a board or in a schedule view. | Do not assume it uniquely identifies every record across dates or directions. |
departure.airport, arrival.airport |
Identify the endpoints of the flight and which side is CDG. | Check the airport code before choosing the time and terminal to display. |
departure.scheduled, arrival.scheduled |
Sort flights and show planned times. | Parse timestamps as timezone-aware values. |
departure.terminal, arrival.terminal |
Show the relevant CDG terminal when supplied. | Leave the value unknown when it is absent. |
airline.name, airline.iata |
Label or group flights by airline. | Keep the code and display name separate. |
aircraft.type, aircraft.registration |
Provide aircraft context in a detailed view. | Do not require these values to render a schedule. |
The supplied schedule example does not establish that every schedule record has a status, delay, gate or codeshare field. The real-time flight example includes status, scheduled and actual departure times, scheduled and estimated arrival times, and terminal and gate values. Check the relevant endpoint documentation and returned data before using those fields in a CDG integration.
For codeshares, avoid assuming that two displayed flight numbers necessarily represent separate aircraft movements. Establish how codeshares are represented in the data available to your application before combining records or suppressing apparent duplicates.
Build useful CDG workflows
Arrival board
Request the CDG arrival schedule and use arrival.scheduled as the planned arrival time. Show flight_number, departure.airport, the airline name and arrival.terminal where available.
Sort using parsed timestamps rather than their displayed local-time strings. If a terminal is missing, display an unknown value; do not borrow a departure terminal or infer one from the airline.
Delay alerts
Use the schedule as the planned baseline, then obtain current flight information when it is available for the same movement. The real-time example distinguishes arrival.scheduled from arrival.estimated, and departure.scheduled from departure.actual.
A difference between a scheduled and estimated time can support a delay alert, but label it as an estimate rather than an actual arrival. Send an update when the relevant estimate changes, and retain enough context to avoid repeatedly alerting users about the same unchanged value.
Schedule synchronization
A corporate travel platform can import CDG schedule records and compare later results with its stored version. Useful comparison fields include flight_number, departure and arrival airport codes, scheduled times and terminals.
Use more context than the flight number alone when matching records. Schedule changes and codeshares can make simplistic deduplication unreliable, so retain the original records until your matching rules can explain which entries refer to the same movement.
Handle time, updates and exceptions
Convert times deliberately
Parse API timestamps with their offset or UTC designator intact. Store and compare timezone-aware instants, then convert them to Paris local time for a CDG-facing display. This avoids comparing a local wall-clock time directly with a UTC timestamp.
Use a timezone-aware library that handles daylight-saving transitions. For flights crossing time zones, show which local time applies to each airport; do not assume the departure and arrival timestamps should be displayed in the same local zone.
Poll and cache according to the task
A public arrival board needs more frequent refreshes than a schedule synchronization job. Poll live information more often for flights currently being displayed, and refresh less frequently for planning data that does not need immediate updates. Choose intervals that fit your request allowance and the freshness your users actually need.
Cache schedule results on the server so multiple clients can share a response. Record when each cached result was retrieved, show a last-updated indication on operational displays, and keep the previous successful result available if a refresh fails. Do not present stale information as live.
Account for cancellations and diversions
Do not infer that a flight operated simply because it appears in a schedule. When current status data indicates a cancellation, make that state visible and avoid continuing to present the scheduled time as a confirmed movement.
For a diversion, distinguish the planned CDG arrival from the latest known operational information. Preserve the original schedule for context, but do not claim a replacement destination or arrival time unless the data you receive supports it. Treat unknown or missing status as unknown, not as confirmation that a flight is operating normally.
Retrieve all schedule records
Plan for pagination rather than assuming one response contains every CDG schedule. Follow the pagination mechanism described in the documentation, process each returned page, and stop according to that mechanism. The Python function above processes the records in one response; extend the surrounding integration to retrieve additional pages where applicable.
During a multi-page refresh, avoid replacing a complete cached board with a partial result if a later request fails. Build the new result separately and publish it after the retrieval completes, or clearly indicate that the result is incomplete.
FAQ
How do I select Paris Charles de Gaulle Airport?
Use iataCode=CDG with the schedules endpoint and supply a supported type for the direction you need.
Does a scheduled time mean the flight has arrived or departed?
No. A scheduled time is the plan. Use available current status, estimated and actual fields to communicate what is known about the flight’s operation.
Can I display a gate from the schedule response?
Only display a gate when it is present in the data you use. The real-time example includes gate fields; the supplied schedule example does not establish that they are available in every schedule record.
How should I avoid duplicate codeshare entries?
First establish how the available data represents codeshares. Keep records separate until you have enough information to match them safely, and preserve the flight numbers users may search for.
Ready to build with CDG data? Register to get an API key, and explore MCP if it fits your workflow.