# Medicare Doctors Scraper (`normdata/medicare-doctors-scraper`) Actor

Search the official CMS Doctors and Clinicians dataset for US Medicare providers by specialty, state, city, ZIP, name or credential. Combine every practice location into one row per provider, capture every secondary specialty, and track individual and group Medicare assignment separately.

- **URL**: https://apify.com/normdata/medicare-doctors-scraper.md
- **Developed by:** [Norm Data](https://apify.com/normdata) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $17.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

![Norm Data](https://i.ibb.co/rGbhM5Y8/Chat-GPT-Image-Sep-8-2026-02-20-50-PM.png)

## 🩺 Medicare Doctors & Clinicians Scraper

Search the official CMS **Doctors and Clinicians** dataset (the National Downloadable File) for
US Medicare providers, with no login and no key of your own to manage. Filter by specialty,
state, city, ZIP, name, credential or medical school, or look up exact providers by NPI, and get
back the full practice profile: credential, medical school, specialty, group practice, address,
phone and Medicare assignment status.

### 🎯 Who uses it?

#### 🏥 Healthcare credentialing and network teams

Verify a provider's specialty, credential and medical school, and confirm which of their group
affiliations actually accept Medicare assignment.

#### 📇 Healthcare sales and lead generation

Build targeted lists of clinicians by specialty and location, with phone and practice details
ready for outreach.

#### 🔬 Health services researchers

Study provider distribution, specialty mix and group affiliation patterns across states, cities
or medical schools.

#### 💼 Payers and referral networks

Find in-network-eligible providers by specialty and location, filtered to those actually
accepting Medicare assignment.

### ✨ What it does

- **Search** by specialty, state, city, ZIP, last/first name, credential, medical school or group
  name, any combination.
- **Look up exact providers** by their 10-digit NPI.
- **One row per provider**: turn on provider-level grouping to collapse every practice location a
  clinician has into a single record, instead of one line per enrollment.
- **Medicare assignment, tracked separately**: a provider's own assignment status and their
  group's status are reported independently, since they can differ.
- **Graduation-year range**: filter to clinicians who graduated between two years, not just after
  one.

Missing source values are returned as `null`, never invented.

### Why this scraper

- **One provider, one row, if you want it.** A clinician enrolled at several practices normally
  comes back as several separate lines; this can combine them into one record with every location
  nested underneath.
- **Every secondary specialty, not just the first.** The source can list several; all of them are
  captured.
- **Individual and group Medicare assignment, both exposed.** These are genuinely different
  statuses in the source data and are kept that way here.
- **A real graduation-year range**, not a one-sided cutoff.
- **CMS's own address key included**, so locations can be grouped or matched without parsing
  address text.

### How it compares

| Capability | This actor | Other CMS Doctors & Clinicians actors |
|---|:--:|:--:|
| Specialty, state, city, ZIP, name, credential, medical school, group filters | yes | yes |
| **One row per provider (all locations combined)** | **yes** | no |
| **All secondary specialties, not just one** | **yes** | not documented |
| **Individual vs group Medicare assignment tracked separately** | **yes** | single combined flag |
| Graduation-year range (both bounds) | yes | one-sided only |
| NPI lookup | yes | yes |

### 📦 What data you get

| Entity | Useful fields |
| --- | --- |
| Provider | NPI, name, credential, gender, medical school, graduation year, primary and all secondary specialties. |
| Enrollment | Individual PAC ID, enrollment ID, telehealth flag. |
| Practice location | Group name, group PAC ID, group size, full address, phone, individual and group Medicare assignment, CMS's own address ID. |
| Aggregated view | Every practice location for a provider, nested under one record, with a location count. |

Every record includes `observedAt` (UTC) and a link to the NPI registry entry. Download your
dataset from Apify as CSV, JSON, Excel, or XML.

### 💡 Use cases

#### 🏥 Every dermatologist in California

```json
{ "specialties": ["DERMATOLOGY"], "states": ["CA"], "maxProviders": 200 }
```

#### 📇 One row per provider, for a specialty and state

```json
{ "specialties": ["CARDIOLOGY"], "states": ["NY"], "aggregateByProvider": true, "maxProviders": 100 }
```

#### 🔎 Look up a specific provider

```json
{ "npiNumbers": ["1023570041"] }
```

### ⚙️ How the input is organised

**Maximum providers** sits at the very top, since it applies no matter what you're doing. Below
it, the form is split into three numbered sections:

| Section | What it's for |
| --- | --- |
| **1 · Look up specific providers** | NPI numbers, when you already know exactly who you want. |
| **2 · Or search by filters** | Specialty, location, name, credential, medical school, group and graduation-year filters. |
| **3 · Refine (optional)** | Phone-published, Medicare assignment, and the one-row-per-provider option. |

> **Apify Free plan:** every run is limited to a fixed 10-row sample. Upgrade your Apify plan to
> run your own settings.

### 🛡️ Limits & responsible use

This Actor reads only publicly available CMS provider data. It never signs in and never accesses
anything gated behind an account.

This is business and professional-credential data (a Medicare provider's practice information),
not personal patient data. Use it for legitimate business, research or credentialing purposes.

If a search matches nothing, the run writes a single row with an `error` field instead of failing
silently.

### 📧 Contact

Need a scraper for a different site, or found something wrong with this one? norm.data.scrapers@gmail.com

### Local development

```bash
bun install
bun test                # offline: normalization and input parsing, against real fixtures
bun run src/main.ts     # reads storage/key_value_stores/default/INPUT.json
```

# Changelog

This Actor's version history is a separate document: https://apify.com/normdata/medicare-doctors-scraper/changelog.md

# Actor input Schema

## `maxProviders` (type: `integer`):

Stop once this many rows are in the dataset. *(Free plan: always capped at 10.)*

## `npiNumbers` (type: `array`):

10-digit National Provider Identifiers. Takes priority over every filter below.

## `specialties` (type: `array`):

Matches any specialty containing this text, e.g. CARDIOLOGY also matches "CARDIOVASCULAR DISEASE (CARDIOLOGY)" and "INTERVENTIONAL CARDIOLOGY". Other examples: DERMATOLOGY, INTERNAL MEDICINE, NURSE PRACTITIONER.

## `states` (type: `array`):

2-letter US state codes, e.g. CA, NY, TX.

## `cities` (type: `array`):

Practice city, e.g. SAN FRANCISCO.

## `zipCodes` (type: `array`):

Practice ZIP code. A 5-digit ZIP matches every 9-digit ZIP+4 under it.

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

Keep only providers whose last name starts with this text.

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

Keep only providers whose first name starts with this text.

## `credentials` (type: `array`):

e.g. MD, DO, NP, PA.

## `medicalSchool` (type: `string`):

Keep only providers whose medical school name contains this text, e.g. HARVARD.

## `groupName` (type: `string`):

Keep only providers whose group or practice name contains this text.

## `graduatedFrom` (type: `integer`):

Keep only providers who graduated in or after this year.

## `graduatedTo` (type: `integer`):

Keep only providers who graduated in or before this year.

## `onlyWithPhone` (type: `boolean`):

Skip records with no published practice phone number.

## `onlyAcceptsIndividual` (type: `boolean`):

The provider's own personal Medicare assignment status.

## `onlyAcceptsGroup` (type: `boolean`):

The practice/group's Medicare assignment status, which can differ from the individual's.

## `aggregateByProvider` (type: `boolean`):

A provider enrolled at several practices normally appears as one line per enrollment/location. Turn this on to get one row per person instead, with every location nested underneath.

## Actor input object example

```json
{
  "maxProviders": 10,
  "npiNumbers": [],
  "specialties": [
    "DERMATOLOGY"
  ],
  "states": [
    "CA"
  ],
  "cities": [],
  "zipCodes": [],
  "credentials": []
}
```

# Actor output Schema

## `results` (type: `string`):

One dataset row per provider record.

# 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 = {
    "maxProviders": 10,
    "npiNumbers": [],
    "specialties": [
        "DERMATOLOGY"
    ],
    "states": [
        "CA"
    ],
    "cities": [],
    "zipCodes": [],
    "credentials": [],
    "onlyWithPhone": false,
    "onlyAcceptsIndividual": false,
    "onlyAcceptsGroup": false,
    "aggregateByProvider": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("normdata/medicare-doctors-scraper").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 = {
    "maxProviders": 10,
    "npiNumbers": [],
    "specialties": ["DERMATOLOGY"],
    "states": ["CA"],
    "cities": [],
    "zipCodes": [],
    "credentials": [],
    "onlyWithPhone": False,
    "onlyAcceptsIndividual": False,
    "onlyAcceptsGroup": False,
    "aggregateByProvider": False,
}

# Run the Actor and wait for it to finish
run = client.actor("normdata/medicare-doctors-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "maxProviders": 10,
  "npiNumbers": [],
  "specialties": [
    "DERMATOLOGY"
  ],
  "states": [
    "CA"
  ],
  "cities": [],
  "zipCodes": [],
  "credentials": [],
  "onlyWithPhone": false,
  "onlyAcceptsIndividual": false,
  "onlyAcceptsGroup": false,
  "aggregateByProvider": false
}' |
apify call normdata/medicare-doctors-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,normdata/medicare-doctors-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CrBSvrY0aLLRc8r7t/builds/ciBdHLUXhua2sh0VT/openapi.json
