Download the full NPI data dissemination file from https://download.cms.gov/nppes/NPI_Files.html — the full monthly file and weekly incremental update files are available as zipped CSVs.
Parse the primary CSV (npidata_pfile_YYYYMMDD-YYYYMMDD.csv); key columns include NPI, Entity_Type_Code (1=individual, 2=organization), Provider_Last_Name, Provider_Organization_Name, and NPI_Deactivation_Date.
Load the file into a staging table in your database using a bulk import tool; the full file contains millions of rows and requires streaming or chunked reads rather than loading into memory.
Process the weekly incremental files (available each week) to apply additions, updates, and deactivations without re-ingesting the full monthly dump.
Join on taxonomy columns (Healthcare_Provider_Taxonomy_Code_1 through _15) to filter by provider type and identify primary taxonomy via the Primary_Taxonomy_Switch columns.
Flag rows where NPI_Deactivation_Date is populated and NPI_Reactivation_Date is blank — these represent permanently deactivated NPIs to exclude from active directories.
Known gotchas
The full dissemination file uses the Version 2 format (effective March 2026) with extended character limits for first and legal business name fields; parsers built against Version 1 field widths will truncate data.
Taxonomy codes are spread across up to 15 columns per NPI row — do not assume column 1 is the active or primary taxonomy; check the corresponding Primary_Taxonomy_Switch column.
The dissemination file includes deactivated NPIs; failing to filter on NPI_Deactivation_Date will result in including non-active providers in directories and eligibility workflows.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp