Medicare & Medicaid Drug Spending
Yearly government spending on each drug in Medicare Part D, Medicare Part B or Medicaid, from CMS: brand, generic name, manufacturer, total spending, claims, beneficiaries, dosage units and average spending per claim, beneficiary and unit, one row per drug and year.
$0.50 per 1,000 records
You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from data.cms.gov/summary-statistics-on-use-and-payments/medicare-medicaid-spending-by-drug
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/medicare-medicaid-drug-spending/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"program":"part_d"},"max_items":50}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
19 fields: 18 here, 1 technical one under Technical details.
Basics
- Program
Medicare Part D, Medicare Part B or Medicaid.
Example Medicare Part D
- Brand name
Brand name of the drug.
Example Ozempic
- Generic name
Generic name of the drug.
Example Semaglutide
- Manufacturer
The manufacturer; null on total rows and in Part B.
Example Novo Nordisk
- Overall
Whether the row totals all manufacturers of the drug.
Example No
- Manufacturers count
Number of manufacturers of the drug.
Example 1
- Total claims
Number of claims that year.
Example 1,204,138
- Total beneficiaries
Number of patients who received the drug that year (Medicare only).
Example 269,663
- Dosage units
Dosage units dispensed or given that year, such as pills, milliliters or billing units.
Example 3,813,091.786
- Change in average spend per unit
CMS's change in average spending per unit from the year before into the latest year, as a fraction (0.05 is 5% higher); on the latest year's row only.
Example -0.138872
- Annual growth rate
CMS's compound annual growth rate of average spending per unit over the years shown, as a fraction; the same on every year of the drug.
Example -0.083123
- Outlier
Whether CMS flags that year's average spending per unit as an outlier; use those values with care.
Example No
Prices
- Total spending
Total spending on the drug that year; the currency is in currency.
Example $1,455,812,267.10
- Currency
Currency of the money fields: USD.
Example USD
- Average spend per claim
Average spending per claim that year.
Example $1,209.01
- Average spend per beneficiary
Average spending per patient that year (Medicare only).
Example $5,398.64
- Average spend per unit
Average spending per dosage unit that year (weighted across products in Part D and Medicaid).
Example $433.67
Dates
- Year
The calendar year the spending is for.
Example 2020
Technical detailsField names and types for developers, and the 1 field hidden above
Hidden by default
This field comes with each record too. It is an internal code, a note about how the record was read or a copy of what was searched for, so the lists above leave it out.
- ID
idThis row's key: program, brand, generic name, billing code or manufacturer, and year.
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
id | text | ID (hidden) | 3 of 3 |
program | text | Program | 3 of 3 |
brand_name | text | Brand name | 3 of 3 |
generic_name | text | Generic name | 3 of 3 |
manufacturer | text | Manufacturer | 3 of 3 |
is_overall | yes or no | Overall | 3 of 3 |
manufacturers_count | number | Manufacturers count | 3 of 3 |
year | number | Year | 3 of 3 |
total_spending | money | Total spending | 3 of 3 |
currency | text | Currency | 3 of 3 |
total_claims | number | Total claims | 3 of 3 |
total_beneficiaries | number | Total beneficiaries | 3 of 3 |
dosage_units | number | Dosage units | 3 of 3 |
avg_spend_per_claim | money | Average spend per claim | 3 of 3 |
avg_spend_per_beneficiary | money | Average spend per beneficiary | 3 of 3 |
avg_spend_per_unit | money | Average spend per unit | 3 of 3 |
change_in_avg_spend_per_unit | number | Change in average spend per unit | 0 of 3 |
annual_growth_rate | number | Annual growth rate | 3 of 3 |
is_outlier | yes or no | Outlier | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Program | Brand name | Generic name | Manufacturer | Overall | Manufacturers count | Total claims | Total beneficiaries | Dosage units | Change in average spend per unit | Annual growth rate | Outlier | Total spending | Currency | Average spend per claim | Average spend per beneficiary | Average spend per unit | Year |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Medicare Part D | Ozempic | Semaglutide | Novo Nordisk | No | 1 | 1,204,138 | 269,663 | 3,813,091.786 | — | -0.083123 | No | $1,455,812,267.10 | USD | $1,209.01 | $5,398.64 | $433.67 | 2020 |
| 2 | Medicare Part D | Ozempic | Semaglutide | Novo Nordisk | No | 1 | 2,016,177 | 458,643 | 6,617,457.857 | — | -0.083123 | No | $2,621,694,348.30 | USD | $1,300.33 | $5,716.20 | $452.72 | 2021 |
| 3 | Medicare Part D | Ozempic | Semaglutide | Novo Nordisk | No | 1 | 3,410,839 | 780,253 | 11,314,543.293 | — | -0.083123 | No | $4,628,160,643.40 | USD | $1,356.90 | $5,931.62 | $468.24 | 2022 |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- Data as the Centers for Medicare & Medicaid Services publishes it in its Spending by Drug datasets, updated once a year; the current release covers 2020 to 2024. CMS does not endorse this API.
- Part D and Medicaid spending is gross: before manufacturer rebates, which CMS does not publish, so net spending is lower. Part B spending is the full payment, Medicare's share plus the patient's.
- Part B lists one row per drug billing code (HCPCS) and has no manufacturer; the billing code itself is not returned, but it works as the drug search, such as J9271.
- Medicaid rows have no beneficiary counts.
- change_in_avg_spend_per_unit is CMS's published change into the latest year and sits on that year's row only; compare earlier years through avg_spend_per_unit.
- drug matches words anywhere in a row, including the manufacturer name, so a broad word such as insulin also finds syringes and pen needles.
- At most 100,000 rows per run, enough for a whole program (Medicaid has about 18,500 drug rows, up to five years each).
- Public domain U.S. government data.
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.