# Openpipe Health API

> Query US clinicians, hospitals, group practices and procedure volumes over REST, MCP, or a plain-English question.

Source: https://openpipe.health/docs/

> **Building with a coding agent?:** [Copy one prompt](https://openpipe.health/docs/agents.md#copy-this-to-your-agent) into Claude Code, Cursor or any other agent and it has the endpoints, prices, and limits it needs to start. The docs are also available as [`/docs/llms.txt`](https://openpipe.health/docs/llms.txt) and as Markdown, page by page.

The Openpipe Health API answers questions about who delivers care in the US and how much of it: clinicians, hospitals and health systems, nursing homes and other care sites, group practices, procedures, prescriptions, drug markets, Medicare payers, ACOs, trial investigators and industry payments. The data comes from public files, most of them from CMS, and every response shows the SQL the server ran to produce it, as a receipt.

## Two ways to use it

| You have | Use | Cost |
|---|---|---|
| A filter in mind (state, specialty, procedure code) | [Search and lookup endpoints](https://openpipe.health/docs/api/providers.md) | 1 credit |
| A question the filters cannot express, in plain English | [`POST /api/ask`](https://openpipe.health/docs/api/ask.md): a small dashboard, as one JSON document or a live stream | 25 credits |

Large result sets go through [`POST /api/exports`](https://openpipe.health/docs/api/exports.md), which writes every row of a list search or of an answer's tile to a CSV and returns a download link.

There is no endpoint that accepts SQL. The server writes the SQL, checks it, and shows it to you with each result.

Before spending credits, the free [data catalog](https://openpipe.health/docs/data/catalog.md) lists every dataset and column with sample rows. Answers are stored as [dashboards](https://openpipe.health/docs/api/saved.md) that open and refresh for free.

AI clients such as Claude Code and Cursor can use the search and lookup tools and `ask` through the [MCP server](https://openpipe.health/docs/mcp.md), at the same prices.

## What is in the data

- **Clinicians and organizations:** every active NPI in the registry (about 9.5 million), plus Medicare Part B totals for the 1.3 million that billed Medicare in 2024.
- **Procedures:** 9.8 million rows of volume by clinician and HCPCS code.
- **Prescribing:** 28 million rows of Part D claims by prescriber and drug.
- **Hospitals:** 9,326 hospitals with beds, discharges, revenue and owners, including private-equity flags.
- **Hospital intelligence:** star ratings and quality measures for 5,435 hospitals, the EHR vendor of 4,224, the health system of 3,950, Medicare inpatient volume by MS-DRG, and 2.3 million clinician-to-facility affiliations. See [Hospitals and systems](https://openpipe.health/docs/api/hospital-intel.md).
- **Care sites:** 94,745 nursing homes, home health agencies, hospices, dialysis facilities, surgery centers and clinics, with owners for five of the types. See [Care sites](https://openpipe.health/docs/api/care-sites.md).
- **Group practices:** 219,703 groups and 3.8 million clinician-to-group links.
- **Drug markets:** Part D and Medicaid volume by drug and state, and national spending per drug from 2020 to 2024. See [Drug markets](https://openpipe.health/docs/api/drug-markets.md).
- **Payers and ACOs:** 7,582 Medicare Advantage and Part D plans with enrollment by county, and 544 Medicare Shared Savings Program ACOs with their participants. See [Payers and ACOs](https://openpipe.health/docs/api/payers-acos.md).
- **Experts:** 165,307 clinical trials and three fiscal years of NIH grants, with investigators linked to an NPI by name. See [Experts](https://openpipe.health/docs/api/experts.md).
- **Industry payments:** 4.6 million Open Payments rows, aggregated to clinician and company.

See [Datasets](https://openpipe.health/docs/data/datasets.md) for versions and sources, and [Caveats](https://openpipe.health/docs/data/caveats.md) before you quote a number: most utilization is Medicare fee-for-service only, and none of it is commercial insurance.

## Next steps

1. [Build with an AI agent](https://openpipe.health/docs/agents.md): one prompt that sets up Claude Code, Cursor or any coding agent.
2. [Quickstart](https://openpipe.health/docs/quickstart.md): first request in about two minutes.
3. [Authentication](https://openpipe.health/docs/authentication.md): API keys and session tokens.
4. [Workspaces and teams](https://openpipe.health/docs/workspaces.md): who shares credits and keys.
5. [MCP server](https://openpipe.health/docs/mcp.md): connect Claude Code or another MCP client.
6. [Receipts](https://openpipe.health/docs/receipts.md): how to read the `sql` and `sources` fields on every response.
