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.1.tar.gz (87.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.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fbi_data_api-1.0.1.tar.gz
  • Upload date:
  • Size: 87.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.1.tar.gz
Algorithm Hash digest
SHA256 e536300a3fd1e6413c17812daebd2b558813cd11e74cf54e05f940b3ace68dd0
MD5 2a68881c21485c603c93b075d910456e
BLAKE2b-256 d74b5942a3c02707bae1f8b58b31abe6bfbf5e90d1bd6449b41d494ccc8d300d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fbi_data_api-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 80b1b80241d5f1a54bb40e3fc80c1ce6782f14ed70cb84a09561292d3f7c0be7
MD5 5617c55e7bf0cba711ec9bbf7879b9d2
BLAKE2b-256 2aa10a6daad56feecac15066114d895cdca5bfd913adfe578745ca19e4ebbe59

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