# CMS Medicare Inpatient DRG Hospital Averages

> CMS Medicare Inpatient DRG Hospital Averages is a paid API for AI agents from api.healthtravel-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Returns CMS Medicare fee-for-service Part A inpatient hospital-level averages (discharges, submitted charges, total payments, Medicare payments) for a given MS-DRG code, optionally filtered by state.

## Facts

- Endpoint: GET https://api.healthtravel-api.workers.dev/api/health/medicare-inpatient-drg?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cms-medicare-inpatient-drg-hospital-averages-8afeccc0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vWCdtExHkFqZBExSTRMC_

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 cms-medicare-inpatient-drg-hospital-averages-8afeccc0
```

Example prompt: Pull CMS Medicare inpatient hospital averages for MS-DRG code 871 in Florida — show me up to 10 hospitals with their average submitted charges and Medicare payments.

## When to prefer this

Use this endpoint when you need hospital-level Medicare inpatient billing and payment averages for a specific MS-DRG code — ideal for healthcare cost research, price transparency analysis, hospital benchmarking, or policy work. Prefer this over IPPS national rate tables when you need actual per-hospital averages rather than CMS-set rates, and over general hospital lookup endpoints when you need DRG-specific financial data.

## Known failure modes

- Invalid or non-existent DRG code returns empty results or an error
- Invalid state code (not a 2-letter US abbreviation) may return an error or no results
- DRG codes with very few hospital submissions may return fewer rows than requested
- max parameter outside 1–20 range may be clamped or rejected
- Network or upstream CMS data availability issues causing a 500 error

## How this service works

CMS Medicare inpatient hospital averages per MS-DRG (data.cms.gov, fee-for-service Part A): hospital name, state, DRG code and description, discharges, average submitted charge, average total payment and average Medicare payment. Hospital-level averages, not the IPPS national rate table. Filter by 3-digit DRG code and optional state; up to 20 rows.

## Output

Returns up to 20 rows of hospital-level data including: hospital name, state, MS-DRG code and description, number of discharges, average submitted charge, average total payment, and average Medicare payment — sourced from CMS fee-for-service Part A data on data.cms.gov.

## 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": [
      "drg"
     ],
     "properties": {
      "drg": {
       "type": "string",
       "description": "3-digit MS-DRG code, e.g. 871"
      },
      "max": {
       "type": "string",
       "description": "How many rows, 1 to 20 (default 5)"
      },
      "state": {
       "type": "string",
       "description": "Two-letter state code, optional"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cms-medicare-inpatient-drg-hospital-averages-8afeccc0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.healthtravel-api.workers.dev](https://www.zero.xyz/host/api.healthtravel-api.workers.dev/llms.txt)
