{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Filing Change Detector – 10-K/10-Q Evidence API",
    "description": "Compare official SEC 10-K or 10-Q filings by canonical narrative section. Get deterministic change hunks, bounded old/new evidence, stable IDs, direct filing links, partial errors, and stateless cursors without AI summaries or materiality claims.",
    "version": "0.1",
    "x-build-id": "cXff4szdeY6GHi5cc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bb-tradetec~sec-filing-change-detector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bb-tradetec-sec-filing-change-detector",
        "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-filing-change-detector/runs": {
      "post": {
        "operationId": "runs-sync-bb-tradetec-sec-filing-change-detector",
        "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-filing-change-detector/run-sync": {
      "post": {
        "operationId": "run-sync-bb-tradetec-sec-filing-change-detector",
        "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 or explicit filing-pair queries",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Use unique requestId values. Accession queries require cik and baselineAccessionNumber. Do not place secrets, email addresses, or personal text in requestId.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "requestId",
                "identifierType",
                "identifier"
              ],
              "properties": {
                "requestId": {
                  "title": "Request ID",
                  "description": "Stable caller correlation ID returned in requestIds.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9._:-]+$"
                },
                "identifierType": {
                  "title": "Identifier type",
                  "description": "Exact issuer lookup type or exact new-filing accession.",
                  "type": "string",
                  "enum": [
                    "ticker",
                    "cik",
                    "companyName",
                    "accessionNumber"
                  ]
                },
                "identifier": {
                  "title": "Ticker, CIK, exact company name, or new accession",
                  "description": "Bounded exact identifier; no fuzzy matching is performed.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "cik": {
                  "title": "Issuer CIK for explicit accessions",
                  "description": "Required issuer CIK only for accessionNumber queries.",
                  "type": "string",
                  "pattern": "^\\d{1,10}$"
                },
                "baselineAccessionNumber": {
                  "title": "Baseline accession for explicit pair",
                  "description": "Exact old accession required only for accessionNumber queries.",
                  "type": "string",
                  "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
                }
              }
            },
            "default": [
              {
                "requestId": "apple-risk-yoy",
                "identifierType": "ticker",
                "identifier": "AAPL"
              }
            ]
          },
          "forms": {
            "title": "Root forms",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "type": "array",
            "description": "10-K and/or 10-Q. Amendments follow includeAmendments.",
            "items": {
              "type": "string",
              "pattern": "^10-[KQ]$"
            },
            "default": [
              "10-K"
            ]
          },
          "sections": {
            "title": "Canonical sections",
            "minItems": 1,
            "maxItems": 7,
            "uniqueItems": true,
            "type": "array",
            "description": "Unsupported sections are never reinterpreted. They produce explicit warnings; a pair with no selected section on either side produces no charged row.",
            "items": {
              "type": "string",
              "pattern": "^(business|risk_factors|cybersecurity|legal_proceedings|mda|market_risk|controls)$"
            },
            "default": [
              "risk_factors",
              "mda",
              "controls"
            ]
          },
          "comparisonBasis": {
            "title": "Baseline rule",
            "enum": [
              "previous_comparable_period",
              "previous_filing",
              "amendment_original"
            ],
            "type": "string",
            "description": "Comparable prior-year period, immediately prior root-form filing, or original for amendments. Explicit accession pairs are reported as explicit_accessions.",
            "default": "previous_comparable_period"
          },
          "includeAmendments": {
            "title": "Include 10-K/A and 10-Q/A as new filings",
            "type": "boolean",
            "description": "When false, amendments cannot be selected as the new filing.",
            "default": false
          },
          "filedFrom": {
            "title": "New filing filed from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD."
          },
          "filedTo": {
            "title": "New filing filed to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Inclusive YYYY-MM-DD."
          },
          "includeUnchangedSections": {
            "title": "Return unchanged sections",
            "type": "boolean",
            "description": "Unchanged sections are always counted; enable to include their section objects.",
            "default": false
          },
          "evidenceMaxChars": {
            "title": "Evidence characters per old/new side",
            "minimum": 500,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard maximum for each returned old or new hunk excerpt.",
            "default": 2000
          },
          "maxChangeHunksPerSection": {
            "title": "Maximum hunks per section",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard returned-hunk limit; full pre-limit counts remain visible.",
            "default": 50
          },
          "maxComparisons": {
            "title": "Maximum unique comparison rows",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Hard run output and pay-per-event bound.",
            "default": 5
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "full",
              "compact"
            ],
            "type": "string",
            "description": "compact omits long evidence bodies while retaining hashes, anchors, counts, and short changed token ranges.",
            "default": "full"
          },
          "outputSchemaVersion": {
            "title": "Output schema version",
            "enum": [
              "1.0"
            ],
            "type": "string",
            "description": "Explicit executable output contract version.",
            "default": "1.0"
          },
          "incremental": {
            "title": "Stateless incremental mode",
            "type": "object",
            "description": "First run: use an empty object. Continuations: copy SUMMARY.nextCursor unchanged. Explicit accession pairs are incompatible.",
            "properties": {
              "cursor": {
                "title": "Previous cursor",
                "description": "Opaque nextCursor copied unchanged from the prior SUMMARY.",
                "type": "string",
                "maxLength": 32768,
                "pattern": "^secchgcur1_[A-Za-z0-9_-]+$"
              }
            },
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}