{
  "openapi": "3.0.1",
  "info": {
    "title": "Stock Market Fundamentals Scraper",
    "description": "Revenue, net income, EPS, assets, cash flow and other financial-statement line items per stock ticker, straight from official SEC filings (XBRL). Keyless JSON, no browser and no proxy.",
    "version": "0.1",
    "x-build-id": "xwaW90WdHWkCjkQIz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapemint~stock-market-fundamentals-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapemint-stock-market-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/scrapemint~stock-market-fundamentals-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapemint-stock-market-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/scrapemint~stock-market-fundamentals-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapemint-stock-market-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "tickers",
              "screener"
            ],
            "type": "string",
            "description": "tickers = one row per company, metric and period for the tickers you list (SEC company facts). screener = one row per COMPANY with every requested metric side by side, across every filer that reported in a period (SEC XBRL frames).",
            "default": "tickers"
          },
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Stock symbols to fetch, e.g. [\"AAPL\", \"MSFT\"].",
            "items": {
              "type": "string"
            }
          },
          "metrics": {
            "title": "Metrics (optional)",
            "type": "array",
            "description": "Limit to specific XBRL concept names (e.g. [\"Revenues\",\"NetIncomeLoss\"]). Leave empty to return the curated set of common financial-statement line items.",
            "items": {
              "type": "string"
            }
          },
          "includeAllConcepts": {
            "title": "Include all concepts",
            "type": "boolean",
            "description": "Return every us-gaap concept the company reports (hundreds), not just the curated set. Overrides Metrics.",
            "default": false
          },
          "forms": {
            "title": "Filing forms",
            "type": "array",
            "description": "Only include data points from these filing forms.",
            "default": [
              "10-K",
              "10-Q"
            ],
            "items": {
              "type": "string"
            }
          },
          "minYear": {
            "title": "Minimum year",
            "type": "integer",
            "description": "Only include data points whose period ends in this year or later. Leave empty for full history."
          },
          "latestOnly": {
            "title": "Latest value only",
            "type": "boolean",
            "description": "Return only the most recent data point for each metric. This is the default because a full history request for one ticker can run to thousands of rows. Set it to false to pull every historical filing, and pair that with Minimum year to bound the range.",
            "default": true
          },
          "maxRowsPerTicker": {
            "title": "Max rows per ticker",
            "minimum": 1,
            "type": "integer",
            "description": "Cap fundamentals rows returned per ticker.",
            "default": 5000
          },
          "maxRowsTotal": {
            "title": "Max rows total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows across all tickers.",
            "default": 50000
          },
          "screenerMetrics": {
            "title": "Screener metrics",
            "type": "array",
            "description": "Screener mode only. Metrics to place side by side on each company row. Choose from: revenue, netIncome, grossProfit, operatingIncome, rndExpense, operatingCashFlow, epsDiluted, assets, liabilities, equity, cash.",
            "default": [
              "revenue",
              "netIncome",
              "assets",
              "equity"
            ],
            "items": {
              "type": "string"
            }
          },
          "period": {
            "title": "Period (screener)",
            "type": "string",
            "description": "Screener mode only. Calendar period such as CY2025Q1 or CY2024 (full year). Leave empty to use the most recent quarter that most filers have reported. Note Q4 quarters are sparse: companies report Q4 inside the annual 10-K rather than a 10-Q, so ask for the full year (CY2024) instead."
          },
          "sortBy": {
            "title": "Sort by (screener)",
            "type": "string",
            "description": "Screener mode only. Which metric to rank by. Defaults to the first screener metric. Companies that did not report this metric are excluded."
          },
          "sortOrder": {
            "title": "Sort order (screener)",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Screener mode only.",
            "default": "desc"
          },
          "maxCompanies": {
            "title": "Max companies (screener)",
            "minimum": 1,
            "maximum": 6000,
            "type": "integer",
            "description": "Screener mode only. Rows to return after sorting. Each company is one billable row.",
            "default": 100
          },
          "tickersOnly": {
            "title": "Only companies with a ticker (screener)",
            "type": "boolean",
            "description": "Screener mode only. Drop SEC registrants that do not map to a listed ticker (funds, subsidiaries, private filers).",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}