# Hospital Posted Prices by Billing Code and Location

> Hospital Posted Prices by Billing Code and Location is a paid API for AI agents from data.spencermcw.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-22).

Returns posted hospital prices for a single billing code (CPT, HCPCS, or MS-DRG) near a US ZIP code or lat/lon point

## Facts

- Endpoint: GET https://data.spencermcw.com/v1/hospital/prices?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hospital-posted-prices-by-billing-code-and-location-ed009272
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_i_mPboVcF7Q9dzDbLvrUG

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability hospital-posted-prices-by-billing-code-and-location-ed009272
```

Example prompt: What do hospitals near ZIP 90210 charge for CPT code 99213 as an outpatient facility visit — give me up to 10 results for commercial insurance plans within 25 miles.

## When to prefer this

Use this endpoint when you need to look up real posted or negotiated hospital prices for a specific billing code near a geographic location. Ideal for healthcare cost transparency tools, insurance comparison apps, patient cost estimators, and price shopping agents. Prefer this over general web search when you need structured, machine-readable price data sourced directly from hospital machine-readable files (MRFs). Use the companion 'one billing code across named hospitals' endpoint when you have specific hospital names rather than a location radius.

## Known failure modes

- Missing required 'code' parameter returns validation error
- Invalid ZIP code format (not 5 digits) returns schema error
- Neither zip nor lat/lon provided may return empty or error response
- Billing code not found in any hospital MRF files returns empty hospitals list
- Radius too large (over 100 miles) rejected by schema validation
- Unknown code_type or plan_type enum value returns validation error
- ZIP code in a region with no hospital MRF data returns zero results

## How this service works

Posted hospital prices for one billing code near a US ZIP code or point

## Output

Returns a structured object containing code metadata (type, description, DRG info), applied location and filters, counts of hospitals in radius with and without price files, a list of individual hospital price rows with negotiated rates by payer and plan type, and summary statistics across all found prices.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "code"
     ],
     "properties": {
      "lat": {
       "type": "number",
       "maximum": 90,
       "minimum": -90
      },
      "lon": {
       "type": "number",
       "maximum": 180,
       "minimum": -180
      },
      "zip": {
       "type": "string",
       "pattern": "^\\d{5}$"
      },
      "code": {
       "type": "string",
       "pattern": "^[0-9A-Za-z]{3,5}$"
      },
      "plan": {
       "type": "string",
       "maxLength": 80,
       "minLength": 2
      },
      "limit": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1
      },
      "payer": {
       "type": "string",
       "pattern": "^[a-z0-9_]{2,40}$"
      },
      "setting": {
       "enum": [
        "inpatient",
        "outpatient"
       ],
       "type": "string"
      },
      "code_type": {
       "enum": [
        "CPT",
        "HCPCS",
        "MS-DRG"
       ],
       "type": "string"
      },
      "plan_type": {
       "enum": [
        "commercial",
        "medicare_advantage",
        "medicaid",
        "medicare",
        "exchange",
        "tricare",
        "va",
        "workers_comp",
        "auto",
        "supplemental",
        "other",
        "unspecified"
       ],
       "type": "string"
      },
      "radius_miles": {
       "type": "number",
       "maximum": 100,
       "exclusiveMinimum": 0
      },
      "billing_class": {
       "enum": [
        "facility",
        "professional"
       ],
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "code",
        "location",
        "filters",
        "hospitals_in_radius",
        "hospitals_with_file",
        "hospitals_with_prices",
        "hospitals",
        "summary"
       ],
       "properties": {
        "code": {
         "type": "ob
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hospital-posted-prices-by-billing-code-and-location-ed009272/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data.spencermcw.com](https://www.zero.xyz/host/data.spencermcw.com/llms.txt)
