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

# Get top actors by search count



## OpenAPI

````yaml /api/openapi.json get /api/admin/activity/top-actors
openapi: 3.1.0
info:
  description: HTTP API for the Rootprint log management platform.
  title: Rootprint API
  version: 0.4.0
servers:
  - description: Rootprint API
    url: https://example.com
security:
  - cookieAuth: []
paths:
  /api/admin/activity/top-actors:
    get:
      tags:
        - System monitoring
      summary: Get top actors by search count
      operationId: getApiAdminActivityTopActors
      parameters:
        - in: query
          name: window
          schema:
            enum:
              - 24h
              - 7d
              - 30d
            type: string
        - in: query
          name: limit
          schema:
            default: '10'
            maximum: 50
            minimum: 1
            pattern: ^\d+$
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TopActorRowResponse'
                type: array
          description: Successful response
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    TopActorRowResponse:
      properties:
        avgDurationMs:
          type: number
        count:
          type: number
        errorCount:
          type: number
        id:
          type: string
        indexes:
          items:
            type: string
          type: array
        kind:
          enum:
            - user
            - apiKey
          type: string
        label:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - kind
        - id
        - label
        - count
        - avgDurationMs
        - errorCount
        - indexes
      type: object
    ApiErrorBody:
      properties:
        error:
          properties:
            code:
              type: string
            details:
              items:
                properties:
                  message:
                    type: string
                  path:
                    type: string
                required:
                  - path
                  - message
                type: object
              type: array
            message:
              type: string
            requestId:
              type: string
            statusCode:
              type: number
          required:
            - code
            - message
            - statusCode
            - requestId
          type: object
      required:
        - error
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Request validation failed
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Authentication required
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Permission denied
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Resource not found
    InternalError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Internal server error
    ServiceUnavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorBody'
      description: Upstream service unavailable
  securitySchemes:
    cookieAuth:
      in: cookie
      name: better-auth.session_token
      type: apiKey

````