search_tests
catalogSearch TestWell's public catalog of cash-pay lab tests and panels by keyword, biomarker, CPT code, or category. Returns name, slug, per-lab prices, sample, fasting, turnaround and order URL. Prices are stickers; every order adds one $6 lab processing fee (see quote_order for all-in totals).
| Field | Type | Description |
|---|
| query* | string | Keyword, biomarker, CPT code or health goal, e.g. 'vitamin d', 'TSH', '80053', 'cholesterol' |
| type | test | panel | Restrict to individual tests or bundled panels |
| category | string | Catalog category, e.g. 'Thyroid', 'Heart Health' |
| orderableOnly | boolean | Exclude items listed as coming soon (default true) |
| limit | integer | Max results (default 10) |
| lang | en | es | Return Spanish names/descriptions where a translation exists (default en) |
POST /api/agent/search_tests
{
"query": "vitamin d"
}get_test
catalogFull public detail for one TestWell test or panel by slug or id: description, biomarkers, CPT, per-lab prices, labs, fasting/prep, turnaround, included tests (panels), FAQ, related conditions, order URL and a Markdown page URL.
| Field | Type | Description |
|---|
| slug* | string | Catalog slug (from search_tests) or id, e.g. 'tsh', 'general-wellness-panel' |
| lang | en | es | Spanish prose where a translation exists (default en) |
POST /api/agent/get_test
{
"slug": "general-wellness-panel"
}list_panels
catalogList TestWell's bundled panels (multi-test packages priced below the sum of their tests), optionally filtered by category or maximum price. Sorted by price.
| Field | Type | Description |
|---|
| category | string | Catalog category, e.g. 'Hormones', 'General Health' |
| maxPrice | number | Only panels at or under this sticker price (USD) |
| limit | integer | Max results (default 25) |
POST /api/agent/list_panels
{
"maxPrice": 100
}recommend_tests
catalogSuggest TestWell panels and tests for stated health goals (e.g. 'annual checkup', 'heart health', 'TRT monitoring') and/or symptoms (e.g. 'fatigue', 'hair loss'). Prefers a curated pre-built panel when one fits; otherwise assembles individual tests within a budget. Educational matching, not a diagnosis.
| Field | Type | Description |
|---|
| goals | array | Health goals, e.g. ['energy', 'thyroid'] |
| symptoms | array | Symptoms, e.g. ['always cold', 'weight gain'] |
| budget | low | medium | high | no_limit | Budget band: low ≈ $80, medium ≈ $200, high ≈ $400 |
POST /api/agent/recommend_tests
{
"goals": [
"annual checkup"
],
"budget": "low"
}quote_order
quotePrice a set of tests/panels exactly as TestWell's checkout would: per-lab prices for the user's state (New York and New Jersey route to BioReference; Rhode Island is not served), the single $6 lab processing fee, the total, items that can't be ordered and why, and a prefilled cart URL. Use this before quoting any total to a user.
| Field | Type | Description |
|---|
| items* | array | Catalog slugs or ids, e.g. ['tsh', 'vitamin-d'] |
| state | string | US state code or name where the user will be drawn, e.g. 'FL' or 'Florida' |
| lab | quest | labcorp | bioreference | Preferred lab outside NY/NJ (default quest) |
POST /api/agent/quote_order
{
"items": [
"tsh",
"vitamin-d"
],
"state": "FL",
"lab": "quest"
}find_draw_sites
locationsFind Quest Diagnostics, Labcorp and BioReference patient service centers near a US ZIP code, with address, distance, phone and hours. Walk-ins are accepted at most sites; the requisition arrives by email after physician authorization.
| Field | Type | Description |
|---|
| zip* | string | 5-digit US ZIP code |
| radiusMiles | integer | Search radius in miles (snapped to 10/20/25/50/100; default 25) |
| lab | quest | labcorp | bioreference | Limit to one lab |
| limit | integer | Max sites (default 10) |
POST /api/agent/find_draw_sites
{
"zip": "33301",
"radiusMiles": 10
}lookup_reference_range
referencePhysician-reviewed reference range for a blood test marker (130+ markers), filtered by sex and age when they matter, with what high and low values suggest, retest cadence, how to get tested, cited sources and the review date. Educational; the user's own report range takes precedence.
| Field | Type | Description |
|---|
| marker* | string | Marker name or alias, e.g. 'TSH', 'ferritin', 'HbA1c', 'LDL' |
| sex | male | female | |
| age | integer | |
| pregnancy | boolean | |
| postmenopausal | boolean | |
POST /api/agent/lookup_reference_range
{
"marker": "ferritin",
"sex": "female",
"age": 34
}compare_prices
compareFor one blood test, the all-in single-test price (sticker + per-order fees) at TestWell and at every tracked direct-to-consumer provider with a verified equivalent — JustLabs, Quest, Labcorp OnDemand, Ulta Lab Tests, Walk-In Lab, HealthLabs and more — each with the date it was verified, plus typical hospital self-pay and Quest Direct reference prices. States the multi-test caveat (fees are paid once per order). Source: the TestWell Blood Test Price Index (CC BY 4.0).
| Field | Type | Description |
|---|
| test* | string | Test slug or name, e.g. 'tsh', 'lipid panel', 'vitamin-d' |
POST /api/agent/compare_prices
{
"test": "tsh"
}interpret_results
referenceFlag each pasted lab value as low / normal / high against TestWell's physician-reviewed reference catalog (130+ markers; sex- and age-specific bands where they exist), with the reviewed 'what high/low suggests' copy, retest guidance, cited sources and links to the marker's page and, where one exists, its high/low interpretation page. Stateless — values are not stored or logged. Educational, not a diagnosis; the user's own report range takes precedence.
| Field | Type | Description |
|---|
| values* | array | Results to explain, e.g. [{marker:'TSH', value:5.2, unit:'mIU/L'}, {marker:'ferritin', value:12}] |
| sex | male | female | |
| age | integer | |
| pregnancy | boolean | |
| postmenopausal | boolean | |
POST /api/agent/interpret_results
{
"values": [
{
"marker": "TSH",
"value": 5.2,
"unit": "mIU/L"
},
{
"marker": "ferritin",
"value": 12,
"unit": "ng/mL"
}
],
"sex": "female",
"age": 34
}convert_units
referenceConvert a lab value between US conventional and SI units for 30 common analytes (glucose, cholesterol, testosterone, vitamin D, …) using published factors; hemoglobin A1c uses the NGSP↔IFCC master equation and also returns estimated average glucose.
| Field | Type | Description |
|---|
| analyte* | string | Analyte slug or name, e.g. 'glucose', 'total-cholesterol', 'testosterone', 'vitamin-d', 'a1c' |
| value* | number | The numeric value to convert |
| direction | toSI | toConventional | Default toSI (US → SI) |
POST /api/agent/convert_units
{
"analyte": "glucose",
"value": 100
}calculate_free_testosterone
referenceCalculate free and bioavailable testosterone from total testosterone, SHBG and albumin using the Vermeulen (1999) mass-action equation — the method behind lab-reported 'calculated free testosterone'. Educational; not a diagnosis.
| Field | Type | Description |
|---|
| totalT* | number | Total testosterone |
| totalTUnit | ng/dL | nmol/L | Default ng/dL |
| shbg* | number | SHBG in nmol/L |
| albuminGdL | number | Albumin in g/dL (default 4.3) |
POST /api/agent/calculate_free_testosterone
{
"totalT": 450,
"shbg": 35
}compare_provider
compareHonest side-by-side of TestWell and another direct-to-consumer lab service (Quest Direct, Labcorp OnDemand, Function Health, JustLabs, Ulta Lab Tests, …): pricing model, per-order fees, labs, turnaround, where each wins, spot prices on common tests as sticker AND all-in, with verification dates and sources. Call with no argument to list the providers covered.
| Field | Type | Description |
|---|
| provider | string | Competitor slug or name, e.g. 'quest-direct', 'Function Health', 'justlabs' |
POST /api/agent/compare_provider
{
"provider": "justlabs"
}get_guide
contentReturn one of TestWell's educational pages as Markdown: guides (/guides/<slug>), condition workups (/conditions/<slug>), test decision guides (/answers/<slug>), biomarker pages (/biomarkers/<slug>), state pages (/lab-locations/<slug>) or comparisons (/compare/<slug>). Call with no path to list the available guides and conditions.
| Field | Type | Description |
|---|
| path | string | Site path, e.g. '/guides/annual-blood-work' or 'conditions/anemia' |
| lang | en | es | Spanish version when one exists (default en) |
POST /api/agent/get_guide
{
"path": "/guides/tb-blood-test-vs-skin-test"
}