Skip to content
Assyro AI

Search CMS drug spending

Search and read CMS drug spending records through the Assyro API: what US Medicare spends on a drug (Part D and Part B Spending by Drug: total spending…

GEThttps://api.assyro.com/v1/sources/cms-drug-spending/search

Preview: api.assyro.com is not serving production data yet. This page follows the API's published description and may change before launch.

Search and read CMS drug spending records from your own code: what US Medicare spends on a drug (Part D and Part B Spending by Drug: total spending, claims, beneficiaries, dosage units, average spending per unit, by year) and what pharmacies pay to acquire it (NADAC per unit), in CMS's own column names. Published by Centers for Medicare & Medicaid Services (data.cms.gov/summary-statistics-on-use-and-payments/medicare-medicaid-spending-by-drug); answered from Assyro's copy, refreshed daily 11:10 UTC.

Licence: public domain (see the terms). Each record links to its page at the source.

Example: "How much did Medicare Part D spend on Eliquis in the latest year?"

GET https://api.assyro.com/v1/sources/cms-drug-spending/search with any of these query parameters. Repeat a parameter for a list (?phase=PHASE2&phase=PHASE3). An unknown parameter is refused by name.

Search parameters

  • datasetstring

    Search one dataset only. Omit for all three. One of: part-d, part-b, nadac.

  • querystring

    Words that must all appear in the brand, generic, manufacturer, HCPCS description or NDC description, e.g. "apixaban 5 mg".

  • brandstring

    Brand name, substring match, e.g. "Humira" (in NADAC, matched against the NDC description).

  • genericstring

    Generic name, substring match, e.g. "adalimumab" (in NADAC, matched against the NDC description).

  • manufacturerstring

    Part D manufacturer, substring match (CMS cuts names to 15 characters), e.g. "AbbVie". Returns manufacturer rows, not "Overall".

  • manufacturersboolean

    Part D: true to return the per-manufacturer rows as well as "Overall". Default false (Overall rows only, so a drug is not counted twice).

  • hcpcsstring

    Part B HCPCS code, exact, e.g. "J9271".

  • ndcstring

    NADAC NDC, 11 digits; dashes ignored ("00003-0894-21").

  • yearstring

    The data year whose columns the records show (Part D and Part B), e.g. "2023". Default: the latest year in CMS's file.

  • sortstring

    relevance (default: exact name matches first), spending (CMS's Tot_Spndng for the year, highest first; Part D and Part B) or name. One of: relevance, spending, name.

  • limitinteger

    Records to return, default 8. total reports every match.

  • offsetinteger

    Skip this many results (for paging), default 0.

Each result is a record; read one in full with Get a record.

What a record holds

  • id, title, url: the source's identifier, its title and its page at the source, to verify it.
  • authority, publishedDate, version: who published it, when, and the edition read.
  • snippet and fields: the matching text and the source's own fields.
  • asOf: the day Assyro's copy of the source was read.