{
  "openapi": "3.0.1",
  "info": {
    "title": "Canadian SEC 40-F & 6-K Filings Scraper (SEDAR+ Alt)",
    "description": "Extract Canadian public company Form 40-F & 6-K filings (AIF, MD&A, NI 43-101, NI 51-101) from SEC EDGAR MJDS as clean JSON, CSV, or via MCP.",
    "version": "0.1",
    "x-build-id": "U8uYcyLngNEaDUJg3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zertax~canadian-sec-40f-6k-filings-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zertax-canadian-sec-40f-6k-filings-mcp",
        "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/zertax~canadian-sec-40f-6k-filings-mcp/runs": {
      "post": {
        "operationId": "runs-sync-zertax-canadian-sec-40f-6k-filings-mcp",
        "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/zertax~canadian-sec-40f-6k-filings-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-zertax-canadian-sec-40f-6k-filings-mcp",
        "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": {
          "mode": {
            "title": "Query Mode",
            "enum": [
              "company_lookup",
              "full_text_search"
            ],
            "type": "string",
            "description": "Choose 'company_lookup' to retrieve recent 40-F/6-K filings & classified exhibits for specific Canadian tickers/CIKs (e.g. CNQ, SU, RY, SHOP, AEM), or 'full_text_search' to query SEC EDGAR's EFTS full-text index across all Canadian MJDS filings.",
            "default": "company_lookup"
          },
          "tickers": {
            "title": "Canadian Interlisted Tickers (US Symbols)",
            "type": "array",
            "description": "US-listed tickers of Canadian MJDS issuers (e.g. [\"CNQ\", \"SU\", \"ENB\", \"RY\", \"AEM\", \"SHOP\"]). Defaults to [\"CNQ\"] in company_lookup mode when tickers, ciks, and companyNames are all empty.",
            "items": {
              "type": "string"
            }
          },
          "ciks": {
            "title": "SEC CIK Numbers",
            "type": "array",
            "description": "Optional list of SEC CIK numbers (e.g. [\"0001017413\" for Canadian Natural Resources]).",
            "items": {
              "type": "string"
            }
          },
          "companyNames": {
            "title": "Company Name Search",
            "type": "array",
            "description": "Optional case-insensitive company name filters matched against SEC's official issuer directory.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Full-Text Search Query (EFTS Mode)",
            "type": "string",
            "description": "Full-text search phrase for full_text_search mode (e.g. '\"NI 43-101\"', '\"Annual Information Form\"', '\"Montney\"', '\"Material Change Report\"')."
          },
          "forms": {
            "title": "SEC MJDS Form Types",
            "type": "array",
            "description": "MJDS form types to include.",
            "items": {
              "type": "string"
            },
            "default": [
              "40-F",
              "40-F/A",
              "6-K",
              "6-K/A"
            ]
          },
          "documentCategories": {
            "title": "Filter by Canadian Document Category",
            "type": "array",
            "description": "Optional filter on auto-classified Canadian exhibit categories (e.g. [\"AIF\", \"MDA\", \"NI_43_101\", \"NI_51_101\", \"FINANCIAL_STATEMENTS\", \"MATERIAL_CHANGE\", \"PRESS_RELEASE\"]).",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Filing Date From (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional start filing date filter (inclusive, YYYY-MM-DD)."
          },
          "dateTo": {
            "title": "Filing Date To (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional end filing date filter (inclusive, YYYY-MM-DD)."
          },
          "includeExhibits": {
            "title": "Inspect Filing Index & Classify Exhibits",
            "type": "boolean",
            "description": "When true in company_lookup mode, fetches each filing's SEC index page to list and classify all attached exhibits (EX-99.1 AIF, MD&A, NI 43-101, NI 51-101, etc.).",
            "default": true
          },
          "includeExhibitText": {
            "title": "Extract Clean Text from HTML/TXT Exhibits",
            "type": "boolean",
            "description": "When true, downloads HTML/TXT exhibits and extracts clean readable text (incurs exhibit-text-extracted PPE event per extracted document). PDF exhibits return direct SEC download URLs without binary parsing.",
            "default": false
          },
          "maxTextChars": {
            "title": "Max Extracted Text Characters",
            "minimum": 500,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum characters kept per extracted exhibit text body when includeExhibitText=true (keeps LLM/MCP payloads token-efficient).",
            "default": 12000
          },
          "maxFilingsPerCompany": {
            "title": "Max Filings Per Company",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of recent matching 40-F/6-K filings to inspect per company in company_lookup mode.",
            "default": 5
          },
          "maxItems": {
            "title": "Max Output Records",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum total filing/exhibit records to output (default 25 keeps AI agent/MCP lookups under 5 seconds).",
            "default": 25
          },
          "userAgentContact": {
            "title": "SEC Fair-Use User-Agent Contact (Optional)",
            "type": "string",
            "description": "Optional custom contact identifier for SEC EDGAR's fair-use User-Agent header."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}