# Open Payments Scraper: Sunshine Act Pharma Payments to Doctors (`best_celerytop/cms-open-payments-scraper`) Actor

CMS Open Payments (Sunshine Act) scraper: payments from drug and device companies to US physicians, nurse practitioners and hospitals. Filter by doctor name, NPI, state, specialty, company, product or payment type, 2019-2025. One row per payment: recipient, payer, amount, date. Official API.

- **URL**: https://apify.com/best_celerytop/cms-open-payments-scraper.md
- **Developed by:** [Konstantin Semin](https://apify.com/best_celerytop) (community)
- **Categories:** Business, Marketing, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 payment records

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

## CMS Open Payments Scraper: Pharma Payments to Doctors

Pull payment records from [CMS Open Payments](https://openpaymentsdata.cms.gov), the US federal database (Physician Payments Sunshine Act) of money and gifts that drug, biological and medical device companies give to physicians, nurse practitioners, physician assistants and teaching hospitals. Filter by recipient name, NPI, state, city, specialty, teaching hospital, paying company, product or nature of payment, for any program year from 2019 to 2025, and get one clean row per payment: recipient with specialty and address, paying company, amount, date, form and nature of payment, travel details, the drugs or devices the payment relates to, dispute status and the recipient's CMS profile link.

The Actor uses the official Open Payments datastore API. No login, no browser, no proxies, no API key.

### What you can do with it

- **Transparency and compliance analysis**: which companies pay physicians in a state or specialty, and for what (consulting, speaking, research), straight from the public Open Payments record.
- **Compliance and due diligence**: every payment a physician, practice or hospital received, by NPI or name, across years.
- **Journalism and research**: payments tied to a drug or device, top-paid specialties, a company's spending footprint.
- **Conflict-of-interest checks**: consulting fees, honoraria and speaker fees received by authors, speakers or advisors, as disclosed by the paying companies.
- **Patient transparency tools**: feed physician payment summaries into your own app.

### Input

| Field | Type | Description |
|---|---|---|
| `programYears` | array | Years to search, `2019` to `2025`. Default `["2024"]`. |
| `lastName`, `firstName` | string | Exact recipient names as registered with CMS. |
| `npis` | array | Recipient NPI numbers. |
| `states` | array | Recipient practice states, two-letter codes. |
| `city` | string | Part of the practice city. |
| `specialty` | string | Part of the primary specialty. |
| `teachingHospital` | string | Part of a teaching hospital name. |
| `manufacturer` | string | Part of the paying company's name. |
| `product` | string | Part of a related drug or device name. |
| `natureOfPayment` | string | Part of the nature of payment, for example `Consulting Fee`. |
| `minAmount` | integer | Skip payments below this amount. |
| `dateFrom`, `dateTo` | string | Payment date range, `YYYY-MM-DD`. |
| `maxItems` | integer | Maximum number of payments saved. Default `1000`. |

Name, NPI and state filters are exact; the other text filters match anywhere in the field, case-insensitively.

#### Example input

```json
{
    "programYears": ["2024", "2023"],
    "states": ["NY", "NJ"],
    "specialty": "Cardiovascular",
    "natureOfPayment": "Consulting Fee",
    "minAmount": 1000,
    "maxItems": 5000
}
```

### Output

One dataset item per payment record.

```json
{
    "recordId": "1114352831",
    "programYear": 2024,
    "recipientType": "Covered Recipient Physician",
    "recipientProfileId": "123456",
    "recipientNpi": "1234567890",
    "recipientFirstName": "JOHN",
    "recipientMiddleName": null,
    "recipientLastName": "SMITH",
    "recipientNameSuffix": null,
    "recipientName": "JOHN SMITH",
    "teachingHospital": null,
    "teachingHospitalCcn": null,
    "recipientAddress": "100 MAIN ST, STE 200",
    "recipientCity": "NEW YORK",
    "recipientState": "NY",
    "recipientZip": "10001",
    "recipientCountry": "United States",
    "recipientPrimaryTypes": ["Medical Doctor"],
    "recipientSpecialties": ["Allopathic & Osteopathic Physicians|Internal Medicine|Cardiovascular Disease"],
    "recipientLicenseStates": ["NY"],
    "recipientProfileUrl": "https://openpaymentsdata.cms.gov/physician/123456",
    "manufacturerId": "100000000123",
    "manufacturer": "PFIZER INC.",
    "manufacturerState": "NY",
    "manufacturerCountry": "United States",
    "submittingManufacturer": "PFIZER INC.",
    "amountUsd": 2500,
    "paymentDate": "2024-05-14",
    "paymentsIncluded": 1,
    "formOfPayment": "Cash or cash equivalent",
    "natureOfPayment": "Consulting Fee",
    "travelCity": null,
    "travelState": null,
    "travelCountry": null,
    "physicianOwnership": "No",
    "thirdPartyRecipient": "No",
    "thirdPartyName": null,
    "charity": "No",
    "contextualInformation": null,
    "disputeStatus": "No",
    "relatedProduct": "Yes",
    "products": [
        { "name": "ELIQUIS", "type": "Drug", "category": "Cardiovascular", "covered": "Covered", "ndc": "0003-0894-21", "pdi": null }
    ],
    "changeType": "UNCHANGED",
    "publicationDate": "2025-06-30",
    "scrapedAt": "2026-11-15T10:00:00.000Z"
}
```

Fields CMS does not report for a record are `null` or empty lists. Amounts are in US dollars.

A `RUN_SUMMARY` record in the key-value store lists the filters used, how many records were scanned and how many payments were saved per year.

### Good to know

- **Scale and speed.** The API returns 500 records per request; targeted filters (a name, NPI, state or company) return a few thousand rows per minute. A wide filter such as a big company alone covers hundreds of thousands of records, so set `maxItems` to what you need.
- **Order.** Records come in the dataset's own order, not by amount. Use `minAmount` and the date range to narrow, and `programYears` to pick years.
- **General payments only.** Research payments and ownership interests are separate Open Payments datasets and are not included.
- **Names** are stored in upper case by CMS; the Actor upper-cases the name filters for you.
- **Polite by design.** Requests go to the public API with a plain user agent and a pause between pages.
- **Price.** $1 per 1,000 payment records, no start fee; platform usage is included.
- **Works with n8n, Make, Zapier and AI agents.** The official Apify node for n8n runs this Actor and returns the rows inside a workflow, Make and Zapier use the Apify integration, and AI agents call it as a tool through the Apify MCP server.

### FAQ

**Can I get every payment a doctor received?**
Yes, give the NPI (most precise) or last and first name, and list all years in `programYears`.

**Why are there several rows for the same doctor and company on one day?**
CMS publishes each reported payment separately; `paymentsIncluded` tells how many payments one row aggregates.

**How do I find out how much a doctor received from pharmaceutical companies?**
Enter the doctor's last and first name or NPI and list the program years. Every payment comes back with the company, amount, date, nature of payment and related products.

**Is CMS Open Payments data free to use?**
Yes. Open Payments is public data published by CMS under the Sunshine Act. The Actor reads it through the official API.

**Can I export Open Payments data to Excel?**
Yes. The run's dataset downloads as Excel, CSV or JSON.

**Can I use it from n8n or an AI agent?**
Yes. Start it through the official Apify node for n8n, the Make or Zapier integration, or the Apify MCP server, and read the rows back from the dataset.

**Something is missing or broken?**
Open an issue on the Issues tab and include the input you used.

### Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by CMS or the US government. Open Payments data is public information published by CMS; check the source record before drawing conclusions about any person.

# Actor input Schema

## `programYears` (type: `array`):

Payment years to search, 2019 to 2025. Each year is a separate dataset.

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

Exact last name of the physician or practitioner as registered with CMS, for example `SMITH`.

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

Exact first name, for example `JOHN`.

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

National Provider Identifiers of the recipients, one per line.

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

Two-letter US state codes of the recipient's practice, one per line, for example `NY`, `CA`.

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

Part of the practice city, for example `Boston`.

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

Part of the recipient's primary specialty, for example `Cardiovascular`, `Orthopaedic`, `Dermatology`.

## `teachingHospital` (type: `string`):

Part of a teaching hospital name, for payments made to hospitals rather than individuals.

## `manufacturer` (type: `string`):

Part of the drug or device company's name, for example `Pfizer`, `Medtronic`, `AbbVie`.

## `product` (type: `string`):

Part of the drug, biological or device name the payment relates to, for example `Ozempic`, `Humira`.

## `natureOfPayment` (type: `string`):

For example `Consulting Fee`, `Speaker`, `Food and Beverage`, `Travel and Lodging`, `Honoraria`, `Royalty`, `Grant`, `Education`.

## `minAmount` (type: `integer`):

Skip payments below this amount. Applied while reading, so a high threshold scans more records per saved row.

## `dateFrom` (type: `string`):

Skip payments before this date, `YYYY-MM-DD`.

## `dateTo` (type: `string`):

Skip payments after this date, `YYYY-MM-DD`.

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

Maximum number of payment records saved in the run.

## Actor input object example

```json
{
  "programYears": [
    "2024"
  ],
  "states": [
    "NY"
  ],
  "natureOfPayment": "Consulting Fee",
  "maxItems": 100
}
```

# Actor output Schema

## `payments` (type: `string`):

Open Payments general payment records with recipient, paying company, amount, date, nature and related products.

## `runSummary` (type: `string`):

Filters used, records scanned and payments saved per program year.

# 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 = {
    "programYears": [
        "2024"
    ],
    "states": [
        "NY"
    ],
    "natureOfPayment": "Consulting Fee",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("best_celerytop/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 = {
    "programYears": ["2024"],
    "states": ["NY"],
    "natureOfPayment": "Consulting Fee",
    "maxItems": 100,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,best_celerytop/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/gFP6KRR2kjVguxHYi/builds/q7dHHhpGNRpgD6Bcn/openapi.json
