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

# Get queue statistics

> Get detailed statistics about a moderation queue including review times, action counts, and trends



## OpenAPI

````yaml get /queue/{id}/stats
openapi: 3.1.0
info:
  title: Moderation API
  description: API for automated content moderation
  version: 1.1.0
servers:
  - url: https://api.moderationapi.com/v1
security: []
tags:
  - name: Actions
  - name: Queues
  - name: Webhooks
  - name: Wordlist
  - name: UserReports
  - name: Voice
    description: Real-time voice moderation over WebSocket.
externalDocs:
  url: https://docs.moderationapi.com
paths:
  /queue/{id}/stats:
    get:
      tags:
        - review-queues
      summary: Get queue statistics
      description: >-
        Get detailed statistics about a moderation queue including review times,
        action counts, and trends
      operationId: queueView-openGetStats
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: The queue ID
          required: true
          description: The queue ID
        - in: query
          name: withinDays
          schema:
            default: '30'
            description: Number of days to analyze statistics for
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reviewStats:
                    type: object
                    properties:
                      averageTimeToReview:
                        type: number
                        description: Average time in milliseconds to review an item
                      totalReviewed:
                        type: number
                        description: Total number of items reviewed
                      totalPending:
                        type: number
                        description: Total number of items pending review
                    required:
                      - averageTimeToReview
                      - totalReviewed
                      - totalPending
                    additionalProperties: false
                  actionStats:
                    type: array
                    items:
                      type: object
                      properties:
                        actionId:
                          type: string
                          description: ID of the moderation action
                        actionName:
                          type: string
                          description: Name of the moderation action
                        count:
                          type: number
                          description: Number of times this action was taken
                        percentageOfTotal:
                          type: number
                          description: Percentage this action represents of all actions
                      required:
                        - actionId
                        - actionName
                        - count
                        - percentageOfTotal
                      additionalProperties: false
                  topReviewers:
                    type: array
                    items:
                      type: object
                      properties:
                        userId:
                          type: string
                          description: ID of the reviewer
                        name:
                          type: string
                          description: Name of the reviewer
                        reviewCount:
                          type: number
                          description: Number of items reviewed
                        averageTimePerReview:
                          type: number
                          description: Average review time in milliseconds
                        accuracyScore:
                          description: >-
                            Optional accuracy score based on review quality
                            metrics
                          type: number
                        topActions:
                          type: array
                          items:
                            type: object
                            properties:
                              actionId:
                                type: string
                                description: Most used action by this reviewer
                              actionName:
                                type: string
                                description: Name of the most used action
                              count:
                                type: number
                                description: Number of times this action was used
                            required:
                              - actionId
                              - actionName
                              - count
                            additionalProperties: false
                          description: Most common actions taken by this reviewer
                      required:
                        - userId
                        - name
                        - reviewCount
                        - averageTimePerReview
                        - topActions
                      additionalProperties: false
                    description: List of top reviewers and their statistics
                  trends:
                    type: object
                    properties:
                      dailyReviewCounts:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              description: Date in YYYY-MM-DD format
                            count:
                              type: number
                              description: Number of reviews on this date
                          required:
                            - date
                            - count
                          additionalProperties: false
                      flaggedContentTrends:
                        type: array
                        items:
                          type: object
                          properties:
                            label:
                              type: string
                              description: Content flag/label
                            trend:
                              type: number
                              description: >-
                                Trend indicator (-1 to 1) showing if this type
                                of flagged content is increasing or decreasing
                          required:
                            - label
                            - trend
                          additionalProperties: false
                    required:
                      - dailyReviewCounts
                      - flaggedContentTrends
                    additionalProperties: false
                required:
                  - reviewStats
                  - actionStats
                  - topReviewers
                  - trends
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - Authorization: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const response = await client.queue.getStats('id');

            console.log(response.actionStats);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            response = client.queue.get_stats(
                id="id",
            )
            print(response.action_stats)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            response = moderation_api.queue.get_stats("id")


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $response = $client->queue->getStats('id', withinDays: 'withinDays');

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Queue;

            ModerationApiClient client = new();

            QueueGetStatsParams parameters = new() { ID = "id" };

            var response = await client.Queue.GetStats(parameters);

            Console.WriteLine(response);
components:
  schemas:
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````