{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR Filing Monitor",
    "description": "Change-detection over the live SEC EDGAR filing stream. Maintain a watchlist (CIKs/tickers) and form-type filter (8-K, 4, SC 13D/13G, S-1, 10-K/10-Q); each run emits one record per newly-appeared accession, joined to issuer metadata and event-classified. Keyless. Not endorsed by the SEC.",
    "version": "0.1",
    "x-build-id": "WqkQvJxSXvXNBz6qF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bytehavenstudios~sec-edgar-filing-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bytehavenstudios-sec-edgar-filing-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/bytehavenstudios~sec-edgar-filing-monitor/runs": {
      "post": {
        "operationId": "runs-sync-bytehavenstudios-sec-edgar-filing-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/bytehavenstudios~sec-edgar-filing-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-bytehavenstudios-sec-edgar-filing-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": {
          "ciks": {
            "title": "CIKs to watch",
            "type": "array",
            "description": "SEC Central Index Keys to monitor. Accepts any form — bare number (\"320193\"), zero-padded (\"0000320193\"), or with the CIK prefix; normalized to a 10-digit CIK internally. Combined with 'Tickers' as one watchlist. Empty watchlist = market-wide monitoring by form type only (use with care — high volume).",
            "items": {
              "type": "string"
            }
          },
          "tickers": {
            "title": "Tickers to watch",
            "type": "array",
            "description": "Stock tickers to monitor, e.g. \"AAPL\", \"MSFT\". Resolved to CIKs via SEC's company_tickers.json map. Combined with 'CIKs' as one watchlist. Empty watchlist = market-wide monitoring by form type only.",
            "items": {
              "type": "string"
            }
          },
          "forms": {
            "title": "Form types",
            "type": "array",
            "description": "Restrict to these EDGAR form types, e.g. \"8-K\", \"4\", \"SC 13D\", \"SC 13G\", \"S-1\", \"10-K\", \"10-Q\", \"424B\". Matched against both the exact `form` and the `root_forms` family. Empty = all form types.",
            "items": {
              "type": "string"
            }
          },
          "since": {
            "title": "Filed since (delta cursor)",
            "type": "string",
            "description": "Only fetch filings accepted at or after this date — maps to the EDGAR full-text search `startdt` (YYYY-MM-DD). Accepts YYYY-MM-DD. Leave empty to default to a recent trailing window. Ignored if 'Only new since last run' is on (the stored high-water-mark drives the cursor instead)."
          },
          "until": {
            "title": "Filed until (optional upper bound)",
            "type": "string",
            "description": "Optional upper bound on filing date (maps to EDGAR full-text search `enddt`, YYYY-MM-DD). Leave empty for no upper bound (up to today)."
          },
          "query": {
            "title": "Full-text query (optional)",
            "type": "string",
            "description": "Optional keyword / phrase to pass to EDGAR full-text search (`q`), e.g. \"material agreement\". Wrap a phrase in double quotes. Empty = match all filings (`q=*`) for the watchlist / form filter."
          },
          "monitorNewOnly": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Persist the max acceptance-datetime high-water-mark seen (in the Actor's key-value store) and, on the next run, emit only accessions accepted after it. Turns this Actor into a first-seen new-filing monitor across scheduled runs.",
            "default": false
          },
          "maxResults": {
            "title": "Max filings per run",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the total number of filings returned. 0 = no cap (page until the window is exhausted, honoring EDGAR's 10,000-hit-per-query ceiling by windowing dates).",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The SEC EDGAR endpoints are clean, open, public JSON and need NO proxy. You may enable Apify Proxy only to distribute requests if you run very large historical pulls (stay under SEC's 10 req/s fair-access limit). Default: no proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}