{
  "openapi": "3.0.1",
  "info": {
    "title": "US Stock Screener API: SEC financial data, revenue, net margin",
    "description": "Find US companies by financials, e.g. revenue over $1B and net margin above 20% last year: screens every SEC filer on revenue, net income, margins, cash flow, assets and 30 more metrics (SEC XBRL) for one year or quarter, sorted. Each value cites its SEC filing. $0.002 per company.",
    "version": "0.1",
    "x-build-id": "QvqJJn3YlTJlIomgm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bosco_labs~sec-company-screen/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bosco_labs-sec-company-screen",
        "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/bosco_labs~sec-company-screen/runs": {
      "post": {
        "operationId": "runs-sync-bosco_labs-sec-company-screen",
        "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/bosco_labs~sec-company-screen/run-sync": {
      "post": {
        "operationId": "run-sync-bosco_labs-sec-company-screen",
        "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": [
          "period"
        ],
        "properties": {
          "period": {
            "title": "Period",
            "pattern": "^\\s*[Cc][Yy]\\d{4}([Qq][1-4])?\\s*$",
            "type": "string",
            "description": "Calendar period in SEC frames format: \"CY2025\" = annual figures, \"CY2025Q3\" = 3-month quarter figures. Required, 2009 to the current year. Calendar-aligned: each company comes with its own fiscal period that best fits it (e.g. CY2025 holds Apple's fiscal year to Sep 2025, Microsoft's to Jun 2025, Walmart's to Jan 2026), shown in period_start/period_end. Balance-sheet metrics are taken at each company's period end."
          },
          "filters": {
            "title": "Filters",
            "type": "array",
            "description": "Conditions every company must meet, as a list of {metric, min, max} (either bound optional, both inclusive), e.g. [{\"metric\": \"revenue\", \"min\": 10000000000}, {\"metric\": \"net_margin\", \"min\": 0.2}] = revenue of at least $10B and net margin of at least 20%. Money in full USD (10000000000 = $10B), ratios as fractions (0.2 = 20%), EPS in USD per share. A company without a value for a filter metric is left out. Metrics: see sortBy. Empty = no filter (all companies with a sortBy value).",
            "items": {
              "type": "object",
              "properties": {
                "metric": {
                  "title": "Metric",
                  "description": "Metric name, same names as sortBy, e.g. \"revenue\".",
                  "type": "string",
                  "enum": [
                    "revenue",
                    "cost_of_revenue",
                    "gross_profit",
                    "research_and_development",
                    "selling_general_and_administrative",
                    "operating_profit",
                    "profit_before_tax",
                    "net_income",
                    "net_income_attributable_to_parent",
                    "eps_basic",
                    "eps_diluted",
                    "weighted_average_shares_basic",
                    "weighted_average_shares_diluted",
                    "depreciation_amortisation",
                    "total_assets",
                    "current_assets",
                    "cash_and_equivalents",
                    "total_liabilities",
                    "current_liabilities",
                    "noncurrent_liabilities",
                    "long_term_debt",
                    "total_equity",
                    "equity_attributable_to_parent",
                    "shares_outstanding",
                    "operating_cash_flow",
                    "investing_cash_flow",
                    "financing_cash_flow",
                    "capex",
                    "dividends_paid",
                    "free_cash_flow",
                    "ebitda",
                    "gross_margin",
                    "operating_margin",
                    "net_margin",
                    "return_on_equity",
                    "equity_ratio"
                  ]
                }
              },
              "required": [
                "metric"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "revenue",
              "cost_of_revenue",
              "gross_profit",
              "research_and_development",
              "selling_general_and_administrative",
              "operating_profit",
              "profit_before_tax",
              "net_income",
              "net_income_attributable_to_parent",
              "eps_basic",
              "eps_diluted",
              "weighted_average_shares_basic",
              "weighted_average_shares_diluted",
              "depreciation_amortisation",
              "total_assets",
              "current_assets",
              "cash_and_equivalents",
              "total_liabilities",
              "current_liabilities",
              "noncurrent_liabilities",
              "long_term_debt",
              "total_equity",
              "equity_attributable_to_parent",
              "shares_outstanding",
              "operating_cash_flow",
              "investing_cash_flow",
              "financing_cash_flow",
              "capex",
              "dividends_paid",
              "free_cash_flow",
              "ebitda",
              "gross_margin",
              "operating_margin",
              "net_margin",
              "return_on_equity",
              "equity_ratio"
            ],
            "type": "string",
            "description": "Metric to rank by, e.g. \"operating_cash_flow\". Same names as the SEC Company Financials Actor; the last seven (free_cash_flow to equity_ratio) are derived from two reported metrics. Companies without a value for it are left out. Empty = the first filter's metric, else revenue."
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "\"desc\" = largest first (top N), \"asc\" = smallest first (e.g. the lowest net margin). Default \"desc\".",
            "default": "desc"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most companies to return (and charge for), e.g. 20 for a top 20. The status message says how many matched in total. Default 50, max 1000.",
            "default": 50
          },
          "metrics": {
            "title": "Extra metrics",
            "type": "array",
            "description": "More fields to show per company besides the sortBy and filter metrics, e.g. [\"operating_cash_flow\", \"total_assets\"]. Same names as sortBy. Each adds a few SEC requests. Empty = only the sortBy and filter metrics (plus the inputs of derived ones).",
            "items": {
              "type": "string",
              "enum": [
                "revenue",
                "cost_of_revenue",
                "gross_profit",
                "research_and_development",
                "selling_general_and_administrative",
                "operating_profit",
                "profit_before_tax",
                "net_income",
                "net_income_attributable_to_parent",
                "eps_basic",
                "eps_diluted",
                "weighted_average_shares_basic",
                "weighted_average_shares_diluted",
                "depreciation_amortisation",
                "total_assets",
                "current_assets",
                "cash_and_equivalents",
                "total_liabilities",
                "current_liabilities",
                "noncurrent_liabilities",
                "long_term_debt",
                "total_equity",
                "equity_attributable_to_parent",
                "shares_outstanding",
                "operating_cash_flow",
                "investing_cash_flow",
                "financing_cash_flow",
                "capex",
                "dividends_paid",
                "free_cash_flow",
                "ebitda",
                "gross_margin",
                "operating_margin",
                "net_margin",
                "return_on_equity",
                "equity_ratio"
              ],
              "enumTitles": [
                "Revenue",
                "Cost of revenue",
                "Gross profit",
                "Research and development",
                "Selling general and administrative",
                "Operating profit",
                "Profit before tax",
                "Net income",
                "Net income attributable to parent",
                "Eps basic",
                "Eps diluted",
                "Weighted average shares basic",
                "Weighted average shares diluted",
                "Depreciation amortisation",
                "Total assets",
                "Current assets",
                "Cash and equivalents",
                "Total liabilities",
                "Current liabilities",
                "Noncurrent liabilities",
                "Long term debt",
                "Total equity",
                "Equity attributable to parent",
                "Shares outstanding",
                "Operating cash flow",
                "Investing cash flow",
                "Financing cash flow",
                "Capex",
                "Dividends paid",
                "Free cash flow",
                "Ebitda",
                "Gross margin",
                "Operating margin",
                "Net margin",
                "Return on equity",
                "Equity ratio"
              ]
            }
          },
          "tickersOnly": {
            "title": "Only companies with a ticker",
            "type": "boolean",
            "description": "true = skip companies without a ticker in the SEC's company_tickers.json (delisted companies, private issuers of public debt, subsidiaries). Default false. E.g. `true`.",
            "default": false
          },
          "includeSources": {
            "title": "Include sources",
            "type": "boolean",
            "description": "true = each row has `sources`: per value the XBRL tag, the SEC accession number and the filing URL (or the formula for derived values). false = values only, about 3x smaller rows. Default true.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}