NPI Data Services logo NPI Registry API
Data Enrichment Guide

Healthcare Provider Data API — NPI, Taxonomy, PECOS & LEIE in One Call

Updated June 9, 2026 · VBC Risk Analytics

Healthcare analytics platforms, SaaS products, and RCM tools often start with a list of NPIs and need to enrich them with taxonomy, address, Medicare enrollment, and exclusion status. Pulling this data from government sources means querying NPPES, the PECOS portal, and the OIG website separately and joining the results. The NPI Registry API returns all of these fields in a single REST call per provider, making provider data enrichment a straightforward pipeline: read your NPI list, call the API, write the enriched output.

Enrichment fields returned per provider

FieldAPI pathUse case
NPI numbernpiPrimary identifier for all downstream systems
Entity type (individual/org)entity_type_cdRoute to individual vs. organization subfields
Provider nameorganization.org_name or individual.first_name + last_nameDisplay name in directories and reports
Primary taxonomy codetaxonomy[0].taxonomy_codeSpecialty segmentation, network configuration, billing
Taxonomy descriptiontaxonomy[0].taxonomy_descHuman-readable specialty for directories and analytics
Practice addresslocation[0].addr_fl, addr_city, addr_state, addr_post_cdDirectory display, geographic analytics, geocoding
Phone numberlocation[0].telephoneDirectory contact, outreach, referral routing
Medicare enrollment (in_pecos)entity_type[0].in_pecosBilling eligibility validation, network credentialing
Enrollment IDmedicare_enrlmt[0].enrlmt_idPayer enrollment audits, PECOS record linkage
PAC IDmedicare_enrlmt[0].pac_idClaims when NPI unknown, provider profile linkage
Medicare provider typemedicare_enrlmt[0].provider_type_decBilling type routing, CMS program eligibility
OIG LEIE exclusion (in_leie)entity_type[0].in_leieCompliance screening, fraud risk flagging
NPI enumeration dateentity_type[0].enum_dateProvider tenure analysis, cohort segmentation

Provider data enrichment pipeline (Python)

This pipeline reads a CSV of NPIs, enriches each with API data, and writes a flat enriched CSV ready to load into your analytics database or product:

import time, csv, requests

API_KEY  = "YOUR_API_KEY"
BASE_URL = "https://restapi.npidataservices.com/api/v1/findbyNPIId"

FIELDS = [
    "npi", "name", "entity_type", "taxonomy_code", "taxonomy_desc",
    "city", "state", "zip", "phone",
    "in_pecos", "in_leie", "enrlmt_id", "pac_id", "provider_type", "enum_date"
]

def enrich_provider(npi):
    r = requests.get(BASE_URL,
                     params={"NPIId": npi},
                     headers={"ApiKey": API_KEY},
                     timeout=5)
    if r.status_code == 404:
        return {"npi": npi, **{k: "" for k in FIELDS if k != "npi"}}

    r.raise_for_status()
    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]

    name = org.get("org_name") or (
        f"{ind.get('first_name','')} {ind.get('last_name','')}".strip()
    )

    return {
        "npi":           npi,
        "name":          name,
        "entity_type":   d.get("entity_type_cd", ""),
        "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", ""),
        "enrlmt_id":     enrlmt.get("enrlmt_id", ""),
        "pac_id":        enrlmt.get("pac_id", ""),
        "provider_type": enrlmt.get("provider_type_dec", ""),
        "enum_date":     entity.get("enum_date", ""),
    }

# Read input NPI list
with open("npis.csv") as f:
    npis = [row["npi"] for row in csv.DictReader(f)]

# Enrich
enriched = []
for npi in npis:
    enriched.append(enrich_provider(npi))
    time.sleep(0.1)

# Write enriched output
with open("providers_enriched.csv", "w", newline="") as f:
    writer = csv.DictWriter(f, fieldnames=FIELDS)
    writer.writeheader()
    writer.writerows(enriched)

print(f"Enriched {len(enriched)} providers.")

Use cases by buyer type

BuyerWhat they enrichKey fields used
Provider directories & health plans Display data, specialty listing, location accuracy name, taxonomy_desc, city, state, phone
Revenue cycle management (RCM) Pre-claim billing validation, enrollment check in_pecos, enrlmt_id, pac_id, provider_type
Compliance & credentialing platforms Exclusion screening, PECOS enrollment verification in_leie, in_pecos, enrlmt_id
Clinical analytics & life sciences Specialty segmentation, geographic distribution, cohort analysis taxonomy_code, state, zip, enum_date
Healthcare SaaS & marketplaces Provider profile auto-fill, network search, referral routing All fields — NPI as primary key for dynamic enrichment
Health plan network management Network configuration, panel assignment, billing type routing taxonomy_code, in_pecos, provider_type, state

Enrichment at scale — throughput by plan

Provider list sizeAt 100ms/reqPlan needed
500 providers~1 minFree (1,000/mo)
5,000 providers~8 minStarter (12.5k/mo)
25,000 providers~42 minPro (125k/mo)
100,000 providers~2.8 hrsPro (125k/mo)
500,000+ providersCustom scheduleEnterprise

Run enrichment jobs nightly or weekly to keep your provider data current with weekly NPPES updates.

Why not build directly on the free NPPES API?

The free NPPES API at npiregistry.cms.hhs.gov returns NPI, taxonomy, and address — but not Medicare PECOS enrollment, PECOS enrollment ID, PAC ID, or OIG LEIE exclusion status. For a complete provider data enrichment pipeline, you would need to:

The NPI Registry API returns all fields in a single call with no data pipeline to maintain. See NPPES API vs NPI Registry API for the full comparison.

Related guides

Need to enrich a provider dataset?

The NPI Registry API returns 13 structured fields per provider — taxonomy, address, PECOS enrollment, and LEIE exclusion flag — in a single REST call. No government portals, no flat-file joins. Start a free trial to test against your provider list.

Explore the API & start a free trial →

Frequently asked questions

What is a healthcare provider data API?
A REST service that returns structured provider data — NPI, taxonomy, address, PECOS enrollment, and LEIE exclusion — in a single query, replacing manual government portal lookups or flat-file joins.

What fields does a provider data API return?
NPI, entity type, name, primary taxonomy code and description, all addresses and phone numbers, Medicare PECOS enrollment status, enrollment ID, PAC ID, Medicare provider type, OIG LEIE exclusion flag, and NPI enumeration date.

Can I use the API to enrich a CSV of provider records?
Yes — read a CSV of NPIs, call findbyNPIId for each with 100ms pacing, and write enriched output. At 100ms/req, 5,000 NPIs complete in ~8 minutes on the Starter plan.

What use cases does healthcare provider data enrichment support?
Provider directories, RCM claim pre-validation, compliance credentialing, clinical analytics, health plan network configuration, and healthcare SaaS product enrichment.

Written by Chin Ramamoorthi

CEO, NPI Data Services — a VBC Risk Analytics company — 20+ years in healthcare data, provider data management, and risk analytics.