> ## Documentation Index
> Fetch the complete documentation index at: https://docs.case.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Structured XBRL financial data from SEC filings

> Retrieve structured financial values reported to the SEC in XBRL, via data.sec.gov. Use this endpoint when you need numbers (net income, assets, shares outstanding, and so on); use sec-filing to find filing documents. Three types: "concept" returns one line item for one company over time; "facts" returns a catalog of every concept a company reports (or normalized facts for the concepts you name); "frames" returns one concept across all reporting companies for one calendar period. Each fact links back to its EDGAR filing index via secUrl. The same value is re-reported in later filings as a prior-period comparative, so by default (dedupe: true) only facts the SEC assigned a calendar frame are returned; set dedupe to false for every reported fact. Free.



## OpenAPI

````yaml /openapi.json post /legal/v1/sec-xbrl
openapi: 3.1.0
info:
  title: Case.dev API
  description: >-
    The AI-native platform for legal technology. Build smarter legal
    applications with our suite of AI-powered APIs.
  version: 1.0.0
  contact:
    name: Case.dev Support
    email: support@casemark.com
    url: https://case.dev
  license:
    name: Proprietary
    url: https://case.dev/terms
servers:
  - url: https://api.case.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Vaults
    description: Secure document storage with semantic search
  - name: Vault Events
    description: Vault-scoped event subscriptions and delivery testing
  - name: Vault Memory
    description: Vault-scoped persistent memory and semantic retrieval
  - name: Vault Objects
    description: Vault object management, content access, and document operations
  - name: Memory
    description: >-
      Persistent memory for AI agents with semantic search and 12 generic
      indexed tag fields
  - name: OCR
    description: Extract text from PDFs, images, and scanned documents
  - name: Voice
    description: Audio transcription and text-to-speech
  - name: LLMs
    description: Access 40+ language models through a unified API
  - name: Search
    description: Web search and AI answers
  - name: Mail
    description: Managed inboxes for agent email workflows
  - name: Media
    description: Transcript retrieval and captioned media clip generation
  - name: Legal
    description: Legal research tools including citation verification
  - name: Privilege
    description: Privilege detection for e-discovery and litigation workflows
  - name: Compute
    description: Serverless GPU and CPU infrastructure
  - name: Format
    description: Document formatting and template rendering (MD/JSON to PDF/DOCX)
  - name: SuperDoc
    description: Document conversion and template automation
  - name: Webhooks
    description: Webhook endpoint management
  - name: System
    description: Public system metadata and discovery endpoints
  - name: Usage
    description: Usage reporting and webhook subscriptions
  - name: Database
    description: Serverless PostgreSQL databases with instant branching
  - name: Translation
    description: Language detection and translation for multilingual legal workflows
  - name: Skills
    description: Search and read legal AI skills for agents
  - name: Agents/Linc
    description: Durable, stateful legal agent sessions with sandboxed tools and files
  - name: Matters
    description: Matter-native legal workspaces and orchestration primitives
  - name: Connectors
    description: Import and export between provider folders and vaults
  - name: Applications Projects
    description: Web application project management
  - name: Applications Deployments
    description: Web application deployment management
  - name: Applications Domains
    description: Custom domain configuration for applications
  - name: Applications Env Vars
    description: Environment variable management for applications
paths:
  /legal/v1/sec-xbrl:
    post:
      tags:
        - Legal
      summary: Structured XBRL financial data from SEC filings
      description: >-
        Retrieve structured financial values reported to the SEC in XBRL, via
        data.sec.gov. Use this endpoint when you need numbers (net income,
        assets, shares outstanding, and so on); use sec-filing to find filing
        documents. Three types: "concept" returns one line item for one company
        over time; "facts" returns a catalog of every concept a company reports
        (or normalized facts for the concepts you name); "frames" returns one
        concept across all reporting companies for one calendar period. Each
        fact links back to its EDGAR filing index via secUrl. The same value is
        re-reported in later filings as a prior-period comparative, so by
        default (dedupe: true) only facts the SEC assigned a calendar frame are
        returned; set dedupe to false for every reported fact. Free.
      operationId: legalSecXbrl
      requestBody:
        description: XBRL query parameters. The fields used depend on type.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - concept
                    - facts
                    - frames
                  description: >-
                    concept: one line item for one company over time. facts: all
                    concepts for one company (catalog, or values for the
                    concepts you list). frames: one concept across all companies
                    for one period.
                cik:
                  type: string
                  description: >-
                    Company CIK, padded or unpadded (concept and facts). Provide
                    exactly one of cik or ticker.
                ticker:
                  type: string
                  description: >-
                    Company ticker (concept and facts). Provide exactly one of
                    cik or ticker.
                taxonomy:
                  type: string
                  enum:
                    - us-gaap
                    - ifrs-full
                    - dei
                    - srt
                  default: us-gaap
                  description: >-
                    XBRL taxonomy. For facts it only filters the catalog and has
                    no default.
                tag:
                  type: string
                  description: >-
                    XBRL element name such as NetIncomeLoss (required for
                    concept and frames)
                concepts:
                  type: array
                  items:
                    type: string
                  description: >-
                    facts only. "taxonomy:tag" strings or bare tags (default
                    us-gaap). Omit to get the concept catalog, which has no
                    values.
                unit:
                  type: string
                  description: >-
                    Unit such as USD, shares, or USD/shares. Optional filter for
                    concept; defaults to USD for frames (the SEC URL form
                    USD-per-shares is also accepted).
                period:
                  type: string
                  pattern: ^CY\d{4}(Q[1-4]I?)?$
                  description: >-
                    frames only, required. CY2024 = annual duration, CY2024Q1 =
                    quarterly duration, CY2024Q1I = instantaneous (balance sheet
                    items).
                ciks:
                  type: array
                  items:
                    type: string
                  description: frames only. Restrict results to these CIKs (peer set).
                tickers:
                  type: array
                  items:
                    type: string
                  description: frames only. Restrict results to these tickers (peer set).
                sort:
                  type: string
                  enum:
                    - value_desc
                    - value_asc
                  default: value_desc
                  description: frames only. Sort order by value.
                formTypes:
                  type: array
                  items:
                    type: string
                  description: >-
                    concept and facts. Filter by SEC form type such as 10-K or
                    10-Q.
                fiscalPeriods:
                  type: array
                  items:
                    type: string
                    enum:
                      - FY
                      - Q1
                      - Q2
                      - Q3
                  description: concept and facts. Filter by fiscal period.
                dateAfter:
                  type: string
                  format: date
                  description: >-
                    concept and facts. Only facts whose period end date is on or
                    after this date (YYYY-MM-DD).
                dateBefore:
                  type: string
                  format: date
                  description: >-
                    concept and facts. Only facts whose period end date is on or
                    before this date (YYYY-MM-DD).
                dedupe:
                  type: boolean
                  default: true
                  description: >-
                    concept and facts. When true, keep only facts the SEC
                    assigned a calendar frame (its canonical fact per period),
                    dropping prior-period comparatives re-reported in later
                    filings. When false, return every reported fact.
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 25
                  description: Maximum rows to return
                offset:
                  type: integer
                  minimum: 0
                  default: 0
                  description: Result offset for pagination
      responses:
        '200':
          description: XBRL data retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - concept
                      - facts
                      - frames
                  cik:
                    type: string
                    description: Padded CIK (concept and facts)
                  ticker:
                    type: string
                    nullable: true
                  entityName:
                    type: string
                    nullable: true
                  taxonomy:
                    type: string
                    nullable: true
                  tag:
                    type: string
                    description: concept and frames
                  unit:
                    type: string
                    nullable: true
                  period:
                    type: string
                    description: frames only
                  sort:
                    type: string
                    description: frames only
                  label:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  dedupe:
                    type: boolean
                    description: concept and facts with concepts
                  formTypes:
                    type: array
                    items:
                      type: string
                  fiscalPeriods:
                    type: array
                    items:
                      type: string
                  dateAfter:
                    type: string
                    format: date
                    nullable: true
                  dateBefore:
                    type: string
                    format: date
                    nullable: true
                  limit:
                    type: integer
                  offset:
                    type: integer
                  total:
                    type: integer
                    description: Rows matching before pagination
                  facts:
                    type: array
                    description: concept, and facts when concepts is provided
                    items:
                      type: object
                      properties:
                        taxonomy:
                          type: string
                        tag:
                          type: string
                        label:
                          type: string
                          nullable: true
                        unit:
                          type: string
                          description: For example USD, shares, or USD/shares
                        value:
                          type: number
                        start:
                          type: string
                          format: date
                          nullable: true
                          description: Null for instantaneous facts
                        end:
                          type: string
                          format: date
                        fiscalYear:
                          type: integer
                          nullable: true
                        fiscalPeriod:
                          type: string
                          nullable: true
                        form:
                          type: string
                          nullable: true
                        filed:
                          type: string
                          format: date
                          nullable: true
                        accessionNumber:
                          type: string
                          nullable: true
                        frame:
                          type: string
                          nullable: true
                          description: SEC calendar frame, null if not assigned
                        cik:
                          type: string
                        entityName:
                          type: string
                          nullable: true
                        secUrl:
                          type: string
                          nullable: true
                          description: EDGAR filing index URL
                        loc:
                          type: string
                          nullable: true
                          description: frames only. Reporting company location code
                  concepts:
                    type: array
                    description: >-
                      facts without concepts: the catalog of concepts the
                      company reports
                    items:
                      type: object
                      properties:
                        taxonomy:
                          type: string
                        tag:
                          type: string
                        label:
                          type: string
                          nullable: true
                        units:
                          type: array
                          items:
                            type: string
                        factCount:
                          type: integer
                        latestPeriodEnd:
                          type: string
                          format: date
                          nullable: true
                  data:
                    type: array
                    description: 'frames: one row per reporting company'
                    items:
                      type: object
                      properties:
                        taxonomy:
                          type: string
                        tag:
                          type: string
                        label:
                          type: string
                          nullable: true
                        unit:
                          type: string
                          description: For example USD, shares, or USD/shares
                        value:
                          type: number
                        start:
                          type: string
                          format: date
                          nullable: true
                          description: Null for instantaneous facts
                        end:
                          type: string
                          format: date
                        fiscalYear:
                          type: integer
                          nullable: true
                        fiscalPeriod:
                          type: string
                          nullable: true
                        form:
                          type: string
                          nullable: true
                        filed:
                          type: string
                          format: date
                          nullable: true
                        accessionNumber:
                          type: string
                          nullable: true
                        frame:
                          type: string
                          nullable: true
                          description: SEC calendar frame, null if not assigned
                        cik:
                          type: string
                        entityName:
                          type: string
                          nullable: true
                        secUrl:
                          type: string
                          nullable: true
                          description: EDGAR filing index URL
                        loc:
                          type: string
                          nullable: true
                          description: frames only. Reporting company location code
        '400':
          description: >-
            Bad request - invalid XBRL parameters (for example a malformed
            frames period)
        '401':
          description: Unauthorized - invalid API key
        '403':
          description: Forbidden - insufficient permissions
        '404':
          description: >-
            Ticker or CIK not found, or no XBRL data for the requested company,
            concept, or frame
        '503':
          description: Service unavailable - SEC upstream unavailable or throttled
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key starting with `sk_case_`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.