Skip to main content

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)

metadata = api.get_metadata(state_abbr = "all") 

agency_metrics = api.get_agency_metrics(ori = "NY0303000", year = 2024)

crime_statistics = api.get_crime_statistics(ori = "NY0303000", year = 2024, offense = "Violent Crimes")

To see fbi-data-api in action, go to the repo's examples directory:

https://github.com/teddythepooh/fbi_api/tree/main/examples

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

fbi_data_api-1.0.0.tar.gz (57.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fbi_data_api-1.0.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file fbi_data_api-1.0.0.tar.gz.

File metadata

  • Download URL: fbi_data_api-1.0.0.tar.gz
  • Upload date:
  • Size: 57.9 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

Hashes for fbi_data_api-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f028a7a80294e267b42e93dab76505882c7e61c5e044a5c604e0082ea65d2467
MD5 bd735761215dfb3d7f262aeb80ead08c
BLAKE2b-256 8942362a9a6a5761cc759eb180d145db4b2373bfb384b241cfbd51c97948c991

See more details on using hashes here.

File details

Details for the file fbi_data_api-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: fbi_data_api-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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

Hashes for fbi_data_api-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39f33c10003edb050d30a09feaf0e10290299715a0c2b0d61057643c2891cfa9
MD5 aa54653103381b42b471c9239682a7a3
BLAKE2b-256 8aea318d32a3f074c21e8c086e79f8d5d18e4a3dc473d610b9287b1658c79970

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page