{
  "openapi": "3.0.1",
  "info": {
    "title": "CMS Hospital Owners & Control Scraper API",
    "description": "Search CMS Hospital All Owners enrollment associations for ownership and operational/managerial-control evidence. Filter hospitals, owners, roles, percentages, dates, states, and classifications with source-linked caveats. Distinct from CHOW transactions.",
    "version": "0.1",
    "x-build-id": "Lv1JsR5ltzdVCthui"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pink_comic~cms-hospital-owners-control/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pink_comic-cms-hospital-owners-control",
        "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/pink_comic~cms-hospital-owners-control/runs": {
      "post": {
        "operationId": "runs-sync-pink_comic-cms-hospital-owners-control",
        "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/pink_comic~cms-hospital-owners-control/run-sync": {
      "post": {
        "operationId": "run-sync-pink_comic-cms-hospital-owners-control",
        "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": {
          "enrollmentId": {
            "title": "CMS Enrollment ID",
            "type": "string",
            "description": "Exact CMS enrollment identifier.",
            "default": "O20020812000015"
          },
          "associateId": {
            "title": "Hospital Associate ID",
            "type": "string",
            "description": "Exact hospital associate identifier.",
            "default": ""
          },
          "hospitalName": {
            "title": "Hospital Name",
            "type": "string",
            "description": "Case-insensitive hospital organization name substring.",
            "default": ""
          },
          "ownerName": {
            "title": "Owner Name",
            "type": "string",
            "description": "Case-insensitive individual or organization owner name substring.",
            "default": ""
          },
          "ownerType": {
            "title": "Owner Type",
            "enum": [
              "",
              "I",
              "O"
            ],
            "type": "string",
            "description": "CMS owner type: individual (I), organization (O), or all.",
            "default": ""
          },
          "role": {
            "title": "Role",
            "type": "string",
            "description": "Owner role code or role text substring.",
            "default": ""
          },
          "state": {
            "title": "Owner Address State",
            "type": "string",
            "description": "Two-letter owner address state.",
            "default": ""
          },
          "associationDateFrom": {
            "title": "Association Date From",
            "type": "string",
            "description": "Earliest association date, YYYY-MM-DD.",
            "default": ""
          },
          "associationDateTo": {
            "title": "Association Date To",
            "type": "string",
            "description": "Latest association date, YYYY-MM-DD.",
            "default": ""
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "associate_id",
              "owner_name",
              "ownership_percentage_desc",
              "association_date_desc"
            ],
            "type": "string",
            "description": "Deterministic result sort.",
            "default": "associate_id"
          },
          "minOwnershipPercentage": {
            "title": "Minimum Ownership Percentage",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Minimum source-reported ownership percentage, 0-100."
          },
          "maxOwnershipPercentage": {
            "title": "Maximum Ownership Percentage",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Maximum source-reported ownership percentage, 0-100."
          },
          "organizationClassifications": {
            "title": "Organization Classifications",
            "type": "array",
            "description": "Require each selected CMS owner-classification flag to equal Y. Blank is not inferred as false.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxCandidates": {
            "title": "Maximum Candidates",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum CMS source rows scanned before local filters; bounds every query.",
            "default": 25
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Total paid rows returned. Default five costs at most $0.0101 including start.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}