sec-edgar Company Facts API

Aggregated company financial facts

OpenAPI Specification

sec-edgar-company-facts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: SEC EDGAR Submissions & XBRL Company Facts API
  description: The SEC EDGAR data APIs provide free, authenticated-free access to company filing metadata, XBRL financial data, and full-text search across all SEC submissions. APIs are hosted at data.sec.gov and efts.sec.gov and require a descriptive User-Agent header per SEC fair-access policy.
  version: 1.0.0
  contact:
    name: SEC Developer Resources
    url: https://www.sec.gov/developer
  license:
    name: Public Domain (U.S. Government Work)
    url: https://www.sec.gov/privacy.htm
servers:
- url: https://data.sec.gov
  description: SEC EDGAR Data API
- url: https://efts.sec.gov
  description: SEC EDGAR Full-Text Search
tags:
- name: Company Facts
  description: Aggregated company financial facts
paths:
  /api/xbrl/companyfacts/CIK{cik}.json:
    get:
      operationId: getCompanyFacts
      summary: Get all XBRL facts for a company
      description: Returns all structured financial data reported in XBRL-tagged SEC filings for a company. Covers all US-GAAP and DEI taxonomy concepts across all filings. Data is organized by concept with historical values per period.
      tags:
      - Company Facts
      parameters:
      - name: cik
        in: path
        required: true
        description: 10-digit CIK with leading zeros
        schema:
          type: string
          pattern: ^\d{10}$
        example: 0000320193
      responses:
        '200':
          description: All XBRL company facts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyFacts'
        '404':
          description: Company not found
components:
  schemas:
    CompanyFacts:
      type: object
      properties:
        cik:
          type: integer
        entityName:
          type: string
        facts:
          type: object
          description: Nested object of taxonomy > concept > unit > data
          additionalProperties:
            type: object
            description: Taxonomy namespace (e.g., us-gaap, dei)
            additionalProperties:
              type: object
              description: XBRL concept
              properties:
                label:
                  type: string
                description:
                  type: string
                units:
                  type: object
                  additionalProperties:
                    type: array
                    items:
                      $ref: '#/components/schemas/XBRLFact'
    XBRLFact:
      type: object
      properties:
        end:
          type: string
          format: date
          description: Period end date for duration facts; instant date for point-in-time facts
        val:
          type: number
          description: Reported value
        accn:
          type: string
          description: Accession number of filing
        fy:
          type: integer
          description: Fiscal year
        fp:
          type: string
          description: Fiscal period (FY, Q1, Q2, Q3, Q4)
        form:
          type: string
          description: Form type
        filed:
          type: string
          format: date
        frame:
          type: string
          description: XBRL frame identifier
        start:
          type: string
          format: date
          description: Period start date (for duration facts)