publicsafetyapi-sdk
Python SDK for publicsafetyapi.dev — the developer API for US public safety facility data.
Every police station, fire station, hospital, and EMS location in the United States — sourced from HIFLD (DHS/CISA) and CMS federal datasets — in a single clean REST API.
Installation
pip install publicsafetyapi-sdk
Quick Start
from publicsafetyapi import PublicSafetyAPI
client = PublicSafetyAPI(api_key="psk_live_...")
# Find the 5 nearest fire stations to any US address
stations = client.stations.nearby(
address="12865 Main St, Apple Valley, CA",
type="fire",
radius_miles=10
)
for s in stations:
print(f"{s.name} — {s.distance_miles:.1f} mi")
# Which police department has jurisdiction over an address?
result = client.jurisdiction(
address="12865 Main St, Apple Valley, CA",
type="police"
)
print(result.likely_agencies[0].name) # "Apple Valley Police Department"
# Look up any facility by ID
hospital = client.stations.get("hospital-hifld-112233")
print(hospital.trauma_level) # "Level II"
print(hospital.beds) # 212
print(hospital.cms_ccn) # "050317"
What's Covered
| Entity Type | Source | Records |
|---|---|---|
| Police stations | HIFLD (DHS/CISA) | 68,000+ |
| Fire stations | HIFLD (DHS/CISA) | 55,000+ |
| EMS stations | HIFLD (DHS/CISA) | 10,000+ |
| Hospitals | HIFLD + CMS | 7,500+ |
API Key
Get a free API key (500 calls/month) at publicsafetyapi.dev.
Full SDK
The full SDK implementation ships with v0.2.0 alongside the API launch.
Sign up at publicsafetyapi.dev for early access.
Related
- districtapi-sdk — US school districts
- libraryapi-sdk — US public libraries
License
MIT
Release files for publicsafetyapi 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| publicsafetyapi-0.2.0.tar.gz | 7.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| publicsafetyapi-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.2 kB
Release files / publicsafetyapi-0.2.0.tar.gz
| Download URL | publicsafetyapi-0.2.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9cfe6870401110f9fece20134232b42dc463ac7799dc14b7ec06b7b6863a598
|
|
BLAKE2b-256 checksum How to use checksums |
f1640b0fc2ac113ce7d730ac03a58f753f585999943a55863f0ebc6281be89d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / publicsafetyapi-0.2.0-py3-none-any.whl
| Download URL | publicsafetyapi-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
133e002bfc29377a2284d29ea8f6918590f1703e209f41fa1e7aec8916b068cc
|
|
BLAKE2b-256 checksum How to use checksums |
23165b4241498a5e7320cf79e8b5805d28df00a0b12b3b917b8c51250f74255b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|