# Schedules



Departure and arrival schedules for an airport over a time window. Both operations return the same flight-row shape with a `direction` discriminator (`departures` or `arrivals`). By default the API returns upcoming flights for roughly the next 12 hours.

Use for airport boards, dispatch dashboards, and batch ETL. Provide exactly one airport identifier (`icao` or `iata`) per request.

**Important:** Flight row keys use **title case** — `Time`, `Flight`, `Status`, not `time`, `flight`, `status`. Accessing lowercase keys returns `undefined`.

## Request [#request]

<DocRequirements>
  <DocRequirementAuth />
</DocRequirements>

**Departures**

<DocApiPath method="GET" path="/v3/schedules/departures" />

**Arrivals**

<DocApiPath method="GET" path="/v3/schedules/arrivals" />

| Parameter | Type    | Required               | Default      | Description                                                               |
| --------- | ------- | ---------------------- | ------------ | ------------------------------------------------------------------------- |
| `icao`    | string  | One of `icao` / `iata` | -            | 4-letter ICAO airport code                                                |
| `iata`    | string  | One of `icao` / `iata` | -            | 3-letter IATA airport code                                                |
| `date`    | string  | No                     | current date | Date in `DD-MM-YYYY` format. Range: 5 days back to 1 day forward          |
| `time`    | string  | No                     | current time | Time in `HH:MM` format. Requires `date` when provided                     |
| `ts`      | integer | No                     | -            | Unix timestamp in **milliseconds**. When set, overrides `date` and `time` |

## Response [#response]

### Departures example [#departures-example]

```json
{
  "iata": "MXP",
  "direction": "departures",
  "airport_code": "LIMC",
  "flights": [
    {
      "Time": "16:05",
      "Date": "11 Feb",
      "IATA": "ICN",
      "Destination": "Seoul",
      "Flight": "C84093",
      "Airline": "Federal Airlines",
      "Status": "Estimated 16:39"
    }
  ],
  "total_flights": 85,
  "pages_fetched": 3
}
```

### Arrivals example [#arrivals-example]

```json
{
  "iata": "MXP",
  "direction": "arrivals",
  "airport_code": "LIMC",
  "flights": [
    {
      "Time": "16:20",
      "Date": "11 Feb",
      "IATA": "RAK",
      "Origin": "Marrakech",
      "Flight": "EC3929",
      "Airline": "easyJet Europe",
      "Status": "Landed 16:15"
    }
  ],
  "total_flights": 72,
  "pages_fetched": 3
}
```

### Envelope fields [#envelope-fields]

| Field           | Type    | Required | Description                            |
| --------------- | ------- | -------- | -------------------------------------- |
| `iata`          | string  | **Yes**  | Requested airport IATA code when known |
| `direction`     | string  | **Yes**  | `departures` or `arrivals`             |
| `airport_code`  | string  | **Yes**  | Echo of your query                     |
| `flights`       | array   | **Yes**  | Schedule rows (may be empty)           |
| `total_flights` | integer | **Yes**  | Total flights in the queried window    |
| `pages_fetched` | integer | **Yes**  | Pages fetched behind the scenes        |

### Flight row object (`flights[]`) [#flight-row-object-flights]

| Field         | Type   | Required        | Description                    |
| ------------- | ------ | --------------- | ------------------------------ |
| `Time`        | string | **Yes**         | Local scheduled time           |
| `Date`        | string | **Yes**         | Local date label               |
| `IATA`        | string | **Yes**         | Opposite airport IATA code     |
| `Destination` | string | Departures only | Destination city/airport label |
| `Origin`      | string | Arrivals only   | Origin city/airport label      |
| `Flight`      | string | **Yes**         | Flight number                  |
| `Airline`     | string | **Yes**         | Airline display name           |
| `Status`      | string | **Yes**         | Free-form status text          |

## Client types [#client-types]

<DocClientTypes id="v31/schedules/schedules-types" />

## Integration [#integration]

<DocExample id="v31/schedules/schedules-fetch" />

### Implementation notes [#implementation-notes]

**Status parsing.** `Status` is display text — parse conservatively.

**Single-flight detail.** For gate and terminal on one flight, use [Flight Status](/docs/v3/flight-status).

## Error responses [#error-responses]

### 422 - invalid date/time or missing airport code [#422---invalid-datetime-or-missing-airport-code]

```json
{
  "detail": [
    {
      "type": "value_error",
      "loc": ["query", "date"],
      "msg": "Invalid date format. Expected DD-MM-YYYY."
    }
  ]
}
```

<APIPage document="&#x22;https://api.skylinkapi.com/v3/openapi.json&#x22;" operations="[{&#x22;path&#x22;:&#x22;/schedules/departures&#x22;,&#x22;method&#x22;:&#x22;get&#x22;},{&#x22;path&#x22;:&#x22;/schedules/arrivals&#x22;,&#x22;method&#x22;:&#x22;get&#x22;}]" />

***

Related: [Flight Status](/docs/v3/flight-status) · [Airports](/docs/v3/airports) · [Airlines](/docs/v3/airlines)
