/api/v1/medicare-spendingSearch
Returns a paginated list of Medicare spending records with data and meta (page, limit, totalItems, totalPages). Call it to browse or filter spending by drug names, manufacturer, year, and spending range; supplying a search term switches to a text search over the records. Returns 400 for invalid query parameters, 503 when the data is unavailable on this deployment, and 500 on other failures.
When to use it
- Browse Medicare spending records by year
- Filter spending by manufacturer or drug name
- Find spending records within a spending range
Getting started
Base URL
https://app.caelrith.com/api/v1/toolsAuthentication
Include your API key in the x-api-key header.
Rate limit
Every call counts against your workspace’s daily quota for medicareApiCallsPerDay. Exceeding it returns HTTP 429.
Plans and daily limits
| Plan | Available | Calls / day |
|---|---|---|
| free | yes | 10 |
| pro | yes | 200 |
| custom (default) | yes | 10,000 |
Plan defaults. A custom workspace may carry per-tenant overrides.
Parameters
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | No | maximum length 500 |
| spending_key | string | No | maximum length 200 |
| brand_name | string | No | maximum length 200 |
| generic_name | string | No | maximum length 300 |
| manufacturer | string | No | maximum length 200 |
| year | string | No | maximum length 50 |
| min_spending | number | No | Lower bound on total spending. |
| max_spending | number | No | Upper bound on total spending. |
| page | number | No | Min 1; default 1 (min 1; default 1) Range: 1 to ∞ |
| limit | number | No | Range 1-100; default 20 (range 1-100; default 20) Range: 1 to 100 |
| sort | string | No | Default total_spending (default total_spending) Allowed values: total_spending, key, brand |
| order | string | No | 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-spending"
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.Catalog version mcp-2026-10-28 · generated from the live MCP catalog