Unofficial Python SDK for the NCMEC Poster API
Project description
ncmec-sdk
An unofficial Python SDK for the NCMEC Poster API — the National Center for Missing & Exploited Children.
NCMEC does not provide an official Python client. This SDK makes it easy to integrate missing children poster data into your Python applications.
Note: Access to the NCMEC Poster API requires credentials from NCMEC. This SDK is not affiliated with or endorsed by NCMEC.
Installation
pip install ncmec-sdk
Quick Start
from ncmec_sdk import NCMECClient
client = NCMECClient("your_client_id", "your_client_secret")
client.authenticate()
# Get a list of posters
posters = client.get_posters(limit=10)
for poster in posters:
print(poster.caseNumber, poster.children[0].firstName)
# Search by state
posters = client.get_posters(missing_state="TX")
# Get a specific poster
poster = client.get_poster("NCMC", "2077508")
# Get a photo
photo = client.get_poster_photo("NCMC", "2077508", "md5hashhere")
# Get organization logo
logo_bytes = client.get_organization_logo("NCMC")
with open("logo.png", "wb") as f:
f.write(logo_bytes)
Available Methods
| Method | Description |
|---|---|
authenticate() |
Authenticate and store token |
get_posters(**filters) |
Search paginated list of posters |
get_poster(org_code, case_number) |
Get a specific poster |
update_poster(org_code, case_number, poster) |
Update a poster |
delete_poster(org_code, case_number) |
Delete a poster |
get_poster_photo(org_code, case_number, md5) |
Get a photo by MD5 hash |
get_organization_logo(org_code) |
Get organization logo as bytes |
rotate_secret_key() |
Rotate your API secret |
Search Filters
get_posters() supports extensive filtering:
posters = client.get_posters(
# Pagination
skip=0,
limit=20,
# Child filters
child_first_name="John",
child_last_name="Doe",
# Location filters
missing_state="CA",
missing_city="Los Angeles",
found_state="TX",
# Date filters
missing_date_from="2024-01-01T00:00:00Z",
missing_date_to="2024-12-31T00:00:00Z",
# Sorting
sort_type="lastModified",
sort_order="desc",
)
Models
All responses are deserialized into typed dataclasses:
PosterChildCompanionPhotoContactLocationPosterDescription
License
MIT
Project details
Release history Release notifications | RSS feed
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 ncmec_sdk-0.1.1.tar.gz.
File metadata
- Download URL: ncmec_sdk-0.1.1.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c70f41e7a31d6eddd9354773308f276060903a6813004fdc1e55f04e8c794d6
|
|
| MD5 |
8aac47ded9521bca7c0edc46c9b73bae
|
|
| BLAKE2b-256 |
4f798cbdb79957f62015346ed9b3566f2b83dc18e5cc416dd5a7c141bea2de31
|
File details
Details for the file ncmec_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ncmec_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74efa9d1237379c822aae19585ea9a787378db42f1dbfe725094bde69e7bca55
|
|
| MD5 |
7da0a8ca0540d27cbfbd45ed7727e6f7
|
|
| BLAKE2b-256 |
30ee62425b88c5f76b638f4d9b9bce72e7259bebea1563ee979741de741e050e
|