{
  "openapi": "3.1.0",
  "info": {
    "title": "Traffic Fatalities API",
    "version": "1.0.0",
    "description": "Every fatal US road crash from 2016 to 2023: 289,625 crashes with location, conditions and drinking-driver counts.\n\nThe complete census of fatal motor-vehicle crashes on US public roads, from NHTSA''s Fatality Analysis Reporting System: 289,625 crashes and 314,452 fatalities across 2016-2023, 99.6% with precise coordinates. Every crash carries state, county and city, date and time, fatality/person/vehicle/pedestrian counts, the number of drinking drivers (consistently derived across all years), weather, light condition, road type and function, harmful event, collision manner, work-zone and school-bus flags. The nearby endpoint answers the question insurers, mapping products and home buyers actually ask — every fatal crash within a radius of a point (Times Square, 3 km: 25 crashes, the closest a pedestrian fatality 20 meters away). Search by state, county, drunk-driving involvement, weather or date range; stats endpoints match NHTSA''s published totals exactly (2021: 43,230 deaths). Built for insurance and risk models, road-safety and navigation products, real estate, journalism and research. Public-domain source data, self-hosted — no third-party calls at request time.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/traffic-fatalities.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/traffic-fatalities"
  },
  "servers": [
    {
      "url": "https://api-traffic-fatalities.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Transportation",
      "description": "Traffic Fatalities API belongs to the Transportation category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/crashes/stats": {
      "get": {
        "operationId": "crashStatistics",
        "summary": "Crash Statistics",
        "description": "Crash Statistics endpoint of the Traffic Fatalities API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/traffic-fatalities/crash-statistics"
        },
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "year"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "dimension": "year",
                  "count": 8,
                  "results": [
                    {
                      "key": "2021",
                      "crashes": 39785,
                      "fatalities": 43230
                    },
                    {
                      "key": "2022",
                      "crashes": 39422,
                      "fatalities": 42721
                    },
                    {
                      "key": "2023",
                      "crashes": 37769,
                      "fatalities": 41025
                    },
                    {
                      "key": "2020",
                      "crashes": 35935,
                      "fatalities": 39007
                    },
                    {
                      "key": "2016",
                      "crashes": 34748,
                      "fatalities": 37806
                    },
                    {
                      "key": "2017",
                      "crashes": 34560,
                      "fatalities": 37473
                    },
                    {
                      "key": "2018",
                      "crashes": 33919,
                      "fatalities": 36835
                    },
                    {
                      "key": "2019",
                      "crashes": 33487,
                      "fatalities": 36355
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/crashes/nearby": {
      "get": {
        "operationId": "crashesNearAPoint",
        "summary": "Crashes Near A Point",
        "description": "Crashes Near A Point endpoint of the Traffic Fatalities API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/traffic-fatalities/crashes-near-a-point"
        },
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "40.758"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "25"
          },
          {
            "name": "lon",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "-73.9855"
          },
          {
            "name": "radius",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "3"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "lat": 40.758,
                  "lon": -73.9855,
                  "radius_km": 3,
                  "count": 3,
                  "results": [
                    {
                      "year": 2021,
                      "st_case": 360020,
                      "state": "New York",
                      "county": "New York",
                      "city": "New York",
                      "date": "2021-02-06",
                      "day_of_week": "Saturday",
                      "time": "13:29",
                      "latitude": 40.757872,
                      "longitude": -73.985575,
                      "fatalities": 1,
                      "persons": 1,
                      "vehicles": 1,
                      "pedestrians": 1,
                      "drunk_drivers": 0,
                      "weather": "Clear",
                      "light_condition": "Daylight",
                      "route_type": "Local Street - Municipality",
                      "trafficway": "W 45TH ST",
                      "harmful_event": "Pedestrian",
                      "collision_manner": "The First Harmful Event was Not a Collision with a Motor Vehicle in Transport",
                      "rural_urban": "Urban",
                      "road_function": "Major Collector",
                      "intersection_type": "Four-Way Intersection",
                      "work_zone": "None",
                      "school_bus_involved": false,
                      "distance_km": 0.02
                    },
                    {
                      "year": 2020,
                      "st_case": 360519,
                      "state": "New York",
                      "county": "New York",
                      "city": "New York",
                      "date": "2020-09-01",
                      "day_of_week": "Tuesday",
                      "time": "04:02",
                      "latitude": 40.757331,
                      "longitude": -73.985947,
                      "fatalities": 1,
                      "persons": 2,
                      "vehicles": 1,
                      "pedestrians": 0,
                      "drunk_drivers": 0,
                      "weather": "Cloudy",
                      "light_condition": "Dark - Lighted",
                      "route_type": "Local Street - Municipality",
                      "trafficway": "7TH AVE",
                      "harmful_event": "Fell/Jumped from Vehicle",
                      "collision_manner": "The First Harmful Event was Not a Collision with a Motor Vehicle in Transport",
                      "rural_urban": "Urban",
                      "road_function": "Principal Arterial - Other",
                      "intersection_type": "T-Intersection",
                      "work_zone": "None",
                      "school_bus_involved": false,
                      "distance_km": 0.08
                    },
                    {
                      "year": 2023,
                      "st_case": 360796,
                      "state": "New York",
                      "county": "New York",
                      "city": "New York",
                      "date": "2023-11-17",
                      "day_of_week": "Friday",
                      "time": "06:28",
                      "latitude": 40.759197,
                      "longitude": -73.9846,
                      "fatalities": 1,
                      "persons": 1,
                      "vehicles": 1,
                      "pedestrians": 1,
                      "drunk_drivers": 0,
                      "weather": "Clear",
                      "light_condition": "Daylight",
                      "route_type": "Not Signed",
                      "trafficway": "W 47TH ST",
                      "harmful_event": "Pedestrian",
                      "collision_manner": "The First Harmful Event was Not a Collision with a Motor Vehicle in Transport",
                      "rural_urban": "Urban",
                      "road_function": "Major Collector",
                      "intersection_type": "Four-Way Intersection",
                      "work_zone": "None",
                      "school_bus_involved": false,
                      "distance_km": 0.15
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/sources": {
      "get": {
        "operationId": "dataSources",
        "summary": "Data Sources",
        "description": "Data Sources endpoint of the Traffic Fatalities API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/traffic-fatalities/data-sources"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "coverage": "NHTSA FARS, 2016-2023",
                  "count": 1,
                  "sources": [
                    {
                      "slug": "nhtsa-fars",
                      "name": "FARS national files 2016-2023",
                      "publisher": "NHTSA (US Department of Transportation)",
                      "licence": "US Government work - public domain",
                      "source_url": "https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars",
                      "file_url": "https://static.nhtsa.gov/nhtsa/downloads/FARS/2023/National/FARS2023NationalCSV.zip",
                      "cadence": "annual (new year each autumn)",
                      "record_count": 289625,
                      "retrieved_at": "2026-09-05"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/crashes/{year}/{st_case}": {
      "get": {
        "operationId": "getCrash",
        "summary": "Get Crash",
        "description": "Get Crash endpoint of the Traffic Fatalities API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/traffic-fatalities/get-crash"
        },
        "parameters": [
          {
            "name": "st_case",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "10001"
          },
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "2023"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "crash": {
                    "year": 2023,
                    "st_case": 10001,
                    "state": "Alabama",
                    "county": "Butler",
                    "city": null,
                    "date": "2023-01-04",
                    "day_of_week": "Wednesday",
                    "time": "22:20",
                    "latitude": 31.927975,
                    "longitude": -86.538833,
                    "fatalities": 1,
                    "persons": 1,
                    "vehicles": 1,
                    "pedestrians": 0,
                    "drunk_drivers": 0,
                    "weather": "Clear",
                    "light_condition": "Dark - Not Lighted",
                    "route_type": "U.S. Highway",
                    "trafficway": "US-31 SR-3",
                    "harmful_event": "Rollover/Overturn",
                    "collision_manner": "The First Harmful Event was Not a Collision with a Motor Vehicle in Transport",
                    "rural_urban": "Rural",
                    "road_function": "Major Collector",
                    "intersection_type": "Not an Intersection",
                    "work_zone": "None",
                    "school_bus_involved": false
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/crashes": {
      "get": {
        "operationId": "searchCrashes",
        "summary": "Search Crashes",
        "description": "Search Crashes endpoint of the Traffic Fatalities API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/traffic-fatalities/search-crashes"
        },
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "county",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2023-01-01"
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2023-12-31"
          },
          {
            "name": "drunk",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "true"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "20"
          },
          {
            "name": "min_fatalities",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Texas"
          },
          {
            "name": "weather",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2023"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "total": 973,
                  "page": 1,
                  "limit": 20,
                  "count": 3,
                  "results": [
                    {
                      "year": 2023,
                      "st_case": 483866,
                      "state": "Texas",
                      "county": "Tarrant",
                      "city": "Arlington",
                      "date": "2023-12-31",
                      "day_of_week": "Sunday",
                      "time": "02:05",
                      "latitude": 32.648886,
                      "longitude": -97.143014,
                      "fatalities": 1,
                      "persons": 1,
                      "vehicles": 1,
                      "pedestrians": 0,
                      "drunk_drivers": 1,
                      "weather": "Clear",
                      "light_condition": "Dark - Lighted",
                      "route_type": "Municipal",
                      "trafficway": "MU-SUBLETT RD",
                      "harmful_event": "Curb",
                      "collision_manner": "The First Harmful Event was Not a Collision with a Motor Vehicle in Transport",
                      "rural_urban": "Urban",
                      "road_function": "Other Principal Arterial",
                      "intersection_type": "Not an Intersection",
                      "work_zone": "None",
                      "school_bus_involved": false
                    },
                    {
                      "year": 2023,
                      "st_case": 483880,
                      "state": "Texas",
                      "county": "Harris",
                      "city": null,
                      "date": "2023-12-31",
                      "day_of_week": "Sunday",
                      "time": "20:47",
                      "latitude": 29.804853,
                      "longitude": -95.381953,
                      "fatalities": 1,
                      "persons": 4,
                      "vehicles": 2,
                      "pedestrians": 0,
                      "drunk_drivers": 1,
                      "weather": "Clear",
                      "light_condition": "Dark - Lighted",
                      "route_type": "County",
                      "trafficway": "CR-AIRLINE DR",
                      "harmful_event": "Curb",
                      "collision_manner": "The First Harmful Event was Not a Collision with a Motor Vehicle in Transport",
                      "rural_urban": "Urban",
                      "road_function": "Minor Arterial",
                      "intersection_type": "Not an Intersection",
                      "work_zone": "None",
                      "school_bus_involved": false
                    },
                    {
                      "year": 2023,
                      "st_case": 483924,
                      "state": "Texas",
                      "county": "Dallas",
                      "city": "Dallas",
                      "date": "2023-12-31",
                      "day_of_week": "Sunday",
                      "time": "17:53",
                      "latitude": 32.706622,
                      "longitude": -96.828225,
                      "fatalities": 1,
                      "persons": 1,
                      "vehicles": 1,
                      "pedestrians": 0,
                      "drunk_drivers": 1,
                      "weather": "Cloudy",
                      "light_condition": "Dark - Lighted",
                      "route_type": "Interstate",
                      "trafficway": "I-35 E",
                      "harmful_event": "Concrete Traffic Barrier",
                      "collision_manner": "The First Harmful Event was Not a Collision with a Motor Vehicle in Transport",
                      "rural_urban": "Urban",
                      "road_function": "Interstate",
                      "intersection_type": "Not an Intersection",
                      "work_zone": "None",
                      "school_bus_involved": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}