Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Census of fatal U.S. motor-vehicle crashes for building road-safety maps and fatality-trend monitors.
From source to product signal
FARS is a census of fatal crashes on U.S. public roads. Start with one year's accident CSV. It does not include non-fatal crashes, and FARS is not the same as NHTSA recall records.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import pandas as pd
import requests
response = requests.get(
"https://crashviewer.nhtsa.dot.gov/CrashAPI/FARSData/GetFARSData",
params={
"dataset": "Accident",
"FromYear": "2022",
"ToYear": "2022",
"State": "12",
"format": "json",
},
timeout=60,
)
response.raise_for_status()
crashes = pd.DataFrame(response.json().get("Results", [[]])[0])
crashes["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(crashes.head())Test a useful signal
Test whether a FARS extract can power a bounded road-safety sketch.
National Highway Traffic Safety Administration is a government source. Last verified 2026-08-18. Temporal coverage: annual FARS files from 1975-present.