{
  "openapi": "3.0.1",
  "info": {
    "title": "NTSB Aviation Accident Scraper",
    "description": "Scrape NTSB's public CAROL database of U.S. aviation accidents and incidents. Search by NTSB number, registration, operator, airport, date range, aircraft category, injury severity, and more, or browse aviation safety recommendations.",
    "version": "1.0",
    "x-build-id": "oQgkhy61byxC3NVOu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~ntsb-aviation-accident-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-ntsb-aviation-accident-scraper",
        "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/crawlerbros~ntsb-aviation-accident-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-ntsb-aviation-accident-scraper",
        "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/crawlerbros~ntsb-aviation-accident-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-ntsb-aviation-accident-scraper",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "accidents",
              "safetyRecommendations"
            ],
            "type": "string",
            "description": "What to fetch from NTSB CAROL.",
            "default": "accidents"
          },
          "ntsbNumber": {
            "title": "NTSB number contains (mode=accidents)",
            "type": "string",
            "description": "Filter to cases whose NTSB number contains this text, e.g. `ERA24`."
          },
          "registrationNumber": {
            "title": "Aircraft registration (N-number) contains (mode=accidents)",
            "type": "string",
            "description": "Filter by aircraft tail/registration number, e.g. `N123AB`."
          },
          "operatorName": {
            "title": "Operator name contains (mode=accidents)",
            "type": "string",
            "description": "Filter by airline/operator name, e.g. `Delta`."
          },
          "airportName": {
            "title": "Airport name contains (mode=accidents)",
            "type": "string",
            "description": "Filter by nearest airport name, e.g. `O'Hare`."
          },
          "city": {
            "title": "City contains (mode=accidents)",
            "type": "string",
            "description": "Filter by event city, e.g. `Chicago`."
          },
          "state": {
            "title": "US state / region (mode=accidents)",
            "enum": [
              "AL",
              "AK",
              "AS",
              "AZ",
              "AR",
              "AO",
              "XB",
              "CA",
              "CB",
              "CO",
              "CT",
              "DE",
              "DC",
              "FL",
              "GA",
              "GU",
              "GM",
              "HI",
              "XH",
              "ID",
              "IL",
              "IN",
              "IA",
              "XQ",
              "XU",
              "KS",
              "KY",
              "XM",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "QM",
              "MN",
              "MS",
              "MO",
              "MT",
              "XV",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "MP",
              "OH",
              "OK",
              "OR",
              "OF",
              "PO",
              "XL",
              "PA",
              "PR",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VI",
              "VA",
              "QW",
              "WA",
              "WV",
              "WI",
              "WY"
            ],
            "type": "string",
            "description": "Filter to a specific U.S. state, territory, or region."
          },
          "country": {
            "title": "Country (mode=accidents)",
            "type": "string",
            "description": "Filter by country name, e.g. `United States`, `Canada`, `Mexico`, `United Kingdom`. Matched case-insensitively against NTSB's ~289 known country names."
          },
          "eventDateFrom": {
            "title": "Event date from (mode=accidents)",
            "type": "string",
            "description": "Only events on/after this date."
          },
          "eventDateTo": {
            "title": "Event date to (mode=accidents)",
            "type": "string",
            "description": "Only events on/before this date."
          },
          "highestInjury": {
            "title": "Highest injury level (mode=accidents)",
            "enum": [
              "Fatal",
              "Serious",
              "Minor",
              "None"
            ],
            "type": "string",
            "description": "Filter by the most severe injury reported."
          },
          "eventType": {
            "title": "Event type (mode=accidents)",
            "enum": [
              "ACC",
              "INC",
              "OCC"
            ],
            "type": "string",
            "description": "Filter by NTSB event classification."
          },
          "aircraftCategory": {
            "title": "Aircraft category (mode=accidents)",
            "enum": [
              "AIR",
              "BALL",
              "BLIM",
              "CSF",
              "GLI",
              "GYRO",
              "HELI",
              "PPAR",
              "PLFT",
              "RCKT",
              "ULTR",
              "UNK",
              "UNMANNED",
              "WSFT"
            ],
            "type": "string",
            "description": "Filter by aircraft category."
          },
          "engineType": {
            "title": "Engine type (mode=accidents)",
            "enum": [
              "ELEC",
              "GTFN",
              "HR",
              "LR",
              "NONE",
              "REC",
              "SR",
              "TF",
              "TJ",
              "TP",
              "TS",
              "UNK"
            ],
            "type": "string",
            "description": "Filter by aircraft engine type."
          },
          "damage": {
            "title": "Aircraft damage (mode=accidents)",
            "enum": [
              "Destroyed",
              "Substantial",
              "Minor",
              "None",
              "Unknown"
            ],
            "type": "string",
            "description": "Filter by degree of aircraft damage."
          },
          "farPart": {
            "title": "FAR part / regulation (mode=accidents)",
            "enum": [
              "ARMF",
              "NUSC",
              "NUSN",
              "103",
              "107",
              "121",
              "125",
              "129",
              "133",
              "135",
              "137",
              "415",
              "431",
              "435",
              "437",
              "450",
              "091K",
              "091",
              "091F",
              "PUBU",
              "UNK"
            ],
            "type": "string",
            "description": "Filter by the FAA regulation part the flight was conducted under."
          },
          "flightOperationType": {
            "title": "Purpose of flight (mode=accidents)",
            "enum": [
              "AAPL",
              "AOBV",
              "ADRP",
              "ASHO",
              "BANT",
              "BUS",
              "EXEC",
              "EXLD",
              "FERY",
              "FIRF",
              "FLTS",
              "GLDT",
              "INST",
              "OWRK",
              "PERS",
              "POSI",
              "PUBU",
              "PUBF",
              "PUBL",
              "PUBS",
              "SKYD",
              "UNK"
            ],
            "type": "string",
            "description": "Filter by the purpose/type of the flight operation."
          },
          "flightServiceType": {
            "title": "Passenger/cargo type (mode=accidents)",
            "enum": [
              "CARG",
              "MAIL",
              "PAX",
              "PACA",
              "UNK"
            ],
            "type": "string",
            "description": "Filter by flight service type."
          },
          "flightScheduledType": {
            "title": "Scheduled/non-scheduled (mode=accidents)",
            "enum": [
              "NSCH",
              "SCHD",
              "UNK"
            ],
            "type": "string",
            "description": "Filter by whether the flight was scheduled service."
          },
          "weatherCondition": {
            "title": "Weather condition (mode=accidents)",
            "enum": [
              "IMC",
              "VMC"
            ],
            "type": "string",
            "description": "Filter by basic weather condition at the accident site."
          },
          "eventCategory": {
            "title": "Event category / CICTT (mode=accidents)",
            "enum": [
              "Abnormal Runway Contact",
              "Air Traffic",
              "Airport Occurrence",
              "Cabin Safety",
              "CFIT",
              "Collision on Takeoff or Landing",
              "Fire",
              "Fuel",
              "Ground Collision",
              "Ground Handling",
              "Glider Towing",
              "Icing",
              "Low Altitude",
              "Loss of Control (Ground)",
              "Loss of Control (Inflight)",
              "Midair",
              "Abrupt Maneuver",
              "Navigation Error",
              "Runway Excursion",
              "Runway Incursion",
              "System/Component Failure (Powerplant)",
              "System/Component Failure (Non-Powerplant)",
              "Turbulence",
              "Undershoot/Overshoot",
              "Weather",
              "Other"
            ],
            "type": "string",
            "description": "Filter by the CICTT (ICAO) event category, e.g. Loss of Control, Runway Excursion."
          },
          "phaseOfFlight": {
            "title": "Phase of flight (mode=accidents)",
            "enum": [
              "Standing",
              "Pushback/Tow",
              "Taxi",
              "Takeoff",
              "Initial Climb",
              "Enroute",
              "Maneuvering",
              "Approach",
              "Landing",
              "Emergency Descent",
              "Uncontrolled Descent",
              "Post-Impact",
              "After Landing",
              "Unknown"
            ],
            "type": "string",
            "description": "Filter by the flight phase during which the event occurred."
          },
          "openClosedStatus": {
            "title": "Investigation status (mode=accidents)",
            "enum": [
              "true",
              "false"
            ],
            "type": "string",
            "description": "Filter by whether NTSB's investigation is completed or still in work."
          },
          "minOnboardInjuries": {
            "title": "Min onboard injury count (mode=accidents)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Only include cases with at least this many injured/fatal occupants onboard."
          },
          "aircraftMake": {
            "title": "Aircraft make contains (mode=accidents)",
            "type": "string",
            "description": "Filter by aircraft manufacturer, e.g. `Cessna`."
          },
          "aircraftModel": {
            "title": "Aircraft model contains (mode=accidents)",
            "type": "string",
            "description": "Filter by aircraft model, e.g. `172`."
          },
          "registeredOwner": {
            "title": "Registered owner contains (mode=accidents)",
            "type": "string",
            "description": "Filter by the aircraft's registered owner name."
          },
          "airportId": {
            "title": "Airport identifier contains (mode=accidents)",
            "type": "string",
            "description": "Filter by nearest airport identifier/code, e.g. `ORD`."
          },
          "serialNumber": {
            "title": "Aircraft serial number contains (mode=accidents)",
            "type": "string",
            "description": "Filter by aircraft manufacturer serial number."
          },
          "numberOfEngines": {
            "title": "Number of engines (mode=accidents)",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Only include aircraft with exactly this many engines."
          },
          "amateurBuilt": {
            "title": "Amateur-built aircraft (mode=accidents)",
            "enum": [
              "true",
              "false"
            ],
            "type": "string",
            "description": "Filter to (or exclude) homebuilt/amateur-built aircraft."
          },
          "generalAviationFlight": {
            "title": "General aviation flight (mode=accidents)",
            "enum": [
              "true",
              "false"
            ],
            "type": "string",
            "description": "Filter to (or exclude) general aviation flights."
          },
          "airMedicalFlight": {
            "title": "Air medical flight (mode=accidents)",
            "enum": [
              "true",
              "false"
            ],
            "type": "string",
            "description": "Filter to (or exclude) air medical (e.g. air ambulance) flights."
          },
          "commercialSightseeing": {
            "title": "Commercial sightseeing flight (mode=accidents)",
            "enum": [
              "true",
              "false"
            ],
            "type": "string",
            "description": "Filter to (or exclude) commercial sightseeing flights."
          },
          "secondPilotPresent": {
            "title": "Second pilot present (mode=accidents)",
            "enum": [
              "true",
              "false"
            ],
            "type": "string",
            "description": "Filter by whether a second pilot was onboard."
          },
          "leadAgency": {
            "title": "Lead investigating agency (mode=accidents)",
            "enum": [
              "NTSB",
              "Other",
              "Coast Guard"
            ],
            "type": "string",
            "description": "Filter by which agency led the investigation."
          },
          "recKeyword": {
            "title": "Recommendation text contains (mode=safetyRecommendations)",
            "type": "string",
            "description": "Filter safety recommendations whose text contains this keyword, e.g. `engine`."
          },
          "addresseeName": {
            "title": "Addressee name contains (mode=safetyRecommendations)",
            "type": "string",
            "description": "Filter by the agency/organization the recommendation was addressed to, e.g. `FAA`."
          },
          "recStatus": {
            "title": "Recommendation status (mode=safetyRecommendations)",
            "enum": [
              "open",
              "closed"
            ],
            "type": "string",
            "description": "Filter by whether the recommendation is open or closed."
          },
          "recPriority": {
            "title": "Recommendation priority (mode=safetyRecommendations)",
            "enum": [
              "Urgent",
              "NonUrgent"
            ],
            "type": "string",
            "description": "Filter by priority level."
          },
          "recDateIssuedFrom": {
            "title": "Date issued from (mode=safetyRecommendations)",
            "type": "string",
            "description": "Only recommendations issued on/after this date."
          },
          "recDateIssuedTo": {
            "title": "Date issued to (mode=safetyRecommendations)",
            "type": "string",
            "description": "Only recommendations issued on/before this date."
          },
          "recDetailedStatus": {
            "title": "Detailed status (mode=safetyRecommendations)",
            "enum": [
              "8",
              "11",
              "10",
              "9",
              "15",
              "2",
              "13",
              "3",
              "1",
              "5",
              "7",
              "4",
              "14",
              "12",
              "6"
            ],
            "type": "string",
            "description": "Filter by the detailed recommendation status (more granular than open/closed)."
          },
          "addresseeCategory": {
            "title": "Addressee category (mode=safetyRecommendations)",
            "enum": [
              "11",
              "1",
              "3",
              "12",
              "14",
              "2",
              "9",
              "7",
              "13",
              "4",
              "5",
              "8"
            ],
            "type": "string",
            "description": "Filter by the type of organization the recommendation was addressed to."
          },
          "isReiterated": {
            "title": "Reiterated recommendation (mode=safetyRecommendations)",
            "enum": [
              "true",
              "false"
            ],
            "type": "string",
            "description": "Filter to (or exclude) recommendations that NTSB has reiterated to the addressee."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "Event.EventDate",
              "Event.NTSBNumber",
              "Event.City",
              "Event.State",
              "Event.Country",
              "Event.HighestInjury",
              "Aircraft.RegistrationNumber",
              "Aircraft.AircraftCategory",
              "Notation.DateIssued"
            ],
            "type": "string",
            "description": "Upstream column to sort by. Leave blank to sort by event date (mode=accidents) or date issued (mode=safetyRecommendations)."
          },
          "sortDescending": {
            "title": "Sort descending",
            "type": "boolean",
            "description": "Sort newest/highest first.",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not required for normal use — NTSB CAROL is publicly accessible. Only engaged automatically if the upstream API returns 403/429.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}