{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR Funding & Exec-Change Monitor — Form D, 8-K",
    "description": "Monitor SEC EDGAR for two high-value GTM intent signals: new Form D filings (a company just raised private capital — with amount, industry & named principals) and 8-K Item 5.02 (exec changes). Filter by state, industry & amount; schedule it for new-filing alerts via Slack, email or webhook.",
    "version": "0.1",
    "x-build-id": "w0c4OXQv4jgP3rgTv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~sec-edgar-gtm-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-sec-edgar-gtm-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/scrapersdelight~sec-edgar-gtm-monitor/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-sec-edgar-gtm-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/scrapersdelight~sec-edgar-gtm-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-sec-edgar-gtm-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": {
          "signalTypes": {
            "title": "Signal types",
            "type": "array",
            "description": "Which intent signals to collect. 'funding' = new Form D private raises; 'exec_change' = 8-K Item 5.02 officer/director changes.",
            "default": [
              "funding",
              "exec_change"
            ],
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Filing-date window start. Leave empty to use today minus 'Lookback days'."
          },
          "dateTo": {
            "title": "Date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Filing-date window end. Leave empty for today."
          },
          "lookbackDays": {
            "title": "Lookback days",
            "minimum": 1,
            "type": "integer",
            "description": "When no explicit 'Date from' is given, scan filings from the last N days. Great for a daily monitor.",
            "default": 7
          },
          "states": {
            "title": "States (business location)",
            "type": "array",
            "description": "Optional. Limit to filers whose business location is in these states (e.g. ['CA','NY']). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword filter",
            "type": "string",
            "description": "Optional EDGAR full-text search term applied to the filings (e.g. a company name or industry word)."
          },
          "includeAmendments": {
            "title": "Include Form D/A amendments",
            "type": "boolean",
            "description": "Funding: also include Form D/A (amendments — often follow-on closes).",
            "default": false
          },
          "industryFilter": {
            "title": "Industry filter (funding)",
            "type": "array",
            "description": "Funding: keep only Form D filings whose industry group contains one of these, e.g. ['Technology','Health Care','Manufacturing'].",
            "items": {
              "type": "string"
            }
          },
          "excludeFunds": {
            "title": "Exclude pooled investment funds",
            "type": "boolean",
            "description": "Funding: drop 'Pooled Investment Fund' filings (PE/VC/hedge funds) so you keep operating-company raises.",
            "default": true
          },
          "minAmountSold": {
            "title": "Min amount sold (funding)",
            "minimum": 0,
            "type": "integer",
            "description": "Funding: keep only raises where the amount already SOLD is at least this (USD). 0 = no minimum.",
            "default": 0
          },
          "minAmountOffered": {
            "title": "Min amount offered (funding)",
            "minimum": 0,
            "type": "integer",
            "description": "Funding: keep only offerings of at least this total (USD). 0 = no minimum.",
            "default": 0
          },
          "fetchAmounts": {
            "title": "Fetch Form D amounts & principals",
            "type": "boolean",
            "description": "Funding: fetch each Form D's primary_doc.xml to add amount offered/sold, industry, and named principals. Turn off for a faster, lighter run.",
            "default": true
          },
          "contactEmail": {
            "title": "Contact email (SEC User-Agent)",
            "type": "string",
            "description": "SEC asks API users to identify themselves. Your email is added to the request User-Agent (recommended)."
          },
          "maxRecords": {
            "title": "Max records per run",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on signals per run. Default 50 keeps runs fast (each Form D is enriched with a separate SEC fetch). Set 0 for no cap (a wide date range can be thousands of filings — give the run plenty of timeout).",
            "default": 50
          },
          "monitorMode": {
            "title": "Monitor mode (new-filing watcher)",
            "type": "boolean",
            "description": "Recurring watcher: diff against the prior run (per filter scope) and output/alert ONLY new filings. Pair with an Apify Schedule.",
            "default": false
          },
          "alertOnNewSignal": {
            "title": "Alert on new signals",
            "type": "boolean",
            "description": "In monitor mode, send an alert for each new filing.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST endpoint for new-signal alerts."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Slack incoming-webhook URL."
          },
          "emailRecipients": {
            "title": "Email recipients",
            "type": "array",
            "description": "Emails for the new-signal digest (via apify/send-mail).",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings. SEC EDGAR works best DIRECT (proxy OFF), identified by your contact email — SEC blocks rotating datacenter proxies, which silently returns 0 results. Leave proxy off unless you specifically need it.",
            "default": {
              "useApifyProxy": false
            }
          },
          "diagnose": {
            "title": "Diagnostic mode (dev)",
            "type": "boolean",
            "description": "Dev only. Logs one funding + one exec-change sample, then exits.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}