{
  "openapi": "3.0.1",
  "info": {
    "title": "Hospital Price & Charity Care Finder",
    "description": "Give it a hospital website and billing codes. Finds the hospital's CMS price transparency file and streams it for your codes, then finds its financial assistance policy and extracts the free and discounted care income limits, with quoted evidence.",
    "version": "0.2",
    "x-build-id": "1bgthD1DGdof0kVa1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/enterprising_arboretum_iq2~hospital-price-and-charity-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-enterprising_arboretum_iq2-hospital-price-and-charity-finder",
        "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/enterprising_arboretum_iq2~hospital-price-and-charity-finder/runs": {
      "post": {
        "operationId": "runs-sync-enterprising_arboretum_iq2-hospital-price-and-charity-finder",
        "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/enterprising_arboretum_iq2~hospital-price-and-charity-finder/run-sync": {
      "post": {
        "operationId": "run-sync-enterprising_arboretum_iq2-hospital-price-and-charity-finder",
        "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": {
          "hospitalUrl": {
            "title": "Hospital website",
            "type": "string",
            "description": "The hospital's homepage (or any page on its site). The Actor looks for /cms-hhs-pricetransparency.txt on the root domain, then crawls the site for price transparency and financial assistance pages. Leave empty when you pass a list of hospitals below."
          },
          "hospitalName": {
            "title": "Hospital name",
            "type": "string",
            "description": "Optional. Helps pick the right file when a health system publishes several hospitals, and is used to look the hospital up in California's HCAI Hospital Fair Billing policy registry. If empty, the name is taken from the price file or page title."
          },
          "codes": {
            "title": "Billing codes",
            "type": "array",
            "description": "CPT / HCPCS codes (or MS-DRG, NDC, etc.) to look up in the price file, e.g. 99284 (ER visit, level 4) and 80053 (comprehensive metabolic panel).",
            "items": {
              "type": "string"
            }
          },
          "mrfUrl": {
            "title": "Price file URL (optional)",
            "type": "string",
            "description": "If you already know the hospital's machine-readable standard charges file, put its URL here. The Actor skips the search and streams it directly; the site crawl then only looks for assistance pages and a phone number."
          },
          "maxMrfMB": {
            "title": "Max price file download (MB)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop streaming the price file after this many megabytes (uncompressed bytes received). Large systems publish files of several hundred MB; the Actor stops early anyway once all codes are found.",
            "default": 300
          },
          "maxCrawlPages": {
            "title": "Max pages to crawl",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Limit for the hospital-site crawl that looks for price transparency and financial assistance pages.",
            "default": 30
          },
          "useHcaiRegistry": {
            "title": "Use California HCAI policy registry",
            "type": "boolean",
            "description": "Also look the hospital up in the State of California's Hospital Fair Pricing Policy Lookup (HCAI), where every CA hospital must file its charity care and discount payment policies. Recommended for California hospitals.",
            "default": true
          },
          "hospitals": {
            "title": "Hospitals (batch)",
            "type": "array",
            "description": "Check many hospitals in one run. Each entry is an object with hospitalUrl and optional hospitalName, mrfUrl, codes and key (your own ID, copied to the output). Top-level codes and limits apply to every entry unless the entry sets its own. One dataset item per hospital; a site that fails gets an item with an error field instead of failing the run."
          },
          "maxConcurrency": {
            "title": "Hospitals at once",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Batch mode: how many hospitals to check in parallel.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}