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

# Get endpoint search count

> Returns total count of endpoints matching the same filters as the search endpoint. Use this to get totalCount for pagination without running the count in the search query.



## OpenAPI

````yaml https://api.wirespeed.co/v1/openapi.json post /v1/endpoint/count
openapi: 3.0.0
info:
  title: Wirespeed API
  description: The public Wirespeed API. v1 is the first stable contract.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.wirespeed.co
security: []
tags: []
paths:
  /v1/endpoint/count:
    post:
      tags:
        - Endpoint
      summary: Get endpoint search count
      description: >-
        Returns total count of endpoints matching the same filters as the search
        endpoint. Use this to get totalCount for pagination without running the
        count in the search query.
      operationId: EndpointController_searchCount
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EndpointSearchDto'
      responses:
        '200':
          description: Total count of endpoints matching the search criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointSearchCountResponse'
        '400':
          description: Invalid search parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
      security:
        - bearer: []
components:
  schemas:
    EndpointSearchDto:
      type: object
      properties:
        size:
          type: number
        page:
          type: number
        filter:
          type: string
          enum:
            - name
            - OS
            - ip
            - edr_id
            - mdm_id
            - integration_source_id
            - custom_attribute
          description: Field to filter Critical Asset automation by
        search:
          type: string
        orderBy:
          type: string
        orderDir:
          type: string
          enum:
            - asc
            - desc
        hvaOnly:
          type: boolean
          description: Only return Critical Assets
        onlyContained:
          type: boolean
          description: Only return currently contained endpoints
        userId:
          type: string
          description: Filter by specific user ID
        showUnmanagedEndpoints:
          type: boolean
          description: Include unmanaged endpoints in results
        operatingSystemCategories:
          type: array
          description: Filter by OS categories (supports multiple)
          items:
            type: string
            enum:
              - Windows
              - Windows Server
              - macOS
              - Linux
              - iOS
              - Android
              - ChromeOS
              - Network Device
              - Other
        onlyLive:
          type: boolean
          description: Only return live/online endpoints
        integrationIds:
          description: Filter by integration IDs (supports multiple)
          type: array
          items:
            type: string
        groupIds:
          description: Filter by group IDs (supports multiple)
          type: array
          items:
            type: string
        groupFilterOperator:
          type: string
          enum:
            - and
            - or
          description: >-
            Operator for combining multiple group filters. "and" = must be in
            ALL groups, "or" = must be in ANY group. Defaults to "or".
        searchAttributeKey:
          type: string
          description: >-
            Custom attribute key to match when filter is custom_attribute
            (dot-separated path e.g. "labels")
        dedupeCanonicalRoots:
          type: boolean
          description: >-
            When true and asset deduplication is enabled for the team, return
            only canonical representative rows (canonical_id IS NULL)
        onlyCanonicalClustersWithDuplicates:
          type: boolean
          description: >-
            When true together with dedupeCanonicalRoots and asset
            deduplication, return only canonical roots that have at least one
            merged duplicate from another source
        teamId:
          type: string
          description: Filter endpoints by team ID (for service providers)
        canonicalClusterOfEndpointId:
          type: string
          description: >-
            When set and asset deduplication is enabled, return only endpoint
            rows in the canonical cluster containing this id (root or child)
    EndpointSearchCountResponse:
      type: object
      properties:
        totalCount:
          type: number
          description: Total number of endpoints matching the search criteria
      required:
        - totalCount
    HttpError:
      type: object
      properties:
        message:
          type: string
        statusCode:
          type: number
      required:
        - message
        - statusCode
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````