{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR Filings & XBRL Financials API",
    "description": "Zero-API-key, zero-proxy SEC EDGAR API for 10-K, 10-Q, 8-K, Form 4, Form D filings and normalized US-GAAP XBRL financials. MCP-ready with Pay-Per-Event pricing.",
    "version": "0.1",
    "x-build-id": "MLMZl9Tlt84vMYR96"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/accessible_stockade~sec-edgar-filings-xbrl-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-accessible_stockade-sec-edgar-filings-xbrl-api",
        "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/accessible_stockade~sec-edgar-filings-xbrl-api/runs": {
      "post": {
        "operationId": "runs-sync-accessible_stockade-sec-edgar-filings-xbrl-api",
        "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/accessible_stockade~sec-edgar-filings-xbrl-api/run-sync": {
      "post": {
        "operationId": "run-sync-accessible_stockade-sec-edgar-filings-xbrl-api",
        "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": [
          "tickersOrCiks"
        ],
        "properties": {
          "mode": {
            "title": "Extraction Mode",
            "enum": [
              "company_filings",
              "company_financials"
            ],
            "type": "string",
            "description": "Choose 'company_filings' to extract filing metadata and direct document URLs, or 'company_financials' to extract normalized US-GAAP XBRL financial facts.",
            "default": "company_filings"
          },
          "tickersOrCiks": {
            "title": "Tickers or CIKs",
            "minItems": 1,
            "type": "array",
            "description": "List of US stock tickers (e.g. 'AAPL', 'NVDA') or SEC CIK numbers (e.g. '0000320193'). Tickers are automatically resolved via SEC's official company_tickers.json.",
            "items": {
              "type": "string"
            }
          },
          "formTypes": {
            "title": "Form Types Filter (Optional)",
            "type": "array",
            "description": "Filter by SEC form types (e.g. '10-K', '10-Q', '8-K', '4', 'D'). Leave empty to return all recent form types.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "dateFrom": {
            "title": "Filing Date From (Optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Inclusive start date in YYYY-MM-DD format (filters filingDate >= dateFrom)."
          },
          "dateTo": {
            "title": "Filing Date To (Optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Inclusive end date in YYYY-MM-DD format (filters filingDate <= dateTo)."
          },
          "maxFilingsPerCompany": {
            "title": "Max Records Per Company",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of filings (in company_filings mode) or financial facts (in company_financials mode) to return per company.",
            "default": 25
          },
          "financialMetrics": {
            "title": "US-GAAP Financial Metrics (company_financials mode)",
            "type": "array",
            "description": "List of US-GAAP XBRL concept names to extract when mode is 'company_financials'.",
            "items": {
              "type": "string"
            },
            "default": [
              "Revenues",
              "RevenueFromContractWithCustomerExcludingAssessedTax",
              "NetIncomeLoss",
              "OperatingIncomeLoss",
              "Assets",
              "Liabilities",
              "CashAndCashEquivalentsAtCarryingValue",
              "EarningsPerShareDiluted"
            ]
          },
          "userAgent": {
            "title": "SEC Fair-Access User-Agent (Optional)",
            "type": "string",
            "description": "SEC EDGAR requires a descriptive User-Agent header with contact info per SEC Fair Access policy. Defaults to a compliant header if omitted.",
            "default": "SecEdgarApifyActor/1.0 (contact@example.com)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}