# getAirportTimetable

**Identifier:** `aviationstack_getAirportTimetable`

**Provider:** [Aviationstack](https://kirha.com/providers/aviationstack.md)

Get today's flight timetable for an airport showing all arrivals or departures.

## Run it with the CLI

```bash
kirha tools run aviationstack_getAirportTimetable \
  --input '{
    "airportIata": "JFK",
    "type": "arrival"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "aviationstack_getAirportTimetable",
  "input": {
    "airportIata": "JFK",
    "type": "arrival"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "airportIata": {
      "description": "Airport IATA code (e.g., 'JFK', 'LAX', 'CDG')",
      "type": "string"
    },
    "limit": {
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "type": "number"
    },
    "type": {
      "description": "Type of timetable: arrival or departure",
      "enum": [
        "arrival",
        "departure"
      ],
      "type": "string"
    }
  },
  "required": [
    "airportIata",
    "type"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "airportIata": {
      "type": "string"
    },
    "context": {
      "type": "string"
    },
    "flights": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "airlineIata": {
            "type": "string"
          },
          "airlineName": {
            "type": "string"
          },
          "arrival": {
            "additionalProperties": false,
            "properties": {
              "actualTime": {
                "type": "string"
              },
              "airportIata": {
                "type": "string"
              },
              "baggageClaim": {
                "type": "string"
              },
              "delayMinutes": {
                "type": "string"
              },
              "estimatedTime": {
                "type": "string"
              },
              "gate": {
                "type": "string"
              },
              "scheduledTime": {
                "type": "string"
              },
              "terminal": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "departure": {
            "additionalProperties": false,
            "properties": {
              "actualTime": {
                "type": "string"
              },
              "airportIata": {
                "type": "string"
              },
              "delayMinutes": {
                "type": "string"
              },
              "estimatedTime": {
                "type": "string"
              },
              "gate": {
                "type": "string"
              },
              "scheduledTime": {
                "type": "string"
              },
              "terminal": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "flightIata": {
            "type": "string"
          },
          "flightNumber": {
            "type": "string"
          },
          "flightStatus": {
            "enum": [
              "landed",
              "scheduled",
              "cancelled",
              "active",
              "incident",
              "diverted",
              "redirected",
              "unknown"
            ],
            "type": "string"
          },
          "operatedBy": {
            "additionalProperties": false,
            "description": "Set when this entry is a codeshare: the airline and flight that actually operate it.",
            "properties": {
              "airlineName": {
                "type": "string"
              },
              "flightIata": {
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "flightNumber",
          "departure",
          "arrival"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "ids": {
      "description": "Flight IATA numbers, usable as flightIdentifier in getFlightStatus",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "timetableType": {
      "enum": [
        "arrival",
        "departure"
      ],
      "type": "string"
    },
    "totalFlights": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "airportIata",
    "timetableType",
    "flights",
    "totalFlights",
    "ids"
  ],
  "type": "object"
}
```

## Related tools

Other Aviationstack tools that this tool refers to, or that refer to it.

- [`searchAirports`](https://kirha.com/providers/aviationstack/searchAirports.md)
- [`getFlightStatus`](https://kirha.com/providers/aviationstack/getFlightStatus.md)

-----

[All Aviationstack tools](https://kirha.com/providers/aviationstack.md) · [< Back to tools list](https://kirha.com/tools.md)