{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC EDGAR Filings & XBRL Financial Data API",
    "description": "Get SEC EDGAR filings (10-K, 10-Q, 8-K, Form 4 lists), XBRL financial facts such as revenue and net income, and company profiles by ticker or CIK. Uses the free official data.sec.gov API. No API key needed. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "JSEoGFBEp0CUxBN3B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datawharf-tools~sec-edgar-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datawharf-tools-sec-edgar-api",
        "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/datawharf-tools~sec-edgar-api/runs": {
      "post": {
        "operationId": "runs-sync-datawharf-tools-sec-edgar-api",
        "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/datawharf-tools~sec-edgar-api/run-sync": {
      "post": {
        "operationId": "run-sync-datawharf-tools-sec-edgar-api",
        "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": [
          "mode",
          "companies"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "filings",
              "companyFacts",
              "company"
            ],
            "type": "string",
            "description": "filings = list a company's filings (10-K, 10-Q, 8-K, Form 4 ...) with document links. companyFacts = XBRL financial facts (revenue, net income, assets ...) one row per reported data point. company = company profile (SIC, address, exchanges, former names).",
            "default": "filings"
          },
          "companies": {
            "title": "Tickers or CIKs",
            "type": "array",
            "description": "Stock tickers (AAPL, MSFT) and/or CIK numbers (320193). Up to 500 per run.",
            "items": {
              "type": "string"
            }
          },
          "forms": {
            "title": "Form types",
            "type": "array",
            "description": "filings and companyFacts modes: only these forms, e.g. 10-K, 10-Q, 8-K, 4, S-1, DEF 14A. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "filedAfter": {
            "title": "Filed on/after",
            "type": "string",
            "description": "YYYY-MM-DD. Filing date lower bound."
          },
          "filedBefore": {
            "title": "Filed on/before",
            "type": "string",
            "description": "YYYY-MM-DD. Filing date upper bound."
          },
          "includeOlderFilings": {
            "title": "Include older filing history",
            "type": "boolean",
            "description": "filings mode: also read the older history files for companies with many filings (extra requests). Pages outside your date range are skipped.",
            "default": true
          },
          "concepts": {
            "title": "XBRL concepts",
            "type": "array",
            "description": "companyFacts mode: concept names to return, e.g. RevenueFromContractWithCustomerExcludingAssessedTax (most companies' revenue), Revenues (older/some filers), NetIncomeLoss, Assets, EarningsPerShareBasic. Concepts a company does not report are listed in RUN_REPORT.unmatchedConcepts.",
            "items": {
              "type": "string"
            }
          },
          "allConcepts": {
            "title": "All concepts",
            "type": "boolean",
            "description": "companyFacts mode: return every concept (very large; thousands of rows per company).",
            "default": false
          },
          "taxonomy": {
            "title": "Taxonomy",
            "enum": [
              "us-gaap",
              "dei",
              "ifrs-full",
              "srt"
            ],
            "type": "string",
            "description": "companyFacts mode: XBRL taxonomy.",
            "default": "us-gaap"
          },
          "fiscalPeriod": {
            "title": "Fiscal period",
            "enum": [
              "FY",
              "Q1",
              "Q2",
              "Q3",
              "Q4"
            ],
            "type": "string",
            "description": "companyFacts mode: only FY, Q1, Q2, Q3 or Q4 data points."
          },
          "userAgent": {
            "title": "User-Agent (contact)",
            "type": "string",
            "description": "SEC fair-access policy asks automated tools to identify themselves, ideally with contact info, e.g. 'Acme Research research@acme.com'. Optional; the default is \"datawharf-tools datawharf@gmail.com\". Set your own contact for large or repeated runs."
          },
          "maxResultsPerCompany": {
            "title": "Max results per company",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional. Caps the rows returned for each company; Max results still caps the total. Without it, Max results is shared evenly: each company first gets its share (Max results divided by the number of companies, rounded up), and any share a company does not use goes to companies that have more rows. Newest filings come first."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum rows returned in total across all companies, shared evenly between them (see Max results per company). You are charged per row returned.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}