Usage examples for the AINPI audit of the CMS National Provider Directory.
Every example reads the canonical /api/v1/* contract served from ainpi.vercel.app. The contract is a static JSON shape documented in AINPI/frontend/src/lib/api-v1-types.ts; external consumers can rely on it.
| Path | What it shows |
|---|---|
python/fetch_stats.py |
10-line Python snippet that pulls /api/v1/stats.json and prints the site counters |
python/fetch_finding.py |
Pulls one finding's JSON and prints its headline + numerator/denominator |
duckdb/query_findings.sql |
DuckDB one-shot that reads all finding JSONs as a table and ranks by age |
notebooks/quickstart.ipynb |
Jupyter notebook walking through the same queries with plots |
git clone https://github.com/FHIR-IQ/ainpi-examples
cd ainpi-examples/python
pip install -r requirements.txt
python fetch_stats.pySee ainpi.vercel.app/methodology for how the numbers are computed. Every finding in /api/v1/findings/* carries methodology_version and commit_sha so you can pin against a specific release.
Apache-2.0 — same as the parent AINPI repo. Examples are contributor-friendly; PRs welcome.