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

# Coverage statistics for a single framework

> Returns article, recital, requirement, annex, and tag counts for the
framework, including coverage percentages vs. expected totals.




## OpenAPI

````yaml /openapi.yaml get /frameworks/{slug}/stats
openapi: 3.0.3
info:
  title: Law4Devs API
  version: 1.0.0
  description: >
    Structured EU regulatory compliance data for developers.


    All 19 major EU digital regulations — CRA, NIS2, DORA, GDPR, AI Act, eIDAS,

    DSA, DMA, Data Act, DGA, eIDAS2, CER, PSD2, MiCA, Cybersecurity Act,

    ePrivacy, RED, CSRD, NIS1 — parsed into structured articles, recitals,

    requirements, compliance deadlines, and tags.


    ## Response Conventions


    - **List responses** (paginated): `{ data: [...], meta: { api_version,
    total, page, per_page, pages }, links: { next, prev } }`

    - **List responses** (non-paginated): `{ data: [...], meta: { api_version,
    total } }`

    - **Detail responses**: `{ data: { ... } }`

    - **Error responses**: `{ error: { code: "ERROR_CODE", message:
    "Human-readable message" } }`


    ## Pagination


    All list endpoints accept `page` (≥ 1, default 1) and `per_page` (1–100,
    default 20).

    Invalid values return `400 INVALID_PARAM`.
servers:
  - url: https://demo.law4devs.eu/api/v1
    description: Demo (CRA only, no key required)
security: []
tags:
  - name: Health
    description: API and database health check
  - name: Frameworks
    description: EU regulatory frameworks (CRA, NIS2, GDPR, etc.)
  - name: Articles
    description: Individual articles within a framework
  - name: Recitals
    description: Recitals (preamble paragraphs) within a framework
  - name: Requirements
    description: Extracted compliance requirements with stakeholder role mappings
  - name: Annexes
    description: Technical annexes attached to a framework
  - name: Compliance
    description: Compliance deadlines and key dates
  - name: Stats
    description: Coverage statistics per framework
  - name: Search
    description: Full-text search across articles, recitals, and requirements
  - name: Tags
    description: Semantic tags used to classify content
  - name: Changelog
    description: Content update history and data freshness
  - name: Compare
    description: Cross-framework article comparison
paths:
  /frameworks/{slug}/stats:
    get:
      tags:
        - Stats
      summary: Coverage statistics for a single framework
      description: |
        Returns article, recital, requirement, annex, and tag counts for the
        framework, including coverage percentages vs. expected totals.
      operationId: get_framework_stats
      parameters:
        - $ref: '#/components/parameters/SlugParam'
      responses:
        '200':
          description: Framework statistics
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FrameworkStats'
                  meta:
                    type: object
                    properties:
                      api_version:
                        type: string
                        example: '1.0'
        '404':
          description: Framework not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    SlugParam:
      name: slug
      in: path
      required: true
      description: Framework slug (e.g. `cra`, `nis2`, `gdpr`)
      schema:
        type: string
        pattern: ^[a-z0-9_]+$
        example: cra
  schemas:
    FrameworkStats:
      type: object
      properties:
        framework:
          type: string
          example: cra
        name:
          type: string
          example: Cyber Resilience Act
        status:
          type: string
          enum:
            - active
            - superseded
          example: active
        last_synced_at:
          type: string
          format: date-time
          nullable: true
        articles:
          type: object
          properties:
            total:
              type: integer
              example: 71
            expected:
              type: integer
              nullable: true
              example: 69
            coverage_pct:
              type: number
              nullable: true
              example: 102.9
        recitals:
          type: object
          properties:
            total:
              type: integer
              example: 130
            expected:
              type: integer
              nullable: true
              example: 173
            coverage_pct:
              type: number
              nullable: true
              example: 75.1
        requirements:
          type: object
          properties:
            total:
              type: integer
              example: 290
        annexes:
          type: object
          properties:
            total:
              type: integer
              example: 0
        tags:
          type: object
          properties:
            total:
              type: integer
              example: 10
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: NOT_FOUND
            message:
              type: string
              description: Human-readable error description
              example: Framework 'xyz' not found.

````