{
  "openapi": "3.0.1",
  "info": {
    "title": "US Hospital & Clinic EHR Tech Enricher (Epic & Cerner)",
    "description": "Enrich US hospitals, health systems, and clinics with verified Epic Systems and Oracle Health (Cerner Millennium & Soarian) EHR deployments, live FHIR R4 endpoints, NPIs, EINs, and go-live deltas via mandatory 21st Century Cures Act / HTI-1 registries.",
    "version": "1.0",
    "x-build-id": "M5yuJb9D9pAfpX8IW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinky_atelier~us-hospital-ehr-tech-enricher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinky_atelier-us-hospital-ehr-tech-enricher",
        "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/zinky_atelier~us-hospital-ehr-tech-enricher/runs": {
      "post": {
        "operationId": "runs-sync-zinky_atelier-us-hospital-ehr-tech-enricher",
        "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/zinky_atelier~us-hospital-ehr-tech-enricher/run-sync": {
      "post": {
        "operationId": "run-sync-zinky_atelier-us-hospital-ehr-tech-enricher",
        "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": {
          "mode": {
            "title": "Operation Mode",
            "enum": [
              "catalog",
              "enrich"
            ],
            "type": "string",
            "description": "Choose 'catalog' to browse/monitor verified Epic & Oracle Health hospitals by state or recency, or 'enrich' to match a batch list of hospital names, domains, or NPIs (automatically switches to 'enrich' if `targets` is populated).",
            "default": "catalog"
          },
          "targets": {
            "title": "Batch Hospitals, Domains, or NPIs to Enrich (Enrich Mode)",
            "type": "array",
            "description": "List of healthcare organizations to match in 'enrich' mode. Accepts hospital/clinic names ('Peconic Bay Medical Center'), name + location ('EverWell Precision Health | Naples, FL'), custom domains ('wacofhc.org', 'kp.org'), or 10-digit NPIs ('1912011511').",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "vendors": {
            "title": "EHR Vendors to Query",
            "type": "array",
            "description": "Select which mandatory Cures Act / HTI-1 vendor registries to include: 'epic' (Epic R4 + Epic User-Access Brands) and/or 'oracle_health' (Oracle Health Millennium Patient/Provider + Soarian Clinicals).",
            "default": [
              "epic",
              "oracle_health"
            ],
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "US State Filter (Optional 2-Letter Codes)",
            "type": "array",
            "description": "Restrict catalog discovery to one or more 2-letter US state/territory codes (e.g. ['TX', 'FL', 'CA', 'NY']). Leave empty for nationwide.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City Filter (Optional)",
            "type": "string",
            "description": "Filter catalog results to a specific city name (case-insensitive, e.g. 'Naples', 'Riverhead')."
          },
          "searchKeyword": {
            "title": "Organization / Health System Keyword Filter (Optional)",
            "type": "string",
            "description": "Case-insensitive keyword filter matched against organization name, parent health system, or domain."
          },
          "goLiveWithinDays": {
            "title": "Endpoint Go-Live / Updated Within Last N Days (Optional)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "When > 0 (e.g. 90 or 180), keeps only records whose `endpointGoLiveDate` or `lastUpdatedDate` falls within the last N days. Leave 0 to include all active deployments.",
            "default": 0
          },
          "includeClinicLocations": {
            "title": "Include Individual Outpatient Clinic Locations (Epic Brands)",
            "type": "boolean",
            "description": "By default (false), Epic's 98,000+ outpatient clinic locations are rolled up onto their parent Health System / Brand (`clinicLocationCount`). Enable to emit individual clinic location rows.",
            "default": false
          },
          "includeUnmatchedTargets": {
            "title": "Include Unmatched Rows in Batch Enrich Output",
            "type": "boolean",
            "description": "In 'enrich' mode, emit unmatched targets with `matched: false` and `ehrVendor: null` for 1-to-1 Clay/CSV alignment. Unmatched rows are NEVER billed a PPE `hospital-enriched` event.",
            "default": true
          },
          "excludeSandboxes": {
            "title": "Exclude Vendor Sandbox / Test Endpoints",
            "type": "boolean",
            "description": "Filter out non-production test/sandbox organizations (e.g. 'Public Sandbox', 'Test Harness').",
            "default": true
          },
          "onlyNew": {
            "title": "Only Emit New or Changed Endpoints (Stateful SEEN_ENDPOINTS Delta)",
            "type": "boolean",
            "description": "Persists seen records in the `SEEN_ENDPOINTS` Key-Value Store across scheduled runs and emits only `NEW_ENDPOINT` or `UPDATED_ENDPOINT` deployments.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum Records to Emit",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of hospital/clinic records emitted in this run.",
            "default": 50
          },
          "maxEpicBrandsEntries": {
            "title": "Max Epic Brands Bundle Entries to Stream",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Bounds streaming over Epic's 97 MB (100,165-entry) Brands bundle for fast sub-10s runs while preserving low RAM (< 150 MB). Set to 0 to stream the entire 100k+ entry bundle.",
            "default": 15000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}