{
  "openapi": "3.0.1",
  "info": {
    "title": "⚖️ HHS Data Breach Scraper",
    "description": "Extract newly reported HIPAA security incidents from the HHS Wall of Shame. Target fresh legal leads and cybersecurity prospects using exact breach counts and entity details.",
    "version": "0.1",
    "x-build-id": "jojmTqXNhflEJHOhh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~data-breach-disclosure-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-data-breach-disclosure-monitor",
        "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/taroyamada~data-breach-disclosure-monitor/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-data-breach-disclosure-monitor",
        "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/taroyamada~data-breach-disclosure-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-data-breach-disclosure-monitor",
        "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": {
          "lookbackDays": {
            "title": "Lookback window (days)",
            "minimum": 1,
            "maximum": 730,
            "type": "integer",
            "description": "How many days back from today to include breach submissions. Breaches submitted before this window are ignored. Default 30 gives a rolling monthly view.",
            "default": 30
          },
          "entityKeywords": {
            "title": "Entity name keywords (optional filter)",
            "type": "string",
            "description": "Comma-separated keywords to filter breaches by covered entity name. Case-insensitive substring match. Leave empty to include all breaches in the window.",
            "default": ""
          },
          "stateFilter": {
            "title": "US State filter (optional)",
            "type": "string",
            "description": "Comma-separated two-letter US state codes to filter breaches (e.g. 'CA,TX,NY'). Leave empty to include all states.",
            "default": ""
          },
          "minIndividualsAffected": {
            "title": "Minimum individuals affected",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Only include breaches affecting at least this many individuals. The HHS portal only lists breaches affecting 500+, so values below 500 have no effect.",
            "default": 500
          },
          "maxBreachesInEvidence": {
            "title": "Max breaches in evidence array",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of individual breach records to include in the evidence array. Keeps output manageable.",
            "default": 50
          },
          "watchTerms": {
            "title": "Watch terms (action signal)",
            "type": "string",
            "description": "Comma-separated terms that trigger actionNeeded=true when found in breach entity names or breach types. Use for competitor names, vendor names, or breach types of concern.",
            "default": ""
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "HTTP timeout for the HHS portal request.",
            "default": 45
          },
          "delivery": {
            "title": "Delivery mode",
            "enum": [
              "dataset",
              "webhook"
            ],
            "type": "string",
            "description": "dataset: write digest to Apify dataset. webhook: POST digest to a URL.",
            "default": "dataset"
          },
          "datasetMode": {
            "title": "Dataset filter",
            "enum": [
              "all",
              "changes_only",
              "action_needed"
            ],
            "type": "string",
            "description": "all: always emit the digest row. changes_only: only when new breaches appeared since last run. action_needed: only when actionNeeded=true.",
            "default": "all"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Required when delivery=webhook. Receives the full digest payload as JSON POST."
          },
          "notifyOnNoChange": {
            "title": "Notify even when nothing changed",
            "type": "boolean",
            "description": "When false, webhook delivery is skipped if no new breaches since last run.",
            "default": false
          },
          "snapshotKey": {
            "title": "Snapshot key (recurring monitor)",
            "type": "string",
            "description": "Stable key for run-to-run state. Keep constant across runs for change detection.",
            "default": "hhs-breach-monitor-snapshots"
          },
          "nowIso": {
            "title": "Override current time (ISO 8601)",
            "type": "string",
            "description": "Optional deterministic timestamp for testing. Leave empty for real runs."
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "When true, no snapshots are saved and no webhook is fired.",
            "default": false
          },
          "maxChargeUsd": {
            "title": "Maximum charge (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Safety cap for billable dataset rows in this run.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}