Interface for extracting data assets from the FBI Crime Data API.
Project description
FBI Crime Data API
This is a wrapper around the FBI Crime Data API, the first of its kind as of March 2026.
Example
After signing up for an API key in https://api.data.gov/signup/,
pip install fbi-data-api
from fbi_api import FBI
# If no api_key is passed, your environment variable FBI_API_KEY is automatically invoked.
api = FBI(api_key = your_api_key)
# See ./metadata_all.csv for expected result.
metadata = api.get_metadata(state_abbr = "all")
# ORI stands for Originating Agency Identifer (ORI), uniquely identifying the law enforcement
# agencies that report to the FBI. All ORIs in a state can be found in api.get_metadata().
crime_statistics = api.get_crime_statistics(ori = "NY0303000", year = 2024, offense = "Violent Crimes")
Alternatively, to see what get_crime_statistics() looks like for NYC, go to GitHub Actions. Under Actions -> NYC Crime Statistics, click any successful workflow then export the nyc artifact. This should download nyc.zip in your device.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fbi_data_api-0.4.0.tar.gz.
File metadata
- Download URL: fbi_data_api-0.4.0.tar.gz
- Upload date:
- Size: 416.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fafddf8ad6bbb4612d6884c1ccdcb2d0807a127bf4901b7e19985b937083a69f
|
|
| MD5 |
0403d5d6c72f27edbb719f790164c59a
|
|
| BLAKE2b-256 |
1e2234044577e5ce3b6709576dbfc406249746626513c2b4732b0e81a97d34e5
|
File details
Details for the file fbi_data_api-0.4.0-py3-none-any.whl.
File metadata
- Download URL: fbi_data_api-0.4.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8112abb0946b1c23be55a068fe5265af95c38dbc404d1541f13ef4c99695c16e
|
|
| MD5 |
9cf729c38246aefcca3ef6e6108bf4ce
|
|
| BLAKE2b-256 |
6ecc22d84995b75930d48a055850e2619ca41d016f524d1e1183f7dc5fb3b0ba
|