As part of an ongoing look at the various APIs we make available to our clients, this article seeks to provide rudimentary details of our National Transport Safety Board (NTSB) Aviation Incident/Accident API. Not unlike our regional aircraft search engines - most of which we're yet to introduce - making these types of features available on flying school and other similar websites ensures return visitation, and it establishes your website as a definitive industry resource. Turning your website into a true information repository will inevitably increase page impressions, add to your SEO presence, add credibility, and ultimately convert far higher than your everyday pedestrian website.
While the NTSB data is a highly valuable standalone service, it was initially put together to support the FAA registration search engine (details of which are forthcoming).
Want access to this API? Like us on Facebook and it'll be made available to you.
The NTSB data is made freely available via their website. Once provided in a far more usable relational format (albeit, MS Access), they now provide a single CSV and XML file that compromises marginally on the ability to filter results. That said, we've managed to emulate most features of the former version of this API (we've used the current version for over a year). This is one API that will be built upon in coming months to support far more robust searches and other funky features. While the current version is 'adequate', it doesn't handle exclusions very well - a feature necessary when conducing accident analysis.
Data is updated nightly without any interruption to the service.
The Result
The API permits single results, browsing, searching, geographic searches, and statistics. Only basic features are described here.
Individual Events
For each incident and accident, the NTSB assigns a unique event_id
, and it's this ID that we use to query individual results. Requesting ntsb.json?apikey=xxxxx&id=20140320X40839
unfolds into the following array:
1
Array
2
(
3
[code] => 200
4
[status] => 200
5
[message] => OK
6
[source] => BeliefMedia
7
[api_version] => 0.2
8
[data] => Array
9
(
10
[event_id] => 20140320X40839
11
[investigation_type] => Accident
12
[accident_number] => ERA14CA160
13
[event_date] => Array
14
(
15
[date] => 2014-03-08
16
[readable] => 8th March 2014
17
)
18
19
[general] => Array
20
(
21
[broad_phase_flight] => LANDING
22
[weather_condition] => VMC
23
[aircraft_damage] => Substantial
24
[aircraft_category] => Airplane
25
)
26
27
[location] => Array
28
(
29
[location] => Charlottesville, VA
30
[country] => United States
31
[latitude] => 38.139722
32
[longitude] => -78.452222
33
[airport_code] => CHO
34
)
35
36
[injury] => Array
37
(
38
[injury_severity] => Non-Fatal
39
[total_fatal_injuries] => 0
40
[total_serious_injuries] => 0
41
[total_minor_injuries] => 0
42
[total_uninjured] => 1
43
)
44
45
[aircraft] => Array
46
(
47
[registration_number] => N5423J
48
[make] => CESSNA
49
[model] => 172N
50
[amateur_built] => No
51
[number_engines] => 1
52
[engine_type] => Reciprocating
53
)
54
55
[operation] => Array
56
(
57
[far_description] => Part 91: General Aviation
58
[schedule] =>
59
[purpose_flight] => Personal
60
[air_carrier] =>
61
)
62
63
[report] => Array
64
(
65
[url] => https://www.ntsb.gov/_layouts/ntsb.aviation/brief.aspx?ev_id=20140320X40839
66
[report_status] => Probable Cause
67
[publication_date] => Array
68
(
69
[date] => 2015-07-08
70
[readable] => 8th July 2015
71
)
72
73
)
74
75
[summary] => Array
76
(
77
[event_details] => NTSB investigators used data provided by various entities, including, but not limited to, the Federal Aviation Administration and/or the operator and did not travel in support of this investigation to prepare this aircraft accident report.According to the pilot, he established a "crab angle to track" the centerline of the runway and maintained about 70 knots on the final leg of the traffic pattern. He pulled the throttle to idle, began to flare the airplane, and the airplane touched down on the main wheels first. It became airborne again, touched down on the runway, and "bounced" a third time. Then, during the landing roll, the pilot was instructed by the air traffic controller to taxi to the ramp area. As the pilot attempted to maneuver the airplane, he realized that the nose landing gear was "rough" to handle. He notified air traffic control that he was having trouble with the landing gear, and the airplane was towed off the runway. During the accident sequence, the airplane incurred substantial damage to the firewall. The pilot reported no preimpact mechanical malfunctions or failures with the airplane that would have precluded normal operation. The wind reported at the airport around the time of the accident was calm.
78
[probable_cause] => The pilot's inadequate landing flare, which resulted in a bounced landing and substantial damage to the firewall.
79
[narrative] => According to the pilot, he established a "crab angle to track" the centerline of the runway and maintained about 70 knots on the final leg of the traffic pattern. He pulled the throttle to idle, began to flare the airplane, and the airplane touched down on the main wheels first. It became airborne again, touched down on the runway, and "bounced" a third time. Then, during the landing roll, the pilot was instructed by the air traffic controller to taxi to the ramp area. As the pilot attempted to maneuver the airplane, he realized that the nose landing gear was "rough" to handle. He notified air traffic control that he was having trouble with the landing gear, and the airplane was towed off the runway. During the accident sequence, the airplane incurred substantial damage to the firewall. The pilot reported no preimpact mechanical malfunctions or failures with the airplane that would have precluded normal operation. The wind reported at the airport around the time of the accident was calm.
80
)
81
82
[data_source] => NTSB
83
[last_update_check] => 2018-04-12
84
)
85
86
)
All fields are shows regardless whether they have a corresponding value.
Browsing Results
Browsing requests are made to ntsb.json?apikey=xxxxx&type=browsing
(the type=browsing
is assumed if no other type or event ID is provided). The result, with most recent events listed first, is as follows:
As is the case with all results, alter the order that results are listed with order=asc
or order=desc
. Pagination is determined by the parameters of pg
(the page to return) and number
(the number of results on each page).
Searching
You may search upon any of the field values listed in the array below. Distinct field values are listed at the bottom of this page.
Searching by date field (event_date_start
, event_date_end
) is made via a 6-figure time group (YYMMDD) or in the following exact format: 12-april-2015 (or DD-month-YYYY).
Geographic Searches
Geographic searches are conducted in the same manner as standard searches with the addition of a geo
parameter. The geo value is formatted as a comma delimited string as follows: geo=latitude,longitude,range
(note no spaces). Querying ntsb.json?apikey=xxxxx&type=search&geo=35.00,-101.705833,100&make=piper
returns the following:
The accepted range value is in nautical miles although we return the data with kilometers and miles. Should the geographic string fail to validate, the results are returned without the distance data.
Statistics
Statistic results can be queried for all of the accepted search parameters. An example result for broad_phase_flight
related accidents is constructed as follows: ntsb.json?apikey=xxxxx&type=stats&field=broad_phase_flight
. We accept multiple parameters but usage is beyond the scope of this article. Generally speaking, stats can be returned based on any number of fields. Additionally, data is returned in various formats designed for most common graphing applications.
Sorting & Downloading Data
In all cases where multiple results are returned, using order=asc
or order=desc
reorders the results by date. If you would like to download a CSV file, use &download=csv
in your URL request.
The Next Version
We tend to use this database reasonably often in the course of our everyday aviation-related work. In light of our own experience, and based on occasional feedback, we'll be releasing the next version soon that includes searching upon any field with AND, OR, and NOT functionality. This API does support 'NOT' exclusions but it was added as an afterthought to test a few features, so it's best not used in the live environment. However, if you want to play with results, using an underscore before any search value equates to 'does not include'.
Data Fields
The following descriptors are sourced from the NTSB website . The query fields we use for searching are returned alongside the field description.
If you're building forms for searching, the entire list of distinct fields can be downloaded via ntsb.json?apikey=xxxxx&type=field_list
. The resulting JSON returns every distinct value for every searchable field.
Event ID event_id
The Event ID is a 14-character alphanumeric identifier for each incident/accident. Individual aircraft records require use of this unique code (eg: id=20180402X73754
).
Investigation Type investigation_type
The type is either incident or accident. Refers to a regulatory definition of the event severity. The severity of a general aviation accident or incident is classified as the combination of the highest level of injury sustained by the personnel involved (that is, fatal, serious, minor, or none) and level of damage to the aircraft involved (that is, destroyed, substantial, minor, or none).
Accident Number accident_number
Each accident/incident is assigned a unique case number by the NTSB. This number is used as a reference in all documents referring to the event. The first 3 characters are a letter abbreviation of the NTSB office that filed the report. The next 2 numbers represent the fiscal year in which the accident occurred. The next two letters indicate the investigation category (Major, Limited, etc) and mode (Aviation, Marine, etc). The next three digits indicate the chronological sequence in which the case was created within the given fiscal year. And a final letter (A, B, C, etc) may exist if the event involved multiple aircraft.
Event Date event_date
The date of the event. The raw data supplied by the NTSB is in the format MM/DD/YYYY. We convert it into various other formats for display and search purposes.
Location location
The city or place location closest to the site of the event.
Country country
The country in which the event took place.
Latitude and Longitude latitude
& longitude
From the NTSB: "Latitude and longitude are entered for the event site in degrees and decimal degrees. If the event occurred on an airport, the published coordinates for that airport can be entered. If the event was not on an airport, position coordinates may be obtained using Global Positioning System equipment or nearest known reading." We return the latitude and longitude in decimal and long formats with accident details (when available).
Airport Code airport_code
Airport code if the event took place within 3 miles of an airport, or the involved aircraft was taking off from, or on approach to, an airport.
Airport Name airport_name
Airport name if the event took place within 3 miles of an airport, or the involved aircraft was taking off from, or on approach to, an airport.
Injury Severity injury_severity
Indicate the highest level of injury among all injuries sustained as a result of the event.
Aircraft Damage aircraft_damage
Indicate the severity of damage to the accident aircraft. For the purposes of this variable, aircraft damage categories are defined in 49 CFR 830.2.
Aircraft Category aircraft_category
The category of the involved aircraft. In this case, the definition of aircraft category is the same as that used with respect to the certification, ratings, privileges, and limitations of airmen. Also note that there is some overlap of category and class in the available choices.
Registration Number registration_number
The full registration (tail) number of the involved aircraft, including the International Civil Aviation Organization (ICAO) country prefix. Note: the prefix for US registered aircraft is "N".
Make make
Name of the manufacturer of the involved aircraft.
Model model
The full alphanumeric aircraft model code, including any applicable series or derivative identifiers. For example, a 200 series Boeing 737 is entered as 737-200.
Amateur Built amateur_built
Aircraft is a homebuilt (Y/N).
Number of Engines number_engines
The total number of engines on the accident aircraft. Permitted values are 0, 1, 2, 3, 4
Engine Type engine_type
Type of engine(s) on the involved aircraft.
FAR Description far_description
The applicable regulation part (14 CFR) or authority the aircraft was operating under at the time of the accident.
Schedule schedule
If the accident aircraft was conducting air carrier operations under 14 CFR 121, 125, 129, or 135, indicate whether it was operating as a "scheduled or commuter" air carrier or as a "non-scheduled or air taxi" carrier. Permitted values are empty, NSCH, SCHD, and UNK.
Purpose of Flight purpose_flight
If the accident aircraft was operating under 14 CFR part 91,103,133, or 137, this was the primary purpose of flight.
Air Carrier air_carrier
The full name of the operator of the accident aircraft. This typically refers to an organization or group (e.g., airline or corporation) rather than the pilot; contanated with the carrier, business, or code share name if the accident aircraft was operated by a business, air carrier, or as part of a code share agreement.
Total Fatal Injuries total_fatal_injuries
The total number of fatal injuries from an event.
Total Serious Injuries total_serious_injuries
The total number of serious injuries from an event.
Total Uninjured total_uninjured
The total number of non-injuries from an event.
Weather Condition weather_condition
The basic weather conditions at the time of the event. Permitted values are VMC, IMC, and UNK.
Broad Phase of Flight broad_phase_flight
All occurrences include information about the phase of flight in which the occurrence took place. Phase of flight refers to the point in the aircraft operation profile in which the event occurred.
Report Status report_status
The furthest level to which a report has been completed.
Publication Date publication_date
The date on which the previous column (Report Status) was published to the web.
Brief & Narrative Details
Unavailable via the standard NTSB data, the narrative details (event, probably cause, and narrative) are a summary of the incident or accident as published on the NTSB website. It cannot be relied upon for accuracy.
Considerations
As stated, the API is undergoing a rebuild. In the meantime, if there's any particular feature you'd like to see us build into the service, please let us know.
While we generally build a client WordPress plugin for each source in our arsenal, the NTSB API is one source that we've neglected. That said, when we update the API we'll ensure there's a plugin to accompany it.