{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC Fundamentals Screener — XBRL Ratios Across All Filers",
    "description": "Rank every SEC filer by a fundamental ratio from official XBRL data: net margin, ROE, ROA, debt-to-equity, current ratio, accrual ratio, or your own numerator and denominator. Handles the US-GAAP tag fragmentation that makes naive screens cover half the market.",
    "version": "0.1",
    "x-build-id": "tgAWbN6RgjlxRajLc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yzy001~sec-fundamentals-screener/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yzy001-sec-fundamentals-screener",
        "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/yzy001~sec-fundamentals-screener/runs": {
      "post": {
        "operationId": "runs-sync-yzy001-sec-fundamentals-screener",
        "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/yzy001~sec-fundamentals-screener/run-sync": {
      "post": {
        "operationId": "run-sync-yzy001-sec-fundamentals-screener",
        "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": [
          "contactUserAgent"
        ],
        "properties": {
          "contactUserAgent": {
            "title": "Contact (required by SEC)",
            "type": "string",
            "description": "SEC's fair-access policy requires programmatic requests to identify the requester. Replace the placeholder with your own name and an email you read, e.g. 'Jane Doe jane.doe@yourfirm.com'. The placeholder itself is refused before any request is sent. This is SEC policy, not a restriction of this Actor."
          },
          "ratio": {
            "title": "Ratio",
            "enum": [
              "netMargin",
              "grossMargin",
              "operatingMargin",
              "roe",
              "roa",
              "assetTurnover",
              "debtToEquity",
              "currentRatio",
              "cashToAssets",
              "cashFlowMargin",
              "accrualRatio"
            ],
            "type": "string",
            "description": "Which fundamental ratio to compute and rank by. Ignored if you set a custom numerator and denominator below.",
            "default": "netMargin"
          },
          "period": {
            "title": "Period",
            "type": "string",
            "description": "SEC calendar period, e.g. CY2025 for the full year or CY2025Q4 for a quarter. Annual periods cover about 5.8 times more companies than quarterly ones, because fewer filers tag a comparable quarter.",
            "default": "CY2025"
          },
          "order": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Highest ratio first, or lowest first.",
            "default": "desc"
          },
          "numeratorConcept": {
            "title": "Custom numerator (optional)",
            "type": "string",
            "description": "Override the preset ratio with your own numerator concept: revenue, netIncome, operatingIncome, grossProfit, operatingCashFlow, assets, liabilities, equity, currentAssets, currentLiabilities, cash, longTermDebt, shares."
          },
          "denominatorConcept": {
            "title": "Custom denominator (optional)",
            "type": "string",
            "description": "The denominator concept, from the same list as the numerator. Must be set together with the numerator."
          },
          "minCoverage": {
            "title": "Min coverage of the larger frame",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Stop if fewer than this fraction of filers can be paired. A ranking built on a tiny intersection is not a picture of the market, so the run fails loudly instead of looking complete.",
            "default": 0.05
          },
          "maxPeriodMismatch": {
            "title": "Max share of period mismatches",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Stop if more than this share of companies report the numerator and denominator for different period end dates, which would make the ratio cross fiscal periods.",
            "default": 0.5
          },
          "maxInstantGapDays": {
            "title": "Maximum days between income period end and balance-sheet date",
            "minimum": 0,
            "type": "integer",
            "description": "For ratios that divide an income-statement figure by a balance-sheet figure (ROE, ROA), the balance-sheet date must be within this many days of the income period's end. The default 10 allows 52/53-week fiscal years. Companies outside it are dropped and counted.",
            "default": 10
          },
          "minDenominatorAbs": {
            "title": "Min absolute denominator",
            "minimum": 0,
            "type": "number",
            "description": "Drop companies whose denominator is smaller than this in absolute value. Tiny denominators inflate ratios into meaningless outliers. In USD; 0 disables.",
            "default": 0
          },
          "minDenominatorToAssets": {
            "title": "Minimum denominator ÷ total assets",
            "minimum": 0,
            "type": "number",
            "description": "Drops companies whose denominator is tiny next to their total assets, which turns a ratio into noise (a SPAC with $58 of revenue, a fund whose revenue tag is 0.009% of assets). Measured over 4,600 companies for CY2025 revenue: p1 = 0.0022, and mortgage REITs, the lowest legitimate case, sit at 0.006–0.008. Set 0 to turn off. Needs scaleCheck.",
            "default": 0.002
          },
          "scaleCheck": {
            "title": "Cross-check magnitudes against total assets",
            "type": "boolean",
            "description": "SEC's frames API does not prefer financial statements: one measured company filed net income of 22,367,000 in its 10-K and 22,367,000,000 in its proxy statement, and the frame returned the proxy figure. This check compares the numerator against total assets and drops such rows.",
            "default": true
          },
          "maxScaleRatio": {
            "title": "Max numerator ÷ total assets",
            "minimum": 0.1,
            "maximum": 10000,
            "type": "number",
            "description": "Drop companies whose numerator exceeds total assets by more than this multiple, which indicates a scale error in the filing. Measured distribution of net income over assets: p90 = 0.71, p99 = 13.1, so the default of 5 sits in the tail rather than inside the body.",
            "default": 5
          },
          "minScaleAbs": {
            "title": "Min total assets (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Drop companies with total assets below this. Shells with near-zero assets produce arithmetically correct but meaningless ratios - two measured examples had total assets of 1,402 and 1,058 USD.",
            "default": 1000000
          },
          "excludeNegativeDenominator": {
            "title": "Exclude negative denominators",
            "type": "boolean",
            "description": "A negative denominator flips the sign of the ratio. One measured company had net income of -696M and equity of -164M, giving an ROE of +424% and placing a heavily loss-making company with negative equity at the top of a highest-ROE ranking. Turn this off and use the denominatorSign field to judge for yourself.",
            "default": true
          },
          "maxResults": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of company rows to return after ranking.",
            "default": 1000
          },
          "delaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Pause between requests to data.sec.gov. SEC asks for no more than about 10 requests per second; a ratio needs only a handful of requests in total.",
            "default": 0.3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}