/api/v1/medicare-drugsMedicare Drug Spending Search
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/toolsAuthentication
Include your API key in the x-api-key header.
Parameters
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | No | Exact 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_name | string | No | Exact 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_id | string | No | Filter 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_id | string | No | Exact, case-sensitive ChEMBL molecule id - pass it verbatim as returned in a row's molecule.chembl_id (e.g. 'CHEMBL1201599'). |
| match_method | string | No | Filter by how the molecule link was established: exact_generic or unmatched. Allowed values: exact_generic, unmatched |
| min_spending | number | No | Minimum total_spending (inclusive). |
| max_spending | number | No | Maximum total_spending (inclusive). |
| page | number | No | Page number (default 1). Range: 1 to ∞ |
| limit | number | No | Results per page (1-100, default 20). Range: 1 to 100 |
| sort | string | No | Sort field (default total_spending). Allowed values: total_spending, generic_name |
| order | string | No | Sort 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
Payload: data — Medicare Drugs
Exact total: meta.totalItems
Pagination: server-side via page and limit
Common row fields
| Field | Description |
|---|---|
| generic_name | Generic Name |
| brand_names | Brand Names |
| total_spending | Total Spending |
| total_claims | Claims |
| total_beneficiaries | Beneficiaries |
| _key | Record 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