# getLiveFlightPosition

**Identifier:** `aviationstack_getLiveFlightPosition`

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

Get real-time position and tracking data for an active flight including coordinates, altitude, speed, and direction.

## Run it with the CLI

```bash
kirha tools run aviationstack_getLiveFlightPosition \
  --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_getLiveFlightPosition",
  "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": {
    "arrivalAirport": {
      "description": "Arrival airport IATA code (e.g., 'LAX') to narrow down search results.",
      "type": "string"
    },
    "departureAirport": {
      "description": "Departure airport IATA code (e.g., 'SFO') to narrow down search results.",
      "type": "string"
    },
    "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"
    }
  },
  "required": [
    "flightIdentifier"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "arrival": {
      "additionalProperties": false,
      "properties": {
        "airportIata": {
          "type": "string"
        },
        "airportName": {
          "type": "string"
        }
      },
      "required": [
        "airportName"
      ],
      "type": "object"
    },
    "context": {
      "type": "string"
    },
    "departure": {
      "additionalProperties": false,
      "properties": {
        "airportIata": {
          "type": "string"
        },
        "airportName": {
          "type": "string"
        }
      },
      "required": [
        "airportName"
      ],
      "type": "object"
    },
    "flightIata": {
      "type": "string"
    },
    "flightNumber": {
      "type": "string"
    },
    "flightStatus": {
      "enum": [
        "scheduled",
        "active",
        "landed",
        "cancelled",
        "incident",
        "diverted"
      ],
      "type": "string"
    },
    "hasLiveData": {
      "type": "boolean"
    },
    "livePosition": {
      "additionalProperties": false,
      "properties": {
        "altitude": {
          "type": "number"
        },
        "direction": {
          "type": "number"
        },
        "isGround": {
          "type": "boolean"
        },
        "lastUpdated": {
          "type": "string"
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "speedHorizontal": {
          "type": "number"
        },
        "speedVertical": {
          "type": "number"
        }
      },
      "required": [
        "latitude",
        "longitude",
        "altitude",
        "direction",
        "speedHorizontal",
        "speedVertical",
        "isGround",
        "lastUpdated"
      ],
      "type": "object"
    }
  },
  "required": [
    "context",
    "flightNumber",
    "hasLiveData",
    "departure",
    "arrival"
  ],
  "type": "object"
}
```

-----

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