# Open Payments: Doctor and Pharma Payments Scraper (`parselab/cms-open-payments-scraper`) Actor

Search CMS Open Payments (Sunshine Act): payments from drug and device makers to doctors and teaching hospitals since 2019. Filter by doctor, NPI, state, specialty, company, product and payment type. Totals per doctor, company rankings and specialty medians. Export to CSV or Excel.

- **URL**: https://apify.com/parselab/cms-open-payments-scraper.md
- **Developed by:** [ParseLab](https://apify.com/parselab) (community)
- **Categories:** Other, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Open Payments Scraper: Pharma and Device Payments to Doctors and Hospitals

This scraper reads CMS Open Payments, the federal Sunshine Act database that lists every payment drug and medical device companies make to doctors, other practitioners and teaching hospitals. Search payments by doctor, NPI number, state, specialty, company, product or payment type, then export clean rows to CSV or Excel. Program years 2019 to 2025 are covered.

The main difference from other Open Payments tools is that the numbers arrive ready to use. Besides single payments you get totals per doctor and year with the specialty median next to them, a ranking of the paying companies, totals per teaching hospital, and benchmarks per specialty and state. A payment row lists every related drug or device with its therapeutic area, and doctor rows are already parsed into specialty group, specialty and sub specialty.

Journalists, compliance teams, medical sales groups, pharma analysts and researchers use it to see who pays whom and how much.

### What can you find in Open Payments data?

- **Individual payments**: date, amount, form of payment, nature of payment (food and beverage, consulting fee, speaker fee, travel, education, royalty, grant, gift and more), paying company, related products and the full recipient profile with address, license states and NPI.
- **Doctor totals per year**: general payments, research payments, ownership and investment interests, number of transactions, average payment size and how many times the specialty median the doctor received.
- **Company totals and ranking**: general and research dollars per company and year, share of research versus general spending, transactions to doctors, other practitioners and teaching hospitals.
- **Teaching hospital totals**: general and research payments per hospital with address and CMS certification number.
- **Specialty benchmarks**: number of doctors paid, total, mean and median amounts per specialty and year.
- **State benchmarks**: totals, means and medians per state and year.

### How to search who pays a doctor

1. Choose **Individual payments** or **Doctor totals per year**.
2. Enter the years, then a last name, a first name or one or more NPI numbers.
3. Add a state, a specialty or a company to narrow the list.
4. Run it and download the table.

Names are matched exactly in capital letters, so Smith finds SMITH. Company names, specialties and product names match any part of the text.

### Input example

```
{
    "mode": "payments",
    "years": ["2024"],
    "companies": ["Pfizer"],
    "states": ["NY"],
    "natureOfPayment": ["Consulting Fee"],
    "maxItems": 200
}
```

### Output example

A payment row from 2024 (name shortened for this example):

```
{
    "recordId": 1132014080,
    "programYear": 2024,
    "paymentDate": "2024-07-25",
    "amount": 1110,
    "formOfPayment": "Cash or cash equivalent",
    "natureOfPayment": "Consulting Fee",
    "recipientType": "Covered Recipient Non-Physician Practitioner",
    "npi": "1851720551",
    "specialtyGroup": "Physician Assistants & Advanced Practice Nursing Providers",
    "specialty": "Nurse Practitioner",
    "city": "New York",
    "state": "NY",
    "companyName": "PFIZER INC.",
    "isConsultingOrSpeaker": true,
    "disputed": false,
    "products": []
}
```

A doctor total row for a family medicine doctor in North Carolina shows 161.66 dollars in 10 payments, which is 1.31 times the specialty median of 123.67 dollars. In the company ranking for 2024 the first company has 676 million dollars of mostly research spending, with a general payment share of 2.9 percent.

### Why use this scraper?

- **Six views** of the same database in one place, from single payments to state benchmarks.
- **Specialty medians** next to every doctor total, so a high number is easy to put in context.
- **Numbers are numbers.** Amounts, counts and dates are real numeric and date values, not text.
- **Products as a list**, with drug or device type, therapeutic area, NDC code and device identifier.
- **Derived flags** for food and beverage, consulting or speaker payments, disputed records, delayed publication and third party payments.
- **Several years in one run**, and several companies in one run.

### Who uses Open Payments data?

- Reporters who follow money between industry and medicine.
- Hospital and health system compliance teams checking disclosures.
- Pharma and device market researchers who study competitor spending by specialty and region.
- Medical sales teams looking for the doctors who work with a given product category.
- Academics who study conflicts of interest.

### Frequently asked questions

**Does a payment mean a doctor did something wrong?**
No. Open Payments is a disclosure program. A meal, a consulting fee and a research grant all appear in the same database.

**How current is the data?**
CMS publishes the previous calendar year each June. Program year 2025 is included now.

**Why does a search take a while?**
The source holds several million payments per year. Searches with an NPI, a last name or a company are fast. Broad searches with only a state take longer.

**Why do I get only 10 rows?**
Free runs return up to 10 rows as a preview. Paid plans return up to one million rows.

**Can I get research payments and ownership interests?**
Doctor totals include research payments and ownership or investment amounts. Company and hospital totals include them as well.

**Is the doctor's name spelled in capital letters?**
Names come in capital letters from the source. This scraper converts them to normal capitalization in the output.

### Data source and limits

Data comes from the Centers for Medicare and Medicaid Services Open Payments program and is public. Detailed payment records are the general payment files. Research and ownership records are included in the totals but not listed one by one. Amounts are as reported by the companies and may be disputed or revised later. Medical specialties come from the profile of the doctor in the year of the payment.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000.

## `mode` (type: `string`):

Individual payments gives one row per payment. Doctor totals gives one row per doctor and year with all payment types added up and compared with the specialty median. Company totals ranks the drug and device makers. Teaching hospitals, specialty benchmarks and state benchmarks give the matching summaries.

## `years` (type: `array`):

Years to read, from 2019 to 2025. Leave the prefilled value for the year 2024.

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

Exact last name of the doctor, for example Smith. Used in individual payments and doctor totals.

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

Exact first name of the doctor.

## `npis` (type: `array`):

National Provider Identifier numbers of doctors to look up, for example 1528271848.

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

Two letter state codes of the doctor's practice, for example NY, CA, TX. For company totals this is the state of the company.

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

Part of the specialty name, for example Cardiology, Orthopaedic or Family Medicine.

## `companies` (type: `array`):

Part of the name of the paying company, for example Pfizer, Medtronic or Eli Lilly. Each name is searched on its own.

## `natureOfPayment` (type: `array`):

Exact payment type names such as Food and Beverage, Consulting Fee, Travel and Lodging, Royalty or License, Honoraria, Education, Grant or Gift.

## `productName` (type: `string`):

Part of the drug or device name linked to the payment, for example Humira or Ozempic.

## `recipientType` (type: `string`):

Doctors, other practitioners such as nurse practitioners, or teaching hospitals.

## `minAmount` (type: `number`):

Skip payments or totals below this amount. With individual payments the filter is applied after reading, so large searches take longer.

## `teachingHospitalName` (type: `string`):

Part of a teaching hospital name, for example Mayo or Johns Hopkins.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "payments",
  "years": [
    "2024"
  ],
  "recipientType": "all"
}
```

# Actor output Schema

## `overview` (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 = {
    "maxItems": 10,
    "years": [
        "2024"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("parselab/cms-open-payments-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 = {
    "maxItems": 10,
    "years": ["2024"],
}

# Run the Actor and wait for it to finish
run = client.actor("parselab/cms-open-payments-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 '{
  "maxItems": 10,
  "years": [
    "2024"
  ]
}' |
apify call parselab/cms-open-payments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parselab/cms-open-payments-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/dqIxBvdlsuYct73iX/builds/lcl5HpdstBFycQvO7/openapi.json
