# CMS PECOS Medicare Provider Enrollment Scraper API (`pink_comic/cms-pecos-medicare-provider-enrollment-screening`) Actor

Screen official CMS PECOS-derived Medicare enrollment evidence by NPI, provider, organization, state, or provider type. Merge active enrollment, PAC/enrollment IDs, order/referring authority, opt-out affidavits, revalidation, and revocation/re-enrollment-bar evidence.

- **URL**: https://apify.com/pink\_comic/cms-pecos-medicare-provider-enrollment-screening.md
- **Developed by:** [Ava Torres](https://apify.com/pink_comic) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## CMS PECOS Medicare Provider Enrollment Scraper API

Screen official CMS public Medicare provider-enrollment evidence populated from the Provider Enrollment, Chain, and Ownership System (PECOS). Search by exact NPI, provider or organization keyword, legal name, enrollment state, or CMS provider type.

Exact-NPI screening merges five official CMS evidence surfaces:

- active Medicare Fee-for-Service public provider enrollment
- PECOS Associate Control/PAC IDs and enrollment IDs
- ordering/referring authority for Part B, DME, home health, PMD, and hospice
- provider opt-out affidavits and current effective periods
- revalidation records, specialties, due dates, and reassignment counts
- published revocations, reasons, effective dates, and re-enrollment-bar expiration dates

Built for payer and provider credentialing, revenue-cycle and claims QA, healthcare compliance, network management, provider onboarding, sales research, Medicare enrollment verification, and public-record enrichment.

### Fast first run

Click **Start** with the default input:

```json
{
  "npi": "1003879883",
  "includeStatusChecks": true,
  "maxResults": 25
}
````

The deterministic example returns an active Medicare enrollment for Antonio Alvarez Rodriguez, its PAC/enrollment IDs, ordering/referring flags, and linked revalidation evidence.

### High-value searches

#### Exact NPI screening

```json
{
  "npi": "1003000126",
  "includeStatusChecks": true
}
```

An exact NPI takes precedence over other filters and always checks all five datasets. Multiple active enrollment rows are aggregated into one provider result with nested `enrollments`.

#### Organization search

Clear the default `npi`, then use a keyword:

```json
{
  "npi": "",
  "query": "MAYO CLINIC",
  "state": "MN",
  "includeStatusChecks": true,
  "maxResults": 25
}
```

`query` performs CMS full-text matching. `organizationName`, `firstName`, `lastName`, and `providerType` are exact filters.

#### Opt-out evidence by NPI

```json
{
  "npi": "1720444581"
}
```

If an NPI is absent from the active-enrollment extract but appears in a supplemental source, the actor returns `CMS_PECOS_STATUS_ONLY_FOUND` rather than an ambiguous no-match.

#### Revocation and re-enrollment-bar evidence

```json
{
  "npi": "1801839063"
}
```

Published revocation evidence includes every matched enrollment, CMS's stated authority/reason, effective date, re-enrollment-bar expiration date, and a retrieval-date `currentReenrollmentBar` calculation.

### Output

Each NPI result can include:

- active-enrollment indicator and count
- provider and organization names
- enrollment states and CMS provider types
- PECOS Associate Control/PAC IDs and enrollment IDs
- every underlying active enrollment row
- ordering/referring flags by service category
- opt-out affidavit periods, specialty, address, and current-period calculation
- revalidation enrollment type, specialty, due dates, and reassignment counts
- revocation reasons, dates, and current re-enrollment-bar evidence
- query count, retrieval time, official CMS links, refresh cadence, and interpretation caveats

No-match searches produce one explicit `NO_MATCHING_MEDICARE_ENROLLMENT_EVIDENCE` item. Temporary failure of the required active-enrollment source produces `SOURCE_UNAVAILABLE`. If a supplemental source fails while the primary source succeeds, the provider record remains usable and names the affected source in `supplementalSourceErrors`.

### Official sources and cadence

The actor uses CMS's public, no-key Data API and the stable `latest` dataset identifiers for:

1. [Medicare Fee-For-Service Public Provider Enrollment](https://data.cms.gov/provider-characteristics/medicare-provider-supplier-enrollment/medicare-fee-for-service-public-provider-enrollment)
2. [Order and Referring](https://data.cms.gov/provider-characteristics/medicare-provider-supplier-enrollment/order-and-referring)
3. [Opt Out Affidavits](https://data.cms.gov/tools/provider-opt-out-affidavits-look-up-tool)
4. [Revalidation Due Date List](https://data.cms.gov/provider-characteristics/medicare-provider-supplier-enrollment/revalidation-due-date-list)
5. [Revoked Medicare Providers and Suppliers](https://data.cms.gov/provider-characteristics/medicare-provider-supplier-enrollment/revoked-medicare-providers-and-suppliers)

The active-enrollment extract is a quarterly PECOS snapshot. Ordering/referring is refreshed frequently; opt-out and revalidation files are generally monthly; revocation data follows CMS publication updates.

### Important interpretation limits

- CMS says the public PECOS-derived files are not real-time reporting; PECOS changes from day to day while public files update on their own schedules.
- Appearing in the active public extract means the provider was actively approved to bill Medicare or had completed an 855O when CMS produced the snapshot. It is not a complete credential, license, sanction, quality, or claims-payment determination.
- A missing active record does not by itself prove that a provider is ineligible, terminated, revoked, or unable to furnish any Medicare service.
- Ordering/referring flags are service-category evidence from CMS's published list; use the relevant CMS rules and current records for claims decisions.
- Opt-out, revalidation, and revocation records have distinct meanings. Do not collapse one into another.
- Names can change and an NPI can have multiple enrollment rows. Exact NPI, PAC ID, and enrollment ID evidence is stronger than name-only matching.
- Verify consequential credentialing, payment, network, or compliance decisions with CMS, the relevant Medicare Administrative Contractor, and current underlying records.

### Pricing

This actor uses pay-per-event pricing. Check the live Apify Store pricing panel for current per-start and per-result rates.

# Actor input Schema

## `npi` (type: `string`):

Exact 10-digit National Provider Identifier. Exact NPI searches check all five CMS evidence datasets and take precedence over other filters.

## `query` (type: `string`):

Full-text search across the active public enrollment extract, such as MAYO CLINIC or a practitioner surname. Clear the default NPI before using this field.

## `firstName` (type: `string`):

Exact provider first name in the active enrollment extract. Clear the default NPI first.

## `lastName` (type: `string`):

Exact provider last name in the active enrollment extract. Clear the default NPI first.

## `organizationName` (type: `string`):

Exact organization name. Use query for partial/full-text matching. Clear the default NPI first.

## `state` (type: `string`):

Exact two-letter state or territory abbreviation for active enrollment searches.

## `providerType` (type: `string`):

Exact CMS provider type description, such as PRACTITIONER - INTERNAL MEDICINE.

## `includeStatusChecks` (type: `boolean`):

For each matched NPI, also check ordering/referring, opt-out, revalidation, and revocation datasets. Exact NPI searches always perform these checks.

## `maxResults` (type: `integer`):

Total aggregated provider/NPI results. One NPI can contain multiple enrollment records.

## Actor input object example

```json
{
  "npi": "1003879883",
  "includeStatusChecks": true,
  "maxResults": 25
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "npi": "1003879883",
    "includeStatusChecks": true,
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/cms-pecos-medicare-provider-enrollment-screening").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "npi": "1003879883",
    "includeStatusChecks": True,
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/cms-pecos-medicare-provider-enrollment-screening").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "npi": "1003879883",
  "includeStatusChecks": true,
  "maxResults": 25
}' |
apify call pink_comic/cms-pecos-medicare-provider-enrollment-screening --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pink_comic/cms-pecos-medicare-provider-enrollment-screening",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CMS PECOS Medicare Provider Enrollment Scraper API",
        "description": "Screen official CMS PECOS-derived Medicare enrollment evidence by NPI, provider, organization, state, or provider type. Merge active enrollment, PAC/enrollment IDs, order/referring authority, opt-out affidavits, revalidation, and revocation/re-enrollment-bar evidence.",
        "version": "0.1",
        "x-build-id": "2CwAwtmZVsxAxkEn3"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/pink_comic~cms-pecos-medicare-provider-enrollment-screening/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-pink_comic-cms-pecos-medicare-provider-enrollment-screening",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/pink_comic~cms-pecos-medicare-provider-enrollment-screening/runs": {
            "post": {
                "operationId": "runs-sync-pink_comic-cms-pecos-medicare-provider-enrollment-screening",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/pink_comic~cms-pecos-medicare-provider-enrollment-screening/run-sync": {
            "post": {
                "operationId": "run-sync-pink_comic-cms-pecos-medicare-provider-enrollment-screening",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "npi": {
                        "title": "Exact NPI",
                        "pattern": "^$|^[0-9]{10}$",
                        "type": "string",
                        "description": "Exact 10-digit National Provider Identifier. Exact NPI searches check all five CMS evidence datasets and take precedence over other filters.",
                        "default": "1003879883"
                    },
                    "query": {
                        "title": "Provider or Organization Keyword",
                        "minLength": 2,
                        "type": "string",
                        "description": "Full-text search across the active public enrollment extract, such as MAYO CLINIC or a practitioner surname. Clear the default NPI before using this field."
                    },
                    "firstName": {
                        "title": "Exact First Name",
                        "minLength": 2,
                        "type": "string",
                        "description": "Exact provider first name in the active enrollment extract. Clear the default NPI first."
                    },
                    "lastName": {
                        "title": "Exact Last Name",
                        "minLength": 2,
                        "type": "string",
                        "description": "Exact provider last name in the active enrollment extract. Clear the default NPI first."
                    },
                    "organizationName": {
                        "title": "Exact Legal Organization Name",
                        "minLength": 2,
                        "type": "string",
                        "description": "Exact organization name. Use query for partial/full-text matching. Clear the default NPI first."
                    },
                    "state": {
                        "title": "Enrollment State",
                        "pattern": "^[A-Za-z]{2}$",
                        "type": "string",
                        "description": "Exact two-letter state or territory abbreviation for active enrollment searches."
                    },
                    "providerType": {
                        "title": "Exact CMS Provider Type",
                        "minLength": 2,
                        "type": "string",
                        "description": "Exact CMS provider type description, such as PRACTITIONER - INTERNAL MEDICINE."
                    },
                    "includeStatusChecks": {
                        "title": "Merge Supplemental Status Evidence",
                        "type": "boolean",
                        "description": "For each matched NPI, also check ordering/referring, opt-out, revalidation, and revocation datasets. Exact NPI searches always perform these checks.",
                        "default": true
                    },
                    "maxResults": {
                        "title": "Maximum Providers",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Total aggregated provider/NPI results. One NPI can contain multiple enrollment records.",
                        "default": 25
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
