{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR Scraper — Filings, Full-Text RAG & XBRL Financials",
    "description": "Extract SEC EDGAR filings metadata, full-text search results, section-parsed 10-K/10-Q text for RAG, and XBRL financial facts from official SEC public data. No API key required.",
    "version": "1.0",
    "x-build-id": "VFZrcpOJeHFAZfwTm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/autofacts~sec-edgar-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-autofacts-sec-edgar-scraper",
        "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/autofacts~sec-edgar-scraper/runs": {
      "post": {
        "operationId": "runs-sync-autofacts-sec-edgar-scraper",
        "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/autofacts~sec-edgar-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-autofacts-sec-edgar-scraper",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "filings",
              "fulltext",
              "search",
              "facts"
            ],
            "type": "string",
            "description": "What to extract: **filings** = filing metadata for a company; **fulltext** = full document text with section parsing and RAG chunks; **search** = EDGAR full-text search hits; **facts** = XBRL financial facts.",
            "default": "filings"
          },
          "ticker": {
            "title": "Ticker",
            "type": "string",
            "description": "Stock ticker symbol, e.g. `AAPL`. One of ticker / CIK / company name is required for filings, fulltext and facts modes."
          },
          "cik": {
            "title": "CIK",
            "type": "string",
            "description": "SEC Central Index Key, e.g. `320193`. Takes precedence over ticker and company name."
          },
          "companyName": {
            "title": "Company name",
            "type": "string",
            "description": "SEC registrant name (exact or partial), e.g. `Apple Inc.` Used when ticker/CIK are not provided."
          },
          "query": {
            "title": "Full-text query",
            "type": "string",
            "description": "EDGAR full-text search expression (search/fulltext modes), e.g. `\"supply chain disruption\"`. Covers filings from 2001-05-04 onward. Phrases can be quoted."
          },
          "formTypes": {
            "title": "Form types",
            "type": "array",
            "description": "Filing form types to include, e.g. `10-K`, `10-Q`, `8-K`, `S-1`, `DEF 14A`, `Form 4`, `13F-HR`. Leave empty for all forms.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Earliest filing date (YYYY-MM-DD). In facts mode this filters the fact period end date."
          },
          "dateTo": {
            "title": "Date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Latest filing date (YYYY-MM-DD)."
          },
          "chunking": {
            "title": "Chunking (fulltext mode)",
            "enum": [
              "section",
              "paragraph",
              "none"
            ],
            "type": "string",
            "description": "How to chunk extracted text: **section** = one chunk per Item section; **paragraph** = ~2000-char chunks on paragraph boundaries (best for embeddings); **none** = whole document text, no chunks.",
            "default": "section"
          },
          "includeExhibits": {
            "title": "Include exhibits list",
            "type": "boolean",
            "description": "Filings mode: also list each filing's exhibit files (one extra request per filing).",
            "default": false
          },
          "factTags": {
            "title": "XBRL fact tags",
            "type": "array",
            "description": "Facts mode: restrict to specific XBRL tags, e.g. `Revenues`, `NetIncomeLoss`, `Assets`, `EarningsPerShareDiluted`. Leave empty for all tags.",
            "items": {
              "type": "string"
            }
          },
          "dedupeFacts": {
            "title": "Deduplicate re-reported facts",
            "type": "boolean",
            "description": "Facts mode: filings restate prior-period comparatives, so the same fact appears once per filing that mentions it. Keep this on for a clean time series (one row per period & value, original disclosure kept). Turn off to get every reported occurrence (audit trail).",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of items to extract and save. Each saved item is charged as one event.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}