Skip to main content

Healthcare Data

Public-health data integrations: clinical trials, US drug pricing, and insurance quote feasibility. All three are free public sources — no API keys required (an optional PRY_NASS_API_KEY-style key is never needed here; NADAC, clinicaltrials.gov, and iii.org are all open).

What it scrapes

SourceData
clinicaltrials.gov API v2Keyword search + single-study lookup by NCT id (free, no auth)
NADAC (CMS / data.medicaid.gov)US National Average Drug Acquisition Cost weekly files
GoodRx (fallback)Consumer retail price pages — frequently JS-gated, degrades to null
iii.orgPublic state-by-state average-premium rate tables (auto / homeowners)

Endpoints

Router: routers/healthcare_data.py · tag: Healthcare Data

MethodPathSummary
GET/v1/health/trials/searchSearch clinical trials by keyword
GET/v1/health/trials/{nct_id}One clinical trial by NCT id
GET/v1/health/drug/{drug}US drug price by name (NADAC + GoodRx)
GET/v1/health/insurance/quotesCar/home insurance quote feasibility + public rate tables

GET /v1/health/trials/search

Query params: query (required), limit (1–100, default 20).

curl -X GET "http://localhost:8005/v1/health/trials/search?query=cognitive+stimulation&limit=2" \
-H "Authorization: Bearer <key>"

Response (200):

{
"success": true,
"query": "cognitive stimulation",
"limit": 2,
"data": [
{
"nct_id": "NCT05966207",
"title": "Individual Intervention of Cognitive Stimulation",
"status": "Completed",
"phase": "N/A",
"conditions": ["Cognitive Dysfunction"],
"sponsor": "Escola Superior de Enfermagem de Coimbra",
"start_date": "2021-12-27",
"locations": [{"facility": "...", "city": "Coimbra", "country": "Portugal"}]
}
]
}

GET /v1/health/drug/{drug}

Path params: drug (brand or generic, e.g. atorvastatin or Lipitor).

curl -X GET "http://localhost:8005/v1/health/drug/atorvastatin" \
-H "Authorization: Bearer <key>"

Response (200):

{
"success": true,
"data": {
"drug": "ATORVASTATIN CALCIUM 10 MG",
"ndc": "00093072098",
"price_per_unit": 0.02633,
"price_type": "NADAC per EA",
"source": "nadac"
}
}

GET /v1/health/insurance/quotes

Query params: coverage_type (e.g. auto, home).

curl -X GET "http://localhost:8005/v1/health/insurance/quotes?coverage_type=auto" \
-H "Authorization: Bearer <key>"

Response (200): Pry never fabricates premiums. When provider quote forms are captcha/JS-gated it returns an honest feasibility payload; the public rate-table path (iii.org) returns real aggregate data:

{
"success": true,
"coverage_type": "auto",
"data": {
"available": true,
"quotes": [
{"provider": "iii", "coverage_type": "auto", "state": "CA", "avg_premium": 2300}
]
}
}

MCP tools

The healthcare endpoints are REST-first; the MCP server currently exposes the core platform + data-domain tools (see MCP Integration for the full 50-tool list). Healthcare reads are callable via the pry_scrape / pry_extract tools against the underlying public sources.

Who uses this

  • Pharma / biotech research — trial landscape and sponsor mapping.
  • Cost-containment tools — drug price benchmarking (NADAC is the same feed used by Medicaid reimbursement).
  • Insurance comparison sites — feasibility flags plus state rate tables where live quotes are gated.

Next steps