---
title: "Compare all-in prices across providers for a test"
method: POST
path: "/api/agent/compare_prices"
tags: ["compare"]
---

# Compare all-in prices across providers for a test

`POST /api/agent/compare_prices`

## Request

- Base URL: `https://www.test-well.com`
- URL: `https://www.test-well.com/api/agent/compare_prices`
- Auth: none declared

For 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…

## Request body

- object
  - `test` string, required: Test slug or name, e.g. 'tsh', 'lipid panel', 'vitamin-d'

## Response `200`

Tool result

- object
  - `tool` 'compare_prices', required
  - `result` object, required
    - `found` boolean
    - `test` object
      - `name` string
      - `slug` string
      - `cpt` string, nullable
      - `category` string
    - `cheapestSingleTestAllIn` object
      - `provider` string
      - `providerName` string
      - `sticker` number: USD
      - `perOrderFees` number: USD
      - `allIn` number: Sticker + that provider's per-order fees, one test ordered alone
      - `pricedAt` string: Date the price was verified (YYYY-MM-DD)
      - `url` string
      - `note` string, nullable
    - `providers` object[]: Sorted by all-in price, TestWell included
      - `provider` string
      - `providerName` string
      - `sticker` number: USD
      - `perOrderFees` number: USD
      - `allIn` number: Sticker + that provider's per-order fees, one test ordered alone
      - `pricedAt` string: Date the price was verified (YYYY-MM-DD)
      - `url` string
      - `note` string, nullable
    - `reference` object
      - `hospitalTypical` number, nullable: USD
      - `questDirect` number, nullable: USD
    - `caveats` string[]
    - `dataset` string: Absolute https URL on test-well.com
    - `methodology` string
    - `license` string
    - `query` string
    - `hint` string

## Other responses

- `400`: Invalid input
- `429`: Rate limited

---

[API](https://skmtc.dev/test-well/apis/testwell-agent-api.md) · [All operations](https://skmtc.dev/test-well/apis/testwell-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/test-well/apis/testwell-agent-api/revisions/6e260731dfa4?raw)
