{
  "openapi": "3.0.1",
  "info": {
    "title": "Airport Flight Status — Arrivals, Departures & Change Webhook",
    "description": "Get airport boards and flight status for any airport by IATA code; webhook on change. Official boards if available (KWI), else flight trackers. Typical run: a 60-flight board for 3 airports in about 10 seconds. Example input: {\"airports\":[\"DXB\",\"LHR\",\"JFK\"],\"direction\":\"arrivals\",\"maxFlights\":20}",
    "version": "0.1",
    "x-build-id": "ry9qeO0gImwFLqgyg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apimy~airport-flight-status/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apimy-airport-flight-status",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/apimy~airport-flight-status/runs": {
      "post": {
        "operationId": "runs-sync-apimy-airport-flight-status",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/apimy~airport-flight-status/run-sync": {
      "post": {
        "operationId": "run-sync-apimy-airport-flight-status",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "airports": {
            "title": "Airports (arrivals/departures board)",
            "type": "array",
            "description": "IATA codes of any airports whose board you want, e.g. \"DXB\", \"JFK\", \"KWI\" (ICAO codes like \"OMDB\" work too). Official airport boards where available (Kuwait), other airports via a public flight-tracking source (Flightradar24) — see `source` in each row. Leave empty if you only track single flights below.",
            "items": {
              "type": "string"
            }
          },
          "flights": {
            "title": "Flights to check (flight number + date)",
            "type": "array",
            "description": "One flight per line: flight number, optional date (YYYY-MM-DD — the DEPARTURE date, as on the ticket; without a date: the flight in the air now, else the one nearest to now) and optional airport, e.g. \"KU101 2026-11-25\", \"MS 778\", \"EY713 today CAI\", \"EK2\". Without an airport the flight's own origin and destination are found; both rows are the same flight (an overnight flight lands the next local day). JSON objects {\"flightNumber\": \"KU101\", \"date\": \"2026-11-25\", \"airport\": \"KWI\"} are accepted too. Each found flight is one row and one flight check.",
            "items": {
              "type": "string"
            }
          },
          "maxFlights": {
            "title": "Max flights per board",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Board mode: how many flights to return per airport and direction (the ones closest to now). 0 = the whole window.",
            "default": 200
          },
          "direction": {
            "title": "Direction",
            "enum": [
              "both",
              "arrivals",
              "departures"
            ],
            "type": "string",
            "description": "Arrivals, departures or both. Also limits where flight numbers are looked up.",
            "default": "both"
          },
          "hoursBefore": {
            "title": "Board window: hours back",
            "minimum": 0,
            "maximum": 36,
            "type": "integer",
            "description": "Board mode: include flights scheduled up to this many hours before now (max 36).",
            "default": 2
          },
          "hoursAfter": {
            "title": "Board window: hours ahead",
            "minimum": 0,
            "maximum": 48,
            "type": "integer",
            "description": "Board mode: include flights scheduled up to this many hours after now (max 48; airports publish about one day ahead).",
            "default": 12
          },
          "includePosition": {
            "title": "Live aircraft position (map)",
            "type": "boolean",
            "description": "Add `position` to each flight row: latitude, longitude, altitude (ft), ground speed (knots), heading, time of the last position and whether the aircraft is on the ground. A flight that is not in the air gets `position: null` and a `positionNote` saying why (not departed yet, landed, cancelled, out of coverage). Same price per flight row. With \"Only changes\" on, a flight in the air counts as changed on every run (its position moved), so it is written and billed each run; the webhook still fires only on status, time, gate or terminal changes.",
            "default": false
          },
          "includeTrack": {
            "title": "Flight track (path flown so far)",
            "type": "boolean",
            "description": "Also add `track`: the path the aircraft has flown, oldest point first, each with latitude, longitude, altitude, ground speed, heading and time. Heavy — a long-haul flight is about 1,000–2,000 points — so off by default. Turns on the live position too.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL (sent only when a flight changes)",
            "type": "string",
            "description": "Optional. Schedule this Actor (e.g. every 5 minutes) and it POSTs JSON {event, checkedAt, count, flights:[…]} here only for flights that are new or changed since the previous run — status, scheduled/estimated/actual time, gate or terminal. Each changed flight carries `changes: [{field, from, to}]`. If the webhook refuses, the same changes are sent again on the next run."
          },
          "onlyChanges": {
            "title": "Only changes",
            "type": "boolean",
            "description": "Remember flights between runs. Board mode: write only new or changed flights to the dataset. Flight-number mode: every checked flight is still written, with `change` = new / changed / unchanged; only new or changed flights are billed, unchanged re-checks are free (`billed: false`). Default: on when a webhook URL is set, off otherwise."
          },
          "finishedAfterHours": {
            "title": "Stop tracking a flight this many hours after it landed or departed",
            "minimum": 0,
            "maximum": 48,
            "type": "integer",
            "description": "Landed, departed or diverted flights are dropped from tracking after this many hours, cancelled flights right after the cancellation is reported. Dropped flights are not written or charged again.",
            "default": 2
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Optional. Runs with the same watch name share one memory of what was already sent, even if the flight list changes between runs. Without it the memory belongs to this exact list of airports and flights."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}