{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR Fundamentals Scraper",
    "description": "Company profiles, COMPLETE filing history and XBRL financials from SEC EDGAR by ticker or CIK. Recovers the older filings capped out of SEC's main document (up to 79% of history) and drops restatement duplicates so each period has one canonical value.",
    "version": "0.1",
    "x-build-id": "iUP9qLTwIIexgyDD3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~sec-edgar-fundamentals-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-sec-edgar-fundamentals-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/scrapyx~sec-edgar-fundamentals-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-sec-edgar-fundamentals-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/scrapyx~sec-edgar-fundamentals-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-sec-edgar-fundamentals-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",
        "properties": {
          "tickers": {
            "title": "Ticker symbols",
            "type": "array",
            "description": "Stock tickers to look up, e.g. AAPL, MSFT, BRK-B. Resolved through SEC's own ticker-to-CIK map. Note that several tickers can name the same company (Alphabet has GOOGL, GOOG, GOOGN and GOOGM) — those collapse into one company, with every alias recorded.",
            "items": {
              "type": "string"
            }
          },
          "ciks": {
            "title": "CIK numbers",
            "type": "array",
            "description": "SEC Central Index Keys, with or without leading zeros (both '320193' and '0000320193' work — they are padded to 10 digits automatically). Use these for filers that have no ticker.",
            "items": {
              "type": "string"
            }
          },
          "includeFilings": {
            "title": "Include filing history",
            "type": "boolean",
            "description": "Emit one row per filing (form type, dates, accession number, document URLs).",
            "default": true
          },
          "completeFilingHistory": {
            "title": "Fetch COMPLETE filing history (recommended for older companies)",
            "type": "boolean",
            "description": "SEC's main document caps filing history at ~1000 rows and puts everything older in separate archive files. Without this, you silently get only recent filings — measured, that loses 55% of Apple's history, 58% of Berkshire's and 79% of GE's. Costs one extra request per archive file (usually 1-2).",
            "default": false
          },
          "formTypes": {
            "title": "Filter by form type",
            "type": "array",
            "description": "Only return these SEC form types, e.g. 10-K, 10-Q, 8-K, 4, DEF 14A. Leave empty for all forms. Matching is case-insensitive and exact.",
            "items": {
              "type": "string"
            }
          },
          "filedFrom": {
            "title": "Filed on or after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only return filings filed on or after this date. Leave empty for no lower bound."
          },
          "filedTo": {
            "title": "Filed on or before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only return filings filed on or before this date. Leave empty for no upper bound."
          },
          "includeFinancials": {
            "title": "Include XBRL financial facts",
            "type": "boolean",
            "description": "Emit one row per financial datapoint from SEC's XBRL company-facts data. Costs one extra request per company, and those documents are large (3.8 MB for Apple, 7.9 MB for JPMorgan) — the response is filtered to your requested concepts before any row is written.",
            "default": false
          },
          "financialConcepts": {
            "title": "Financial concepts (us-gaap tags)",
            "type": "array",
            "description": "Which XBRL concepts to return, e.g. Assets, NetIncomeLoss, StockholdersEquity. Defaults to a set verified present across five different industries. IMPORTANT: availability is industry-dependent — GrossProfit exists for only 1 filer in 5 sampled, and banks report no RevenueFromContractWithCustomer* at all. Anything a filer does not report is listed in conceptsMissing rather than failing.",
            "items": {
              "type": "string"
            }
          },
          "canonicalFactsOnly": {
            "title": "Canonical values only (drop restatement duplicates)",
            "type": "boolean",
            "description": "SEC reports the same period repeatedly across filings, sometimes with DIFFERENT values — Apple's total assets for period-end 2009-09-26 appears 7 times, at $53.85B in the original 10-K and $47.50B after restatement. With this on, only datapoints carrying SEC's own canonical period marker are returned (one value per calendar period) and the number dropped is reported. Turn it off to see every reported revision.",
            "default": true
          },
          "maxFilingsPerCompany": {
            "title": "Max filings per company",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many filing rows per company. Set 0 for unlimited.",
            "default": 500
          },
          "maxFactsPerCompany": {
            "title": "Max financial facts per company",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many financial datapoints per company. Set 0 for unlimited.",
            "default": 2000
          },
          "userAgentContact": {
            "title": "Contact string for SEC's Fair Access policy",
            "type": "string",
            "description": "SEC asks automated clients to identify themselves with a contact address, e.g. 'MyCompany research (me@example.com)'. Sent as the User-Agent header. A default is used if you leave this empty."
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Requests in flight at once across all companies. SEC's published limit is 10 requests/second overall; Min request interval is the control that actually enforces it.",
            "default": 3
          },
          "minRequestInterval": {
            "title": "Min seconds between request starts",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Politeness pacing shared across all workers, to stay inside SEC's 10 requests/second Fair Access limit. The default already keeps the run well under it.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional and OFF by default. SEC EDGAR is public US government data with no WAF and no geo gating, so a proxy is not needed — and SEC prefers one identifiable client staying under its rate limit.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}