{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR API: 10-K, 10-Q, 8-K & XBRL Financials",
    "description": "Look up US companies by ticker, CIK or name and get SEC EDGAR 10-K, 10-Q and 8-K filings with document URLs, plus XBRL company facts (revenue, net income, EPS, assets) as JSON rows. For research tools and AI agents. $1.50 per 1,000 companies, $1 per 1,000 filings. Not investment advice.",
    "version": "1.0",
    "x-build-id": "d8ShRWFntSYsWMtKk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fairquery~edgar-company-facts-filings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fairquery-edgar-company-facts-filings",
        "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/fairquery~edgar-company-facts-filings/runs": {
      "post": {
        "operationId": "runs-sync-fairquery-edgar-company-facts-filings",
        "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/fairquery~edgar-company-facts-filings/run-sync": {
      "post": {
        "operationId": "run-sync-fairquery-edgar-company-facts-filings",
        "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": {
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "Tickers, CIKs (1–10 digits), or company name fragments to resolve via SEC company_tickers.json. Required for every mode except search. For search, leave this empty to search all filers, or set it to limit hits to those companies.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "filings",
              "facts",
              "both",
              "insider",
              "8k_items",
              "search",
              "onlyNew"
            ],
            "type": "string",
            "description": "filings, facts, or both keep the original company, filing, and XBRL paths. insider returns Form 4 transaction rows. 8k_items returns one row per 8-K with item codes. search runs EDGAR full-text search (requires searchQuery) and charges per hit. onlyNew returns filings accepted since the last run for scheduled alerts.",
            "default": "both"
          },
          "formTypes": {
            "title": "Form types",
            "type": "array",
            "description": "Optional filter of SEC form types (e.g. 10-K, 10-Q, 8-K). Empty = all recent forms.",
            "default": [
              "10-K",
              "10-Q",
              "8-K"
            ],
            "items": {
              "type": "string"
            }
          },
          "since": {
            "title": "Since (filing date)",
            "type": "string",
            "description": "ISO date YYYY-MM-DD. Keep filings with filingDate on or after this date. On the first onlyNew run, set this (or sinceTimestamp) to backfill; omit both to record a baseline and emit no historical filings."
          },
          "until": {
            "title": "Until (filing date)",
            "type": "string",
            "description": "ISO date YYYY-MM-DD. Keep filings and search hits with filing date on or before this date."
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "With filings, both, 8k_items, insider, or mode onlyNew: emit rows accepted after the cursor saved in the named store edgar-filing-alerts. The first run with no since and no sinceTimestamp records a baseline and does not emit historical filings. Facts are not filtered.",
            "default": false
          },
          "sinceTimestamp": {
            "title": "Since timestamp",
            "type": "string",
            "description": "ISO timestamp or YYYY-MM-DD. onlyNew keeps filings accepted after the later of this instant and the saved cursor."
          },
          "stateKey": {
            "title": "Alert state key",
            "type": "string",
            "description": "Cursor name inside the edgar-filing-alerts store. Use one key per schedule. Leave empty to derive a key from the companies, mode, form types, and item codes."
          },
          "itemCodes": {
            "title": "8-K item codes",
            "type": "array",
            "description": "Optional 8-K item filter, for example 2.02 or 5.02. Applied to 8k_items, filings, onlyNew, and as the EDGAR search items filter. Empty means all items. Leave empty unless you mean to filter.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Full-text search query",
            "type": "string",
            "description": "EDGAR full-text query for mode search. Quotes and AND/OR follow the SEC search syntax. Each returned hit is one search-hit charge."
          },
          "maxSearchHits": {
            "title": "Max search hits",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum full-text hits to return and charge in mode search.",
            "default": 20
          },
          "maxFilingsPerCompany": {
            "title": "Max filings per company",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum filing, Form 4, or 8-K rows per company after filters. onlyNew walks oldest-first up to this cap so the next run continues; other modes keep the newest rows.",
            "default": 5
          },
          "metrics": {
            "title": "Financial metrics (XBRL concepts)",
            "type": "array",
            "description": "us-gaap / dei concept names to keep (e.g. Assets, NetIncomeLoss). Empty uses a curated default set. Tip: many companies report revenue as RevenueFromContractWithCustomerExcludingAssessedTax rather than Revenues (Apple's Revenues values stop in 2018).",
            "default": [
              "Assets",
              "NetIncomeLoss",
              "EarningsPerShareDiluted",
              "Revenues"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxFactsPerMetric": {
            "title": "Max facts per metric",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Most-recent values to keep per concept/unit (latest period end first; a value re-reported in later filings is returned once, from the latest filing).",
            "default": 4
          },
          "includeTextExcerpt": {
            "title": "Include text excerpt",
            "type": "boolean",
            "description": "If true, download each kept filing's primary document and emit a short plain-text excerpt row (extra SEC request + text-excerpt charge).",
            "default": false
          },
          "excerptMaxChars": {
            "title": "Excerpt max characters",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum characters for each text excerpt.",
            "default": 2000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}