Target the public NPPES NPI Registry API v2.1 at https://npiregistry.cms.hhs.gov/api/ — no API key or authentication is required.
Build a GET request with query parameters: number (10-digit NPI), enumeration_type (NPI-1 for individual, NPI-2 for organization), first_name, last_name, organization_name, or taxonomy_description to search.
Parse the JSON response: check result_count first; if zero, the NPI is not found or deactivated. Extract results[0].basic for name, status, and enumeration date.
Validate active status by checking results[0].basic.status equals 'A' (Active); values 'D' (Deactivated) or absent indicate an unusable NPI for claims.
Extract taxonomy codes from results[0].taxonomies array; the primary taxonomy has primary: true and supplies the NUCC code used in claims and directories.
Cache responses locally and refresh daily — the NPPES API reflects data updated daily from the NPPES system but has no bulk push mechanism.
Known gotchas
As of March 3, 2026, NPPES discontinued Version 1 of the downloadable files; ensure any bulk processing pipeline targets the Version 2 format with extended field lengths for names.
The API returns up to 200 results per request; use the skip parameter for pagination when searching by name rather than direct NPI lookup.
A deactivated NPI will still appear in search results with status 'D' — always check status explicitly rather than assuming presence in results means active enrollment.
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