# CMS Doctors & Clinicians Scraper API - Provider Leads (`pink_comic/cms-doctors-clinicians-provider-leads`) Actor

Search the official CMS Doctors and Clinicians snapshot by NPI, provider name, specialty, geography, affiliation, graduation year, telehealth, and assignment indicators. Export source-linked Medicare provider-profile and public practice evidence.

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

## Pricing

from $2.00 / 1,000 cms doctors & clinicians scraper api - provider le evidence items

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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 Doctors & Clinicians Provider Leads Scraper API

Search CMS's official public Doctors and Clinicians snapshot by NPI, provider name, specialty, geography, affiliation, graduation year, telehealth, and assignment indicators. Export source-linked provider-profile and public-practice evidence.

### Fast default

```json
{"npi":"1235888272","maxCandidates":2,"maxResults":1}
````

The deterministic one-row first run costs at most **$0.0021** (`$0.0001` start + `$0.002` per item). `maxResults` is the total output cap; broad queries disclose the bounded `maxCandidates` scan.

```json
{"specialty":"CARDIOLOGY","state":"TX","affiliationOnly":true,"maxCandidates":500,"maxResults":25}
```

Results include NPI, PAC/enrollment identifiers, names, credentials, specialties, public practice location/telephone, facility and organization fields, telehealth/assignment indicators, retrieval time, official source links, and bound disclosure. Outcomes are explicit for no match, invalid input, and source unavailability.

### Evidence boundaries

CMS Doctors and Clinicians data is administrative/provider-profile snapshot evidence—not licensure, identity verification, employment confirmation, credentialing, board certification, sanctions clearance, live PECOS application state, claim-specific billing eligibility, a quality rating, or proof fields are current or complete. Blank fields do not prove absence. Confirm consequential decisions with the relevant authoritative source.

See the [official CMS dataset](https://data.cms.gov/provider-data/dataset/mj5m-pzi6).

# Actor input Schema

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

Exact 10-digit NPI. The deterministic default is 1235888272.

## `providerName` (type: `string`):

Case-insensitive provider name filter. The last token narrows the API query; the complete value is checked locally within the bounded candidates.

## `specialty` (type: `string`):

Case-insensitive CMS primary-specialty substring, such as CARDIOLOGY.

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

Exact two-letter state or territory code.

## `city` (type: `string`):

Exact CMS city/town value.

## `zipCode` (type: `string`):

Five- or nine-digit ZIP prefix/value.

## `affiliationOnly` (type: `boolean`):

Locally require a reported organization PAC ID or facility name. Blank does not prove no affiliation.

## `graduationYear` (type: `integer`):

Exact source-reported medical-school graduation year.

## `telehealth` (type: `string`):

Preserve and filter the source indicator without expanding its meaning.

## `individualAssignment` (type: `string`):

CMS individual assignment indicator (Y/N/M where present). It is not claim-specific eligibility.

## `groupAssignment` (type: `string`):

CMS group assignment indicator (Y/N/M where present).

## `offset` (type: `integer`):

Starting row offset for a bounded source scan.

## `maxCandidates` (type: `integer`):

Maximum API rows checked before local name/affiliation filtering and sorting. Output discloses when additional source rows exist.

## `sortBy` (type: `string`):

Optional sort by filter or result-control setting. See the README for source semantics and examples.

## `sortDirection` (type: `string`):

Optional sort direction filter or result-control setting. See the README for source semantics and examples.

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

Total output cap after all filtering and sorting. One record costs $0.002 plus the $0.0001 start.

## Actor input object example

```json
{
  "npi": "1235888272",
  "affiliationOnly": false,
  "telehealth": "",
  "individualAssignment": "",
  "groupAssignment": "",
  "offset": 0,
  "maxCandidates": 2,
  "sortBy": "providerName",
  "sortDirection": "asc",
  "maxResults": 1
}
```

# 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": "1235888272",
    "maxCandidates": 2,
    "maxResults": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/cms-doctors-clinicians-provider-leads").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": "1235888272",
    "maxCandidates": 2,
    "maxResults": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/cms-doctors-clinicians-provider-leads").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": "1235888272",
  "maxCandidates": 2,
  "maxResults": 1
}' |
apify call pink_comic/cms-doctors-clinicians-provider-leads --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CMS Doctors & Clinicians Scraper API - Provider Leads",
        "description": "Search the official CMS Doctors and Clinicians snapshot by NPI, provider name, specialty, geography, affiliation, graduation year, telehealth, and assignment indicators. Export source-linked Medicare provider-profile and public practice evidence.",
        "version": "0.1",
        "x-build-id": "VooIf9o6P3NuOQ23H"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/pink_comic~cms-doctors-clinicians-provider-leads/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-pink_comic-cms-doctors-clinicians-provider-leads",
                "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-doctors-clinicians-provider-leads/runs": {
            "post": {
                "operationId": "runs-sync-pink_comic-cms-doctors-clinicians-provider-leads",
                "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-doctors-clinicians-provider-leads/run-sync": {
            "post": {
                "operationId": "run-sync-pink_comic-cms-doctors-clinicians-provider-leads",
                "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 NPI. The deterministic default is 1235888272.",
                        "default": "1235888272"
                    },
                    "providerName": {
                        "title": "Provider or Person Name",
                        "type": "string",
                        "description": "Case-insensitive provider name filter. The last token narrows the API query; the complete value is checked locally within the bounded candidates."
                    },
                    "specialty": {
                        "title": "Primary Specialty",
                        "type": "string",
                        "description": "Case-insensitive CMS primary-specialty substring, such as CARDIOLOGY."
                    },
                    "state": {
                        "title": "State or Territory",
                        "pattern": "^$|^[A-Za-z]{2}$",
                        "type": "string",
                        "description": "Exact two-letter state or territory code."
                    },
                    "city": {
                        "title": "City",
                        "type": "string",
                        "description": "Exact CMS city/town value."
                    },
                    "zipCode": {
                        "title": "ZIP Code",
                        "pattern": "^$|^[0-9]{5}([0-9]{4})?$",
                        "type": "string",
                        "description": "Five- or nine-digit ZIP prefix/value."
                    },
                    "affiliationOnly": {
                        "title": "Require Group or Facility Affiliation",
                        "type": "boolean",
                        "description": "Locally require a reported organization PAC ID or facility name. Blank does not prove no affiliation.",
                        "default": false
                    },
                    "graduationYear": {
                        "title": "Graduation Year",
                        "minimum": 1800,
                        "type": "integer",
                        "description": "Exact source-reported medical-school graduation year."
                    },
                    "telehealth": {
                        "title": "Telehealth Indicator",
                        "enum": [
                            "",
                            "Y",
                            "N"
                        ],
                        "type": "string",
                        "description": "Preserve and filter the source indicator without expanding its meaning.",
                        "default": ""
                    },
                    "individualAssignment": {
                        "title": "Individual Assignment Indicator",
                        "enum": [
                            "",
                            "Y",
                            "N",
                            "M"
                        ],
                        "type": "string",
                        "description": "CMS individual assignment indicator (Y/N/M where present). It is not claim-specific eligibility.",
                        "default": ""
                    },
                    "groupAssignment": {
                        "title": "Group Assignment Indicator",
                        "enum": [
                            "",
                            "Y",
                            "N",
                            "M"
                        ],
                        "type": "string",
                        "description": "CMS group assignment indicator (Y/N/M where present).",
                        "default": ""
                    },
                    "offset": {
                        "title": "Source Offset",
                        "minimum": 0,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Starting row offset for a bounded source scan.",
                        "default": 0
                    },
                    "maxCandidates": {
                        "title": "Maximum Candidates Scanned",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum API rows checked before local name/affiliation filtering and sorting. Output discloses when additional source rows exist.",
                        "default": 2
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "providerName",
                            "specialty",
                            "state",
                            "graduationYear",
                            "npi"
                        ],
                        "type": "string",
                        "description": "Optional sort by filter or result-control setting. See the README for source semantics and examples.",
                        "default": "providerName"
                    },
                    "sortDirection": {
                        "title": "Sort Direction",
                        "enum": [
                            "asc",
                            "desc"
                        ],
                        "type": "string",
                        "description": "Optional sort direction filter or result-control setting. See the README for source semantics and examples.",
                        "default": "asc"
                    },
                    "maxResults": {
                        "title": "Maximum Provider Records",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Total output cap after all filtering and sorting. One record costs $0.002 plus the $0.0001 start.",
                        "default": 1
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
