# NPI Provider Scraper (`moving_beacon-owner1/npi-provider-scraper`) Actor

Scrapes the US NPPES NPI Registry for healthcare provider names, NPIs, credentials, specialties, taxonomy codes, state licenses, practice and mailing addresses, phone and fax numbers, and update dates, with filters for specialty, location, and provider name.

- **URL**: https://apify.com/moving_beacon-owner1/npi-provider-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 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/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

## NPI Provider Scraper

Looks up licensed US healthcare providers in the NPPES NPI Registry — the
national provider directory published as open data by the Centers for Medicare
& Medicaid Services. Search by specialty, location and name, and get back one
flat row per provider: NPI number, name and credential, specialties, state
licence, practice and mailing address, phone and fax, and when the record was
last updated. Covers both individual clinicians and healthcare organizations
such as hospitals, clinics, labs and pharmacies. No account or API key needed.

### Input

| Field | Default | Description |
| --- | --- | --- |
| `specialty` | `Dermatologist` | Specialty to search for. Everyday names work (`Dermatologist`, `Cardiologist`, `Pediatrician`) and are mapped to the registry's own wording; registry terms such as `Family Medicine` or `General Acute Care Hospital` work too. Leave empty to search by name and location only. |
| `location` | `Austin, TX` | `City, ST`, a state name or code, or a 5-digit ZIP. Matched against each provider's primary practice address. Leave empty for a nationwide search. |
| `last_name` | *(empty)* | Optional last name, or organization name when `provider_type` is `organization`. A trailing `*` acts as a wildcard. |
| `provider_type` | `individual` | `individual` (clinicians), `organization` (facilities) or `both`. |
| `max_results` | `20` | Maximum rows to return, up to 1200 per search. |
| `proxyConfiguration` | Apify proxy | Optional. The registry answers directly, so a proxy is only needed if you want requests routed through one. |

At least one of `specialty`, a city or ZIP in `location`, or `last_name` must be
given — a state on its own is too broad for the registry to answer.

### Output

```json
{
  "npi": "1245421429",
  "provider_type": "Individual",
  "name": "AMMAR MOIN AHMED",
  "first_name": "AMMAR",
  "middle_name": "MOIN",
  "last_name": "AHMED",
  "credential": "MD",
  "name_prefix": "Dr.",
  "gender": "M",
  "organization_name": "",
  "specialty": "Dermatology",
  "taxonomy_code": "207N00000X",
  "taxonomy_group": "",
  "all_specialties": ["Internal Medicine, Adolescent Medicine", "Dermatology"],
  "license_number": "N4239",
  "license_state": "TX",
  "phone": "512-324-9650",
  "fax": "512-324-9653",
  "street_address": "313 E 12TH ST",
  "address_line_2": "SUITE 101",
  "city": "AUSTIN",
  "state": "TX",
  "zip_code": "78701",
  "zip_code_full": "78701-1954",
  "country": "United States",
  "full_address": "313 E 12TH ST SUITE 101, AUSTIN, TX 78701-1954",
  "mailing_street_address": "1601 RIO GRANDE ST",
  "mailing_city": "AUSTIN",
  "mailing_state": "TX",
  "mailing_zip_code": "78701",
  "sole_proprietor": "NO",
  "authorized_official": "",
  "authorized_official_title": "",
  "other_names": [],
  "status": "Active",
  "enumeration_date": "2007-08-05",
  "last_updated": "2013-01-10",
  "profile_url": "https://npiregistry.cms.hhs.gov/provider-view/1245421429",
  "raw": { "…": "the untouched registry record" }
}
```

Every row also carries a `raw` field with the registry's own record, so nothing
is lost.

### Notes

- Source: the NPPES NPI Registry public search service operated by the Centers
  for Medicare & Medicaid Services. This is US government open data and is free
  to use; no key, account or sign-in is involved.
- Organization rows fill `organization_name`, `authorized_official` and the
  address fields; the person-name and gender fields stay empty. Individual rows
  are the other way round.
- The registry returns a maximum of 1200 records for any single search. To
  collect more, split the work by city, ZIP or specialty and run the actor once
  per slice.
- Records reflect what each provider last filed with CMS. `last_updated` shows
  how current a row is, and `status` flags deactivated NPIs.
- Requests are paced about half a second apart to stay well inside the
  registry's fair-use expectations.

# Actor input Schema

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

Provider specialty to search for. Everyday names are accepted and mapped to the registry's own taxonomy wording ('Dermatologist' becomes 'Dermatology', 'Cardiologist' becomes 'Cardiovascular Disease'); registry taxonomy descriptions such as 'Family Medicine', 'Nurse Practitioner' or 'General Acute Care Hospital' also work. Leave empty to search by name and location only.

## `location` (type: `string`):

US location to search: 'City, ST' (e.g. 'Austin, TX'), a state name or code, or a 5-digit ZIP code. Matched against each provider's primary practice address. Leave empty for a nationwide search by specialty or name.

## `last_name` (type: `string`):

Optional. Last name for individual providers, or organization name when provider type is set to organizations. A trailing '*' works as a wildcard (e.g. 'Smith*').

## `provider_type` (type: `string`):

Whether to return individual clinicians, healthcare organizations and facilities, or both.

## `max_results` (type: `integer`):

Maximum number of provider records to return. The registry serves at most 1200 records per search, so narrow the specialty or location to go deeper.

## `proxyConfiguration` (type: `object`):

Proxy settings for the run. Optional — the registry answers directly from anywhere, so a proxy is only needed if you want requests routed through one.

## Actor input object example

```json
{
  "specialty": "Dermatologist",
  "location": "Austin, TX",
  "last_name": "",
  "provider_type": "individual",
  "max_results": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "specialty": "Dermatologist",
    "location": "Austin, TX",
    "last_name": "",
    "provider_type": "individual",
    "max_results": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/npi-provider-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 = {
    "specialty": "Dermatologist",
    "location": "Austin, TX",
    "last_name": "",
    "provider_type": "individual",
    "max_results": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/npi-provider-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 '{
  "specialty": "Dermatologist",
  "location": "Austin, TX",
  "last_name": "",
  "provider_type": "individual",
  "max_results": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call moving_beacon-owner1/npi-provider-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/npi-provider-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/OF3sl8VDoTMhLhqI8/builds/1LilTpEI8ES831L8m/openapi.json
