API Documentation
← API overview

Medicare Drug Spending

2 endpoints · every section below is generated from the API catalog

GET/api/v1/medicare-drugs

Medicare Drug Spending Search

Available on FreeFull reference →

Paginated, filterable list of Medicare Part D drugs with 2025 spending data: total spending, claims, beneficiaries, average spending per claim/beneficiary, plus linked ChEMBL molecule and approved indications. All filters AND-combine - the generic_name filter does NOT override search or the other filters. The search filter is an exact whole-term match (English-analyzed, case-insensitive) against a complete generic OR brand name; partial strings like 'apix' match nothing. generic_name is an exact case-insensitive match against the stored Title Case name (e.g. 'Apixaban'; any casing works). efo_id accepts OBO-style and dash forms ('EFO:0003907') and is normalized server-side to the stored 'EFO_0003907' format. Each record's '_key' field is the id the Medicare Drug Record tool expects.

Rate limit: medicareApiCallsPerDay · Free plan: 10/day

Parameters

ParameterTypeRequiredDescription
searchstringNoExact whole-term match (English-analyzed, case-insensitive) against generic_name OR brand_names - pass the COMPLETE generic or brand name (e.g. 'Apixaban', 'Eliquis'); partial strings like 'apix' match nothing.
generic_namestringNoExact case-insensitive match on the stored generic name (Title Case, e.g. 'Apixaban'; any casing works; no partial matches). AND-combines with search and every other filter - it never overrides them.
efo_idstringNoFilter by approved indication using a disease CURIE (e.g. EFO:0003767). OBO-style ('EFO:0003907') and dash forms are accepted and normalized server-side to the stored 'EFO_0003907' format. Get CURIEs from the Disease Autocomplete tool.
molecule_idstringNoExact, case-sensitive ChEMBL molecule id - pass it verbatim as returned in a row's molecule.chembl_id (e.g. 'CHEMBL1201599').
match_methodstringNoFilter by how the molecule link was established: exact_generic or unmatched.
min_spendingnumberNoMinimum total_spending (inclusive).
max_spendingnumberNoMaximum total_spending (inclusive).
primary_indication_onlybooleanNo
pagenumberNoPage number (default 1). (min 1; default 1)
Range: 1 to ∞
limitnumberNoResults per page (1-100, default 20). (range 1-100; default 20)
Range: 1 to 100
sortstringNoSort field (default total_spending). (default total_spending)
Allowed values: total_spending, generic_name
orderstringNoSort direction (default desc). (default desc)
Allowed values: asc, desc

Example request

curl -H "x-api-key: YOUR_API_KEY" \
  "https://app.caelrith.com/api/v1/medicare-drugs"
GET/api/v1/medicare-drugs/:key

Medicare Drug Record

Available on FreeFull reference →

Retrieve ONE Medicare Part D drug's full 2025 spending record by its unique _key (derived from the generic name, e.g. 'aripiprazole'). Returns the full document including brand names, spending/claims/beneficiary metrics, the linked ChEMBL molecule and approved indications (already deduplicated by efo_id server-side). Use after a Medicare Drug Spending Search; copy the exact _key string from a result - never construct or guess it.

Rate limit: medicareApiCallsPerDay · Free plan: 10/day

Parameters

ParameterTypeRequiredDescription
key(path)stringYesUnique drug _key derived from the generic name (e.g. 'aripiprazole'). Copy it exactly from the '_key' field of a Medicare Drug Spending Search record; do not construct it from the drug name.

Example request

curl -H "x-api-key: YOUR_API_KEY" \
  "https://app.caelrith.com/api/v1/medicare-drugs/{key}"