Provider Directory API — Sync NPI Data & Keep Directories Accurate
Provider directory inaccuracy is a persistent problem in healthcare. CMS audits routinely find that 30–50% of provider directory listings are inaccurate — wrong addresses, disconnected phone numbers, or providers who left the network. The No Surprises Act added a legal deadline: health plans must update directories within 2 business days of a provider change. The NPI Registry API is the data layer that makes automated directory sync practical — returning current NPI, taxonomy, address, and Medicare enrollment data in a single call per provider, sourced from weekly-updated NPPES data.
The provider directory accuracy problem
Provider directories go stale for three reasons:
- Providers move practices. Address and phone changes happen continuously. NPPES is the authoritative source — providers are required to update it within 30 days of a change. A weekly API sync captures these changes within a week of the NPPES update.
- Taxonomy and specialty changes. A provider adding or changing a specialty must update NPPES. Directories that do not sync miss these changes, leading to incorrect specialty listings that affect referral routing and patient search.
- Network status changes. Providers who leave a network or whose
Medicare enrollment lapses may continue to appear in directories if the directory
is not updated promptly. The
in_pecosflag provides a real-time signal for Medicare enrollment status.
What a directory sync pipeline needs
| Directory field | API source | Change frequency |
|---|---|---|
| Provider name | org_name or first_name + last_name | Rare |
| Primary specialty | taxonomy[0].taxonomy_desc | Occasional |
| NUCC taxonomy code | taxonomy[0].taxonomy_code | Occasional |
| Practice address | location[0].addr_fl, addr_city, addr_state, addr_post_cd | Frequent |
| Phone number | location[0].telephone | Frequent |
| Medicare enrolled? | entity_type[0].in_pecos | Moderate |
| Accepting Medicare? | medicare_enrlmt[0].provider_type_dec | Moderate |
| OIG excluded? | entity_type[0].in_leie | Rare (monthly OIG updates) |
Directory sync pipeline (Python)
This pipeline fetches current NPI data for each provider in your directory, compares it against the stored record, and writes a change report for your update workflow:
import time, requests, json
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://restapi.npidataservices.com/api/v1/findbyNPIId"
def fetch_current(npi):
r = requests.get(BASE_URL,
params={"NPIId": npi},
headers={"ApiKey": API_KEY},
timeout=5)
if not r.ok:
return None
d = r.json()
entity = (d.get("entity_type") or [{}])[0]
tax = (d.get("taxonomy") or [{}])[0]
loc = (d.get("location") or [{}])[0]
enrlmt = (d.get("medicare_enrlmt") or [{}])[0]
org = (d.get("organization") or [{}])[0]
ind = (d.get("individual") or [{}])[0]
return {
"name": org.get("org_name") or f"{ind.get('first_name','')} {ind.get('last_name','')}".strip(),
"taxonomy_code": tax.get("taxonomy_code", ""),
"taxonomy_desc": tax.get("taxonomy_desc", ""),
"city": loc.get("addr_city", ""),
"state": loc.get("addr_state", ""),
"zip": loc.get("addr_post_cd", ""),
"phone": loc.get("telephone", ""),
"in_pecos": entity.get("in_pecos", ""),
"in_leie": entity.get("in_leie", ""),
"provider_type": enrlmt.get("provider_type_dec", ""),
}
# Simulate stored directory records (replace with your database query)
directory = {
"1053500652": {
"name": "LEVEL HOME HEALTH INC.",
"city": "PASADENA", "state": "CA", "zip": "911012869",
"phone": "9492060691", "taxonomy_code": "251E00000X",
"in_pecos": "Y", "in_leie": "N"
}
}
changes = []
for npi, stored in directory.items():
current = fetch_current(npi)
if current is None:
changes.append({"npi": npi, "change": "NPI_NOT_FOUND"})
continue
diffs = {k: {"stored": stored.get(k), "current": current.get(k)}
for k in current if current.get(k) != stored.get(k)}
if diffs:
changes.append({"npi": npi, "diffs": diffs})
print(f"NPI {npi} changed: {json.dumps(diffs, indent=2)}")
time.sleep(0.1)
print(f"\n{len(changes)} provider(s) with changes out of {len(directory)} checked.")
How often to sync
Match your sync cadence to your compliance requirements and network change rate:
| Sync cadence | Trigger | Coverage |
|---|---|---|
| Weekly full-roster sweep | Scheduled job on NPPES update day | Catches all NPPES updates within one week. Baseline for most directories. |
| Event-triggered sync | Provider change notification, credentialing update, contract renewal | Near-real-time for known change events. Required by No Surprises Act within 2 business days. |
| Monthly exclusion sweep | Scheduled monthly | Catches new OIG LEIE exclusions for providers who were clean at last sync. Required for federal billing compliance. |
| Quarterly full audit | Scheduled quarterly | Compare all directory records against current NPI data; generate accuracy report for CMS audit response. |
CMS No Surprises Act and directory accuracy
The No Surprises Act (effective January 2022) requires health plans to:
- Update provider directory listings within 2 business days of receiving provider change notifications.
- Conduct periodic accuracy audits and attest to CMS that their directory meets accuracy standards.
- Remove providers who no longer participate in the network within 2 business days of termination.
An automated NPI sync pipeline that runs on both a weekly schedule and on change-notification triggers satisfies both the 2-business-day requirement and the underlying accuracy standard. The NPI Registry API returns the fields required to update all directory-relevant data elements in a single call.
Related guides
- Healthcare Provider Data API — full enrichment field reference for directory data
- NPI Bulk Lookup API — batch sync for large provider networks with quota planning
- NPPES API Pagination — enumerate providers by specialty or state for initial directory population
- Provider Credentialing Automation — credentialing pipeline that feeds initial directory records
- OIG Exclusion Screening API — monthly LEIE check to remove excluded providers from directories
- NPPES API vs NPI Registry API — why a single enriched API call beats the free NPPES API for directory sync
- Provider Verification API — verification workflow for individual provider changes detected in a directory sync
- Medicare Enrollment Verification — Medicare enrollment status is a required directory field for CMS-covered plans
- Provider Onboarding Automation — onboarding pipeline that populates initial directory records before the first directory sync
The NPI Registry API returns current NPI, taxonomy, address, PECOS enrollment, and LEIE exclusion status in a single call — the complete data set for a compliant directory sync pipeline. Start a free trial to test against your network.
Explore the API & start a free trial →Frequently asked questions
What is a provider directory API?
A REST service returning current NPI, taxonomy, address, and Medicare enrollment
data for healthcare providers — enabling health plans to keep directory listings
accurate without manual updates.
What does the CMS No Surprises Act require for provider directories?
Update within 2 business days of a provider change notification. Regular accuracy
audits and CMS attestation. Automated NPI sync via API satisfies both requirements
at scale.
How often should I sync NPI data to a provider directory?
Weekly sweeps plus event-triggered updates (within 2 business days per No Surprises Act).
Monthly exclusion screening and quarterly full audits complete the compliance posture.
What data changes most often in a provider directory?
Practice address and phone number change most frequently. Taxonomy changes are
less common but significant for specialty listings. A weekly API sync captures
all three change categories within one week of the NPPES update.