API Documentation
← All tools
GET/api/v1/medicare-drugs

Medicare Drug Spending Search

medicare-drugsNo success wrapper

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.

When to use it

  • top drugs by Medicare Part D spending
  • Medicare spending for a drug or brand (pass the complete generic or brand name)
  • drugs tied to a disease efo_id or a ChEMBL molecule id

Getting started

Base URL

https://app.caelrith.com/api/v1/tools

Authentication

Include your API key in the x-api-key header.

Parameters

Query 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.
Allowed values: exact_generic, unmatched
min_spendingnumberNoMinimum total_spending (inclusive).
max_spendingnumberNoMaximum total_spending (inclusive).
pagenumberNoPage number (default 1).
Range: 1 to ∞
limitnumberNoResults per page (1-100, default 20).
Range: 1 to 100
sortstringNoSort field (default total_spending).
Allowed values: total_spending, generic_name
orderstringNoSort direction (default desc).
Allowed values: asc, desc

Example request

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

Response envelope

This endpoint returns an implicit 2xx response - there is no success flag in the body.

{
  "data": { /* payload */ },
  "meta": { /* pagination, totals */ }
}

// No "success" flag on this endpoint - any 2xx JSON is a success.

Response shape

List responseMEDICARE_DRUGS

Payload: data — Medicare Drugs

Exact total: meta.totalItems

Pagination: server-side via page and limit

Common row fields

FieldDescription
generic_nameGeneric Name
brand_namesBrand Names
total_spendingTotal Spending
total_claimsClaims
total_beneficiariesBeneficiaries
_keyRecord identifier
avg_spending_per_claim—

Empty results: No matching rows (HTTP 200)

search is an exact whole-term match (English-analyzed, case-insensitive) and generic_name an exact case-insensitive match - PARTIAL strings return no rows, so no_results with a partial or misspelled name is not evidence the drug is absent. avg_spending_per_claim / avg_spending_per_beneficiary are server-computed and null when the denominator is 0. approved_indications arrive deduplicated by efo_id. meta.totalItems is the exact filtered total - quote it, never a page length.

Catalog version 0.0.0-generated · generated from the API source