PECOS API — Medicare Provider Enrollment Lookup
Developers building Medicare billing systems, credentialing platforms, or provider directories frequently need to check whether a provider is enrolled in Medicare and retrieve their PECOS identifiers programmatically. The short answer: CMS does not offer a public REST API for PECOS. This guide explains what PECOS data is, why you need it, and how to retrieve it via the NPI Registry API.
Is there a PECOS API?
The Provider Enrollment, Chain and Ownership System (PECOS) is CMS's Medicare provider enrollment database. It tracks which providers and organizations are enrolled to bill Medicare, under what enrollment IDs, and in which states.
CMS does not publish a public REST API for PECOS. The PECOS system itself is accessible only to enrolled providers and their authorized staff via the PECOS web portal. There is no documented public endpoint for querying enrollment status, PAC IDs, or enrollment IDs programmatically.
The NPI Registry API fills this gap: every findbyNPIId response includes
the provider's Medicare enrollment data — enrollment ID, PAC ID, provider type, and
state — sourced from the Medicare enrollment dataset, alongside the core NPPES
record. No separate PECOS portal access required.
What PECOS data the NPI Registry API returns
A single findbyNPIId call returns the following Medicare enrollment
fields for any enrolled provider:
- Enrollment ID (
enrlmt_id). The unique PECOS enrollment identifier for this provider's Medicare enrollment record. - PAC ID (
pac_id). The Provider Associate-level Control ID — a persistent identifier used to link a provider's enrollment records across multiple Medicare enrollments and claims. - Provider type (
provider_type_dec). The Medicare enrollment type, such as "Part A Provider — Home Health Agency" or "Physician — Internal Medicine." - State (
state_cd). The state associated with this enrollment record. - PECOS flag (
in_pecos). A simple Y/N flag confirming whether the provider has an active PECOS enrollment — useful for fast validation without parsing the full enrollment record.
PECOS lookup endpoints
The NPI Registry API exposes three endpoints that return PECOS enrollment data:
| Endpoint | Input | Use case |
|---|---|---|
GET /findbyNPIId |
NPI number | Full provider + PECOS record by NPI — the most common path for credential and billing validation |
GET /findbyPACId |
PECOS PAC ID | Look up a provider when you have their PAC ID but not their NPI |
GET /findbyPACENRLId |
PECOS enrollment ID | Look up a specific enrollment record by enrollment ID |
Which identifier to use: NPI, PAC ID, or enrollment ID
Most applications start with an NPI — it is the universal provider identifier. PAC IDs and enrollment IDs are PECOS-specific and only arise in narrower claims and payer-enrollment workflows:
| You have | Use | Returns | Typical use case |
|---|---|---|---|
| NPI number | findbyNPIId |
Full NPPES record + Medicare enrollment + PECOS + LEIE in one call | Credentialing, billing validation, directory enrichment — the most common path |
| PAC ID | findbyPACId |
Provider record linked to that PECOS enrollment profile | Claims resolution when NPI is unknown but a PAC ID appears in claims export data |
| Enrollment ID | findbyPACENRLId |
Provider record for a specific Medicare enrollment record | Payer enrollment audits and enrollment ID reconciliation across billing systems |
In almost all credentialing and billing validation workflows you start with the NPI —
findbyNPIId returns the PAC ID and enrollment ID inside the same response.
Use findbyPACId only when the NPI is unavailable but a PAC ID is present,
for example when reconciling identity from a raw claims file.
Example: check Medicare enrollment by NPI
curl -X GET 'https://restapi.npidataservices.com/api/v1/findbyNPIId?NPIId=1053500652' -H 'ApiKey: YOUR_API_KEY'
# Relevant fields in the response:
# "in_pecos": "Y"
# "medicare_enrlmt": [{
# "enrlmt_id": "O20080407000727",
# "pac_id": "4284711805",
# "provider_type_dec": "PART A PROVIDER - HOME HEALTH AGENCY",
# "state_cd": "CA"
# }]
Example: look up by PAC ID
curl -X GET 'https://restapi.npidataservices.com/api/v1/findbyPACId?PAC_ID=4284711805' -H 'ApiKey: YOUR_API_KEY'
Who needs PECOS data via API
- Revenue cycle and billing platforms. Validate that a billing NPI has an active PECOS enrollment before submitting Medicare claims — avoiding rejections from unenrolled or lapsed providers.
- Credentialing workflows. Confirm Medicare enrollment status as part of provider credentialing, without manual PECOS portal lookups for each provider.
- Provider directories. Surface Medicare enrollment status alongside NPI, specialty, and address — useful for patients searching for Medicare-participating providers.
- Payer enrollment teams. Use PAC IDs to reconcile provider identity across multiple enrollment records and detect duplicate or split enrollment profiles.
- Analytics and data enrichment. Enrich provider master data with PECOS enrollment type and state to support network analysis, utilization modeling, and risk stratification.
PECOS data vs. the NPPES API
The free NPPES API at npiregistry.cms.hhs.gov returns only core NPPES
fields — name, taxonomy, address. It does not return PECOS enrollment data, PAC IDs,
or enrollment IDs. To get PECOS data from the free government sources, you would
need to download and maintain a local copy of the Medicare enrollment dataset
published by CMS, which is a large static file updated periodically — not a live API.
The NPI Registry API returns PECOS data alongside the NPPES record in real time,
in a single REST call.
Related guides
- LEIE API — OIG exclusion screening via the same
findbyNPIIdcall that returns PECOS data - Provider Credentialing Automation — how PECOS enrollment fits into an automated NPI + PECOS + LEIE credentialing pipeline
- NPI Bulk Lookup API — batch PECOS enrollment validation across a provider roster
- NPPES API vs NPI Registry API — why the free NPPES API doesn't return PECOS enrollment data
- NPPES API Down? — production reliability for PECOS-dependent credentialing and billing workflows
- Medicare Enrollment Verification — pre-claim PECOS status check and batch enrollment validation for RCM teams
- Provider Verification API — combined NPI, PECOS, and LEIE verification in one workflow call
The NPI Registry API returns Medicare enrollment ID, PAC ID, provider type, and PECOS status alongside the core NPPES record — for any active NPI, in a single call. Start a free trial to test the response format.
Explore the API & start a free trial →Frequently asked questions
Is there a public PECOS API from CMS?
No. CMS does not offer a public REST API for PECOS. The NPI Registry API returns
Medicare enrollment data (enrollment ID, PAC ID, provider type) alongside NPI data
in a single call.
What is a PAC ID?
A PAC ID (Provider Associate-level Control ID) is a PECOS-assigned identifier that
links a provider's enrollment records across multiple Medicare enrollments. The NPI
Registry API returns it via findbyNPIId or findbyPACId.
How do I check if a provider is enrolled in Medicare via API?
Call findbyNPIId with the provider's NPI. The response includes
in_pecos: "Y" if enrolled, plus the full enrollment record.
No separate PECOS query needed.
Can I look up a provider by PAC ID?
Yes — use the findbyPACId endpoint. For lookup by enrollment ID, use
findbyPACENRLId. Both are included on all paid plans.
Does the NPPES API return PECOS data?
No. The free NPPES API at npiregistry.cms.hhs.gov returns only core
NPPES fields. PECOS enrollment data requires either the NPI Registry API or
downloading CMS's Medicare enrollment dataset locally. See the full
NPPES API vs NPI Registry API comparison.
What is the difference between PECOS and the NPI Registry?
The NPI Registry (NPPES) covers every licensed provider or organization that bills
healthcare — it is the universal provider identifier system. PECOS is CMS's separate
Medicare enrollment database. Every Medicare-enrolled provider has an NPI, but not
all NPI holders are enrolled in Medicare. The NPI Registry API returns both in one
call: core NPPES fields plus the in_pecos flag and full enrollment
record from PECOS.
What is a PECOS Enrollment ID?
A PECOS Enrollment ID (enrlmt_id) is the unique identifier for a
specific Medicare enrollment record. A provider can have multiple enrollment IDs
if they are enrolled in different capacities or states. The NPI Registry API
returns it via findbyNPIId, findbyPACId, and
findbyPACENRLId.
What does provider_type_dec mean in the PECOS response?
provider_type_dec is the human-readable description of the Medicare
enrollment category — for example, PART A PROVIDER - HOME HEALTH AGENCY
or PART B - PHYSICIAN. It reflects the CMS enrollment type, not the NPPES
taxonomy code, and appears in the medicare_enrlmt array of the
findbyNPIId response.