{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC 8-K Material-Event Watch",
    "version": "0.1",
    "x-build-id": "xW1N2g3azzXx5wNko"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexgenwatch~sec-8k-event-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexgenwatch-sec-8k-event-watch",
        "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/nexgenwatch~sec-8k-event-watch/runs": {
      "post": {
        "operationId": "runs-sync-nexgenwatch-sec-8k-event-watch",
        "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/nexgenwatch~sec-8k-event-watch/run-sync": {
      "post": {
        "operationId": "run-sync-nexgenwatch-sec-8k-event-watch",
        "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": {
          "watchedIssuers": {
            "title": "Watched issuers (CIK or ticker)",
            "type": "array",
            "description": "Issuers to monitor, each an SEC CIK (e.g. '320193' or 'CIK0000320193') or an exchange ticker (e.g. 'AAPL'). Tickers are resolved against SEC's public company_tickers.json.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "watchMode": {
            "title": "Watch mode (seed-zero delta feed)",
            "type": "boolean",
            "description": "When true, seed a private baseline and emit only post-baseline new 8-K deltas (first run emits zero). When false, emit snapshot issuer_8k_filing rows.",
            "default": true
          },
          "baselineKey": {
            "title": "Baseline key",
            "type": "string",
            "description": "Named watch baseline (1-120 chars, [A-Za-z0-9._:-]). Null derives a SHA-256 of the normalized filters."
          },
          "includeAmendments": {
            "title": "Include 8-K/A amendments",
            "type": "boolean",
            "description": "Whether 8-K/A amendment filings qualify alongside 8-K.",
            "default": true
          },
          "itemCodes": {
            "title": "Item codes (match-any)",
            "type": "array",
            "description": "Keep only 8-Ks reporting at least one of these official item codes (e.g. '1.01', '2.02', '5.02'). Empty keeps all. Filed item codes are always preserved.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "sinceDate": {
            "title": "Since date (YYYY-MM-DD)",
            "type": "string",
            "description": "Earliest 8-K filed date to include. Null uses lookbackDays from today."
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "When sinceDate is null, include 8-Ks filed within this many days of today.",
            "default": 30
          },
          "emitDeltaTypes": {
            "title": "Emit delta types",
            "type": "array",
            "description": "Which watch-mode delta types to emit.",
            "items": {
              "type": "string",
              "enum": [
                "MATERIAL_EVENT",
                "MATERIAL_EVENT_AMENDMENT"
              ]
            },
            "default": [
              "MATERIAL_EVENT",
              "MATERIAL_EVENT_AMENDMENT"
            ]
          },
          "maxIssuers": {
            "title": "Max issuers",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum watched issuers to process this run.",
            "default": 50
          },
          "maxFilingsPerIssuer": {
            "title": "Max filings per issuer",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum matching 8-K/8-K/A filings to keep per issuer this run.",
            "default": 100
          },
          "secUserAgent": {
            "title": "SEC User-Agent (contact)",
            "type": "string",
            "description": "Descriptive User-Agent with a real contact, e.g. 'NexGenData 8KWatch/1.0 you@example.org'. Required by SEC fair-access. Falls back to the SEC_USER_AGENT env var."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}