{
  "openapi": "3.0.1",
  "info": {
    "title": "CMS Hospital Price Transparency Negotiated Payer Rates Scraper",
    "description": "Stream and parse CMS v2.0 and v3.0 Hospital Price Transparency Machine-Readable Files (JSON, JSON.gz, and CSV via cms-hpt.txt) to extract negotiated payer rates, cash prices, gross charges, and de-identified min/max rates by CPT, HCPCS, or DRG code.",
    "version": "0.1",
    "x-build-id": "qdbviaRFeLbqP57IH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/groundplanes~cms-hospital-price-transparency-mrf-parser/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-groundplanes-cms-hospital-price-transparency-mrf-parser",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/groundplanes~cms-hospital-price-transparency-mrf-parser/runs": {
      "post": {
        "operationId": "runs-sync-groundplanes-cms-hospital-price-transparency-mrf-parser",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/groundplanes~cms-hospital-price-transparency-mrf-parser/run-sync": {
      "post": {
        "operationId": "run-sync-groundplanes-cms-hospital-price-transparency-mrf-parser",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "billingCodesFilter": {
            "title": "Billing Codes Filter (CPT / HCPCS / DRG)",
            "type": "array",
            "description": "Billing codes to extract. Plain 5-character codes (27447) match CPT or HCPCS records only; letter+4 digits (C1713) match HCPCS; 3 digits match MS-DRG. Use TYPE:CODE (e.g. APR-DRG:540, RC:0450) for anything else. Both the code and its type must match, so DRG, revenue-code and internal chargemaster codes never collide.",
            "default": [
              "27447",
              "45378",
              "70553",
              "99285"
            ],
            "items": {
              "type": "string"
            }
          },
          "hospitalMrfUrlsOrDomains": {
            "title": "Hospital Domains or Direct MRF URLs",
            "type": "array",
            "description": "Hospital root domains (e.g. https://www.uhhospitals.org) whose /cms-hpt.txt pointer file is resolved to standard-charges MRF URLs, or direct URLs to CMS v2.0 and v3.0 .json, .json.gz, .csv (tall or wide) or single-file .zip MRFs.",
            "default": [
              "https://www.uhhospitals.org"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum Total Items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total rows to return across all hospitals in the run. Rows are sorted newest file first (lastUpdatedDate).",
            "default": 5000
          },
          "maxMrfFilesPerDomain": {
            "title": "Maximum MRF Files Per Domain",
            "minimum": 1,
            "type": "integer",
            "description": "Health systems often list one MRF per hospital location in cms-hpt.txt (University Hospitals lists 14 locations covering 13 unique files of about 3.5 GB each). Only the first N unique files per domain are scanned. Direct MRF URLs are always scanned.",
            "default": 1
          },
          "maxRowsPerHospital": {
            "title": "Maximum Rows Per Hospital File",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum matching rows to keep from each hospital MRF file. Honored exactly.",
            "default": 5000
          },
          "maxScanSecondsPerFile": {
            "title": "Maximum Scan Seconds Per File",
            "minimum": 10,
            "maximum": 1800,
            "type": "integer",
            "description": "Streaming time budget per MRF file, capped at 1800 seconds (the 30 minute per-hospital processing cap). Files run from 50 MB to 8 GB; a 3.5 GB CSV takes several minutes to stream end to end. A file that hits the budget stops as a per-hospital PARTIAL naming the cap, and the run status reports rows scanned, matched and delivered plus how many MB of each file were scanned.",
            "default": 1800
          },
          "payerNameKeywords": {
            "title": "Payer Name Keywords",
            "type": "array",
            "description": "Case-insensitive payer name keywords (spaces and punctuation ignored, so 'Blue Cross' also matches 'BlueCross'). Leave empty to include all payers plus cash-only rows.",
            "default": [
              "Aetna",
              "UnitedHealthcare",
              "Cigna",
              "Blue Cross"
            ],
            "items": {
              "type": "string"
            }
          },
          "settingFilter": {
            "title": "Care Setting Filter",
            "enum": [
              "INPATIENT",
              "OUTPATIENT",
              "BOTH"
            ],
            "type": "string",
            "description": "INPATIENT returns inpatient and 'both' charges, OUTPATIENT returns outpatient and 'both' charges, BOTH returns everything.",
            "default": "BOTH"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}