{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Form 4 Transactions – Evidence & Amendments API",
    "description": "Normalize official SEC Form 4 and 4/A Ownership XML into source-linked Table I/II transaction rows with stable IDs, reporting owners, codes, footnotes, Rule 10b5-1 fields, conservative amendment links, and stateless cursors.",
    "version": "0.1",
    "x-build-id": "Jspgps6VGxhjqh7Jt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bb-tradetec~sec-form4-transaction-normalizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bb-tradetec-sec-form4-transaction-normalizer",
        "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/bb-tradetec~sec-form4-transaction-normalizer/runs": {
      "post": {
        "operationId": "runs-sync-bb-tradetec-sec-form4-transaction-normalizer",
        "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/bb-tradetec~sec-form4-transaction-normalizer/run-sync": {
      "post": {
        "operationId": "run-sync-bb-tradetec-sec-form4-transaction-normalizer",
        "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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Issuer, owner, or accession queries",
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "description": "Every requestId is returned on matching rows. Do not put secrets, email addresses, or personal free text in requestId.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "requestId",
                "scope",
                "identifierType",
                "identifier"
              ],
              "properties": {
                "requestId": {
                  "title": "Request ID",
                  "description": "Caller-defined stable correlation ID returned on every matching transaction.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9._:-]+$"
                },
                "scope": {
                  "title": "Query scope",
                  "description": "Resolve filings by issuer, exact reporting-owner CIK, or direct accession.",
                  "type": "string",
                  "enum": [
                    "issuer",
                    "reportingOwner",
                    "accessionNumber"
                  ]
                },
                "identifierType": {
                  "title": "Identifier type",
                  "description": "Exact identifier semantics allowed by the selected scope.",
                  "type": "string",
                  "enum": [
                    "ticker",
                    "cik",
                    "companyName",
                    "accessionNumber"
                  ]
                },
                "identifier": {
                  "title": "Exact identifier",
                  "description": "Ticker, CIK, exact SEC issuer name, or exact accession number.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "issuerCik": {
                  "title": "Issuer CIK for direct accession lookup",
                  "description": "Required only for accessionNumber scope. The accession prefix can identify a filing agent rather than the issuer.",
                  "type": "string",
                  "pattern": "^\\d{1,10}$"
                }
              }
            },
            "default": [
              {
                "requestId": "apple-insiders",
                "scope": "issuer",
                "identifierType": "ticker",
                "identifier": "AAPL"
              }
            ]
          },
          "filedFrom": {
            "title": "Filed from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD lower bound."
          },
          "filedTo": {
            "title": "Filed to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD upper bound."
          },
          "transactionCodes": {
            "title": "SEC transaction-code filter",
            "maxItems": 32,
            "uniqueItems": true,
            "type": "array",
            "description": "Exact raw one-letter SEC codes. Empty means all codes; codes are not converted into buy/sell signals.",
            "items": {
              "type": "string",
              "pattern": "^[A-Z]$"
            },
            "default": []
          },
          "acquiredDisposed": {
            "title": "Acquired/disposed filter",
            "maxItems": 2,
            "uniqueItems": true,
            "type": "array",
            "description": "A and D remain independent from transaction-code descriptions. Empty means both.",
            "items": {
              "type": "string",
              "pattern": "^[AD]$"
            },
            "default": []
          },
          "includeDerivatives": {
            "title": "Include Table II derivative transactions",
            "type": "boolean",
            "description": "When false, emit only Table I nonderivative transaction rows.",
            "default": true
          },
          "includeFootnotes": {
            "title": "Include bounded footnote text",
            "type": "boolean",
            "description": "Footnote IDs and component references remain even when text is omitted.",
            "default": true
          },
          "includeAmendments": {
            "title": "Include Form 4/A",
            "type": "boolean",
            "description": "Include amendments as independent source records with conservative original links.",
            "default": true
          },
          "evidenceMaxChars": {
            "title": "Maximum characters per footnote/evidence excerpt",
            "minimum": 240,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard per-footnote and Rule 10b5-1 evidence text bound.",
            "default": 1200
          },
          "maxFilingsPerQuery": {
            "title": "Maximum filings per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Hard bound on matching filing metadata processed for each query.",
            "default": 50
          },
          "maxTransactions": {
            "title": "Maximum unique transaction rows",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Hard global default-dataset and pay-per-event result bound.",
            "default": 100
          },
          "outputSchemaVersion": {
            "title": "Output schema version",
            "enum": [
              "1.0"
            ],
            "type": "string",
            "description": "Published output contract; version 1.0 is currently supported.",
            "default": "1.0"
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "full",
              "compact"
            ],
            "type": "string",
            "description": "compact removes bounded footnote text, not IDs or component references.",
            "default": "full"
          },
          "incremental": {
            "title": "Stateless incremental mode",
            "type": "object",
            "description": "Copy SUMMARY.nextCursor unchanged into the next run. Not compatible with direct accession queries.",
            "properties": {
              "cursor": {
                "title": "Previous cursor",
                "description": "Opaque nextCursor from the preceding SUMMARY; omit for the first incremental run.",
                "type": "string",
                "maxLength": 32768,
                "pattern": "^secf4cur1_[A-Za-z0-9_-]+$"
              },
              "overlapHours": {
                "title": "Overlap hours",
                "description": "Recheck this many hours while stable record IDs suppress duplicates.",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "maximum": 168
              }
            },
            "additionalProperties": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}