# getFlightStatus

**Identifier:** `aviationstack_getFlightStatus`

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

Get real-time or historical flight status with delay information, supporting various flight identifiers (flight number, IATA code, ICAO code).

## Run it with the CLI

```bash
kirha tools run aviationstack_getFlightStatus \
  --input '{
    "flightIdentifier": "1004"
  }'
```

`--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_getFlightStatus",
  "input": {
    "flightIdentifier": "1004"
  }
}'
```

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": {
    "flightDate": {
      "description": "Flight date in YYYY-MM-DD format. Defaults to today if not provided.",
      "type": "string"
    },
    "flightIdentifier": {
      "description": "Flight identifier: can be a flight number (e.g., '1004'), IATA code (e.g., 'AA1004'), or ICAO code (e.g., 'AAL1004').",
      "type": "string"
    },
    "nearHour": {
      "description": "Approximate departure time in HH:mm format (e.g., '14:30') to find the closest matching flight. If not provided, returns the most recent flight.",
      "type": "string"
    }
  },
  "required": [
    "flightIdentifier"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "aircraft": {
      "additionalProperties": false,
      "properties": {
        "iataCode": {
          "type": "string"
        },
        "icaoCode": {
          "type": "string"
        },
        "registration": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "airlineIata": {
      "type": "string"
    },
    "airlineName": {
      "type": "string"
    },
    "arrival": {
      "additionalProperties": false,
      "properties": {
        "actualTime": {
          "type": "string"
        },
        "airportIata": {
          "type": "string"
        },
        "airportName": {
          "type": "string"
        },
        "baggageClaim": {
          "type": "string"
        },
        "delayMinutes": {
          "type": "number"
        },
        "estimatedTime": {
          "type": "string"
        },
        "gate": {
          "type": "string"
        },
        "scheduledTime": {
          "type": "string"
        },
        "terminal": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        }
      },
      "required": [
        "airportName"
      ],
      "type": "object"
    },
    "context": {
      "type": "string"
    },
    "departure": {
      "additionalProperties": false,
      "properties": {
        "actualTime": {
          "type": "string"
        },
        "airportIata": {
          "type": "string"
        },
        "airportName": {
          "type": "string"
        },
        "delayMinutes": {
          "type": "number"
        },
        "estimatedTime": {
          "type": "string"
        },
        "gate": {
          "type": "string"
        },
        "scheduledTime": {
          "type": "string"
        },
        "terminal": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        }
      },
      "required": [
        "airportName"
      ],
      "type": "object"
    },
    "flightDate": {
      "type": "string"
    },
    "flightIata": {
      "type": "string"
    },
    "flightIcao": {
      "type": "string"
    },
    "flightNumber": {
      "type": "string"
    },
    "flightStatus": {
      "enum": [
        "scheduled",
        "active",
        "landed",
        "cancelled",
        "incident",
        "diverted"
      ],
      "type": "string"
    },
    "isDelayed": {
      "type": "boolean"
    },
    "totalDelayMinutes": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "flightDate",
    "flightNumber",
    "airlineName",
    "departure",
    "arrival",
    "isDelayed"
  ],
  "type": "object"
}
```

## Related tools

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

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

-----

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