# Openpipe Health API > Openpipe Health is an API over public data on US healthcare, most of it from CMS: clinicians (NPI registry, Medicare Part B), procedure volumes by HCPCS code, Part D prescribing, hospitals with their owners, quality scores, EHR vendor, health system, DRG volumes and affiliated clinicians, nursing homes and other care sites with their owners, group practices, drug markets in Medicare Part D and Medicaid, Medicare Advantage payers and plans, ACOs, clinical-trial investigators and NIH grants, and industry payments. Use it through REST search and lookup endpoints, a plain-English question that returns a finished dashboard as JSON, or MCP tools. There is no endpoint that accepts SQL. Every data response shows the SQL the server ran, as a read-only receipt. - Every link below is plain Markdown. Any docs page is also available as Markdown by replacing its trailing slash with `.md` (`/docs/api/ask/` is `/docs/api/ask.md`; the docs home page is `/docs/index.md`). - Paths in the docs are relative to the base URL of an API deployment, kept in the `OPH_API` environment variable. The API key is kept in `OPH_KEY` and sent as `Authorization: Bearer $OPH_KEY`. Read both from the environment; never ask a person to paste a key into a chat. - Calls are metered in credits per workspace and rate limited per minute. Do not retry a `402`. On `429`, wait the number of seconds in `Retry-After`. - Most utilization figures are Medicare fee-for-service only, none are commercial insurance, and CMS withholds small counts (under 11 patients, discharges or prescriptions; plan-county enrollment of 10 or fewer). Each market endpoint names its population in the response. Read Caveats before presenting a number as a total. - Links from trial investigators and NIH grants to an NPI, and from ACO participants to a group practice, are made by name match and are not published by the source. Verify a `medium` match before acting on it. - The customers, logos and statistics on the Openpipe Health marketing site are invented for a demo. These docs describe the real API. ## Whole docs in one file - [llms-small.txt](https://openpipe.health/docs/llms-small.txt): The essentials in one file: quickstart, authentication, credits, errors and rate limits, every endpoint, the MCP server, Ask and exports, the tables and the data caveats - [llms-full.txt](https://openpipe.health/docs/llms-full.txt): Every page of these docs in one file, in reading order - [agent-prompt.txt](https://openpipe.health/docs/agent-prompt.txt): A short prompt that sets a coding agent up to build against the API ## Start here - [Openpipe Health API](https://openpipe.health/docs/index.md): Query US clinicians, hospitals, group practices and procedure volumes over REST, MCP, or a plain-English question. - [Build with an AI agent](https://openpipe.health/docs/agents.md): One prompt to paste into Claude Code, Cursor or any coding agent so it can build against the Openpipe Health API, plus llms.txt, Markdown pages and MCP setup. - [Quickstart](https://openpipe.health/docs/quickstart.md): Make your first Openpipe Health API request. - [Authentication](https://openpipe.health/docs/authentication.md): API keys, session tokens, browser sign-in, and which endpoints need neither. - [MCP server](https://openpipe.health/docs/mcp.md): Connect Claude Code, Cursor and other MCP clients to the same data, with the same API keys and credit prices. - [Credits](https://openpipe.health/docs/credits.md): What each call costs, how the monthly limit works, and how to check your balance. ## API reference - [Providers](https://openpipe.health/docs/api/providers.md): Search clinicians and organizations that bill Medicare, and fetch a full profile by NPI. - [Facilities](https://openpipe.health/docs/api/facilities.md): Search hospitals by size, ownership and location, and fetch one hospital with its owners. - [Hospitals and systems](https://openpipe.health/docs/api/hospital-intel.md): Search hospitals by EHR vendor, star rating, health system and DRG volume, and fetch one hospital's quality scorecard, EHR, clinicians, measures and Medicare inpatient volume. - [Care sites](https://openpipe.health/docs/api/care-sites.md): Search nursing homes, home health agencies, hospices, dialysis facilities, surgery centers, clinics and other non-hospital sites, and fetch one site with its detail and owners. - [Groups](https://openpipe.health/docs/api/groups.md): Search group practices and list their members. - [Procedures](https://openpipe.health/docs/api/procedures.md): Look up HCPCS and CPT codes by code prefix or description. - [Drug markets](https://openpipe.health/docs/api/drug-markets.md): One drug's volume by state in Medicare Part D and Medicaid, and its national spending per year in Part D, Part B and Medicaid. - [Payers and ACOs](https://openpipe.health/docs/api/payers-acos.md): Medicare Advantage and Part D enrollment by parent company for the nation, a state or a county, individual plans, and Medicare Shared Savings Program ACOs with their participants. - [Experts](https://openpipe.health/docs/api/experts.md): Rank clinicians by the clinical trials they lead, and fetch one clinician's trials, NIH grants and industry payments. - [Ask](https://openpipe.health/docs/api/ask.md): Ask a question in plain English and receive a dashboard of up to four tiles, as one JSON document or a live event stream. - [Ask (instant)](https://openpipe.health/docs/api/ask2.md): The endpoints behind the app's Ask page. A question is answered from a ready-made recipe for 5 credits when one fits, and by the planner for 25 when none does, as a stream of UI patches. - [Saved dashboards](https://openpipe.health/docs/api/saved.md): Every Ask answer is stored as a dashboard. Open it from its stored result, refresh it for free, and save it to keep it. - [Errors](https://openpipe.health/docs/api/errors.md): Status codes, the error body, rate limits and request size limits. ## Data - [Data catalog](https://openpipe.health/docs/data/catalog.md): Free endpoints that list every dataset, describe every column, show how full each one is, return sample rows and search across all of it. - [Tables](https://openpipe.health/docs/data/tables.md): The tables behind every answer, what one row is, and what every column means. - [Caveats](https://openpipe.health/docs/data/caveats.md): What the data does not show. Read this before quoting a number. ## Optional - [Workspaces and teams](https://openpipe.health/docs/workspaces.md): Personal and organization workspaces, roles, invitations, and how a request picks the workspace it acts in. - [Receipts](https://openpipe.health/docs/receipts.md): Every response shows the SQL the server ran and the datasets it read. - [Exports](https://openpipe.health/docs/api/exports.md): Write every row of a list search, or of one tile of an answer, to a CSV of up to 500,000 rows and get a download link. - [Account and keys](https://openpipe.health/docs/api/account.md): Your workspace, credit balance, API keys and usage history. - [Onboarding profile](https://openpipe.health/docs/api/profile.md): What a signed-in person told the app about their role, product and territory. Session only, free, and used to frame Ask answers. - [Meta and health](https://openpipe.health/docs/api/meta.md): Public endpoints that describe the loaded data and the state of the service. - [Datasets](https://openpipe.health/docs/data/datasets.md): The public files behind the API, with their versions and row counts. - [Rank surgeons by procedure](https://openpipe.health/docs/guides/surgeons-by-procedure.md): Build a call list of the highest-volume operators for a procedure in a territory. - [Find PE-owned hospitals](https://openpipe.health/docs/guides/pe-owned-hospitals.md): List hospitals with a private-equity owner and see who the owners are. - [Stream Ask in JavaScript](https://openpipe.health/docs/guides/stream-ask.md): Read the Ask event stream with fetch in a browser, Node, Bun or Deno.