CMS data.cms.gov · Top
data-cms-gov/drug-spending/topGet health and medical data with CMS data.cms.gov · Top from Alexandria through one Spiral API key. Questions about the top spenders or movers: "which drugs cost Medicare Part D the most in 2024", "which Part B drugs rose fastest in price per unit", "which drugs with over $1 billion in Part D spending cost the most per patient". It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.00873 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
program required | one of part_d, part_b, medicaid | — | The dataset to rank. |
year | number 2000 to 2100 | — | Calendar year to rank; defaults to the latest year in the current release (2024). Years outside the release are invalid_input. |
limit | number 1 to 100 | 10 | limit |
order | one of desc, asc | desc |
|
sort_by | one of total_spending, total_claims, total_beneficiaries, avg_spending_per_beneficiary, avg_spending_per_unit_change | total_spending |
|
min_total_spending | number 0 to … | — | Only drugs with at least this total spending in USD in |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "data-cms-gov/drug-spending/top",
"input": {
"program": "part_d"
}
}'Frequently asked questions
How much does CMS data.cms.gov · Top cost?
$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use CMS data.cms.gov · Top through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "data-cms-gov/drug-spending/top"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use CMS data.cms.gov · Top?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use CMS data.cms.gov · Top?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.