# CMS Open Payments Scraper (`parseforge/openpayments-scraper`) Actor

Scrapes payment records from the CMS Open Payments website by provider, teaching hospital, or company. Returns each payment as a flat row with amounts, dates, and party names.

- **URL**: https://apify.com/parseforge/openpayments-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $8.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?

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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### CMS Open Payments Scraper

**Scrape CMS Open Payments records by provider, hospital, or company, up to a million per run.** Each record includes payment amounts, dates, nature of payment, and the names of both parties. No API key or registration. Export to CSV, JSON, Excel, or XML.

The CMS Open Payments website lets you search for financial relationships between healthcare providers and drug or device companies, but manual searches are slow and the data cannot be downloaded in bulk. This Actor reads the public search results directly, filtering by provider type, name, location, or NPI, and returns every matching payment record in a consistent, flat schema.

| Who uses it | What they scrape CMS Open Payments for |
|---|---|
| Healthcare compliance officers | Auditing payments to a specific physician or hospital network. |
| Investigative journalists | Mapping industry payments across a city or specialty. |
| Pharma market analysts | Tracking competitor spending on speaker fees and consulting. |
| Academic researchers | Building datasets for studies on conflicts of interest. |

### What it does

This Actor collects CMS Open Payments records by provider, teaching hospital, or company search, and returns each payment as a flat row.

- 🔍 **Three search types:** Individual Provider, Teaching Hospital, or Company, each with its own set of filters.
- 🌎 **Country filter:** Narrow results to a specific country from a list of 36 supported nations.
- 🏙️ **Location filters:** Filter by city or zip code to focus on a single metropolitan area.
- 🆔 **NPI lookup:** Search for a specific provider using their National Provider Identifier.
- 📊 **Bulk collection:** Set a maximum record count up to 1,000,000 and let the Actor paginate through all results.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with CMS Open Payments data

**📋 Audit a single physician.**

A compliance officer searches by last name and state to review all reported payments to a specific doctor before an annual review.

**🏥 Map payments to a teaching hospital.**

A researcher pulls all payments linked to a hospital by name and city to study industry influence on graduate medical education.

**💊 Track a drug company's spending.**

A market analyst scrapes all payments made by a pharmaceutical company in a given year to benchmark against competitors.

**🌎 Compare payments across countries.**

A journalist collects records for a single company across multiple countries to reveal global patterns in physician payments.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key** | Reads the public CMS Open Payments search, no registration needed. |
| **Fixed schema** | Every payment record arrives with the same fields, ready for analysis. |
| **Flexible export** | Save results as CSV, JSON, Excel, or XML. |
| **Targeted searches** | Combine name, city, zip, and provider type to isolate exactly the records you need. |

### How it compares

No other Store actor targets CMS Open Payments the same way, so the honest comparison is with the alternatives teams actually weigh.

| | CMS Open Payments Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When CMS Open Payments changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor from a direct API URL or by selecting a search type and filling in the corresponding filters. Filters are applied as the Actor reads results, so only matching records are collected. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "startUrl": "https://openpaymentsdata.cms.gov/search?searchType=Provider&Country=UNITED+STATES",
  "maxItems": 10
}
```

A larger pull:

```json
{
  "startUrl": "https://openpaymentsdata.cms.gov/search?searchType=Provider&Country=UNITED+STATES",
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.16 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $16.00 |
| 1,000 results | $160.00 |
| 10,000 results | $1600.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [CMS Open Payments Scraper](https://apify.com/parseforge/openpayments-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to CMS Open Payments through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/openpayments-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that your filters are not too restrictive. Try broadening your search by leaving some fields empty or selecting 'All Countries'. Also verify that the search type matches the filters you are using.

**The Actor stops before reaching my maxItems limit.**

This means the CMS website returned no more results for your query. Try relaxing your filters or using a different search type to find more records.

**I get an error when using a direct URL.**

Make sure the URL is a valid Open Payments search URL from openpaymentsdata.cms.gov. The URL must include the full query string. If the problem persists, try using the filter fields instead.

**Some fields are empty in my results.**

Not every payment record includes all fields. If a field like City or Zip is blank, the CMS website did not have that data for that specific payment.

**The run is taking a long time.**

Large record counts take longer because the Actor must paginate through many pages. Reduce the maxItems limit or narrow your filters to speed up the run.

### FAQ

| Question | Answer |
|---|---|
| Do I need a CMS Open Payments account to use this? | No. The Actor reads the public search pages on openpaymentsdata.cms.gov, so no login or account is required. |
| Can I scrape all payment records for an entire year? | Yes. Set a high maximum record count and use broad filters, or provide a direct API URL that covers the year you need. The Actor will paginate through all available results. |
| What is the difference between the three search types? | Individual Provider searches for payments to a specific person, Teaching Hospital searches for payments to an institution, and Company searches for payments made by a drug or device manufacturer. Each type unlocks its own set of filters. |
| Can I search by NPI number? | Yes. When you select the Individual Provider search type, an NPI field appears. Enter the 10-digit National Provider Identifier to find payments to that exact provider. |
| How do I filter by city or zip code? | After choosing a search type, fill in the City or Zip/Postal code field. The Actor will only return records that match that location. |
| What export formats are supported? | You can export your dataset as CSV, JSON, Excel, or XML directly from the Apify platform. |
| Can I use a direct URL instead of the filters? | Yes. Paste a full Open Payments search URL into the startUrl field. When you use a direct URL, the filter fields are ignored. |
| How many records can I collect in one run? | You can set the maximum up to 1,000,000 records. The Actor will stop when it reaches that limit or when no more results are available. |
| Does this Actor handle pagination automatically? | Yes. It navigates through all pages of search results until it collects the requested number of records or reaches the end. |
| Is the data returned in real time? | The Actor reads whatever is currently published on the CMS Open Payments website, so your results reflect the latest available data. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Centers for Medicare & Medicaid Services. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `startUrl` (type: `string`):

Direct API URL to scrape. Cannot be used together with filter parameters. Leave empty to use filters instead.

## `searchType` (type: `string`):

Select the type of search to perform. Only one search type can be selected at a time. The corresponding filter section will be used.

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

How many payment records to collect per run.

## `individualProviderCountry` (type: `string`):

Filter by country name. Only used when searchType is 'individualProvider'.

## `individualProviderFirstName` (type: `string`):

Filter by provider first name. Only used when searchType is 'individualProvider'.

## `individualProviderLastName` (type: `string`):

Filter by provider last name. Only used when searchType is 'individualProvider'.

## `individualProviderCity` (type: `string`):

Filter by city name. Only used when searchType is 'individualProvider'.

## `individualProviderZip` (type: `string`):

Filter by zip/postal code. Only used when searchType is 'individualProvider'.

## `individualProviderType` (type: `string`):

Matches the Open Payments Type filter (e.g., 'Covered Recipient Physician'). Only used when searchType is 'individualProvider'.

## `individualProviderNpi` (type: `string`):

Filter by National Provider Identifier. Only used when searchType is 'individualProvider'.

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

Filter by hospital name. Only used when searchType is 'teachingHospital'.

## `teachingHospitalCity` (type: `string`):

Filter by hospital city. Only used when searchType is 'teachingHospital'.

## `teachingHospitalZip` (type: `string`):

Filter by hospital zip/postal code. Only used when searchType is 'teachingHospital'.

## `companyName` (type: `string`):

Filter by company name. Only used when searchType is 'company'.

## `companyCountry` (type: `string`):

Filter by country name. Only used when searchType is 'company'.

## Actor input object example

```json
{
  "startUrl": "https://openpaymentsdata.cms.gov/search?searchType=Provider&Country=UNITED+STATES",
  "maxItems": 10
}
```

# Actor output Schema

## `individualProviders` (type: `string`):

Complete dataset with individual provider payment records including profile information, payment summaries, and entity details

## `hospitals` (type: `string`):

Complete dataset with teaching hospital payment records including hospital information, payment summaries, and entity details

## `companies` (type: `string`):

Complete dataset with company payment records including company information, payment summaries, and entity details

## `allData` (type: `string`):

Complete dataset with all payment records regardless of entity type

# 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 = {
    "startUrl": "https://openpaymentsdata.cms.gov/search?searchType=Provider&Country=UNITED+STATES",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/openpayments-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 = {
    "startUrl": "https://openpaymentsdata.cms.gov/search?searchType=Provider&Country=UNITED+STATES",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/openpayments-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 '{
  "startUrl": "https://openpaymentsdata.cms.gov/search?searchType=Provider&Country=UNITED+STATES",
  "maxItems": 10
}' |
apify call parseforge/openpayments-scraper --silent --output-dataset

```

## MCP server setup

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