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

# List top errors

> List a run's top errors, with the failing tests grouped by their shared error log and ordered by the number of affected tests, most first. For an exhaustive list of failing tests regardless of error, use the [list test entities](/api-reference/test-entities/list) endpoint with a status filter instead.

<Info>Replace `{your-subdomain}` with your workspace's subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>

<Note>Returns at most the 20 largest error groups — when a run has more distinct errors, the smallest groups are omitted.</Note>


## OpenAPI

````yaml bundled/playdash.yaml GET /projects/{project_id}/runs/{run_id}/top_errors
openapi: 3.0.3
info:
  title: NeetoPlaydash APIs
  version: 1.0.0
  description: >-
    APIs to read projects, runs, test entities, result histories, traces and top
    errors from NeetoPlaydash.
servers:
  - description: NeetoPlaydash APIs
    url: https://{your-subdomain}.neetoplaydash.com/api/external/v1
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
tags:
  - name: Projects
    description: APIs to list projects in the workspace.
  - name: Insights
    description: >-
      APIs to fetch a project's aggregated run and test insights over a date
      range.
  - name: Runs
    description: APIs to list runs and fetch a run with its specs.
  - name: Test Entities
    description: APIs to list test entities and fetch a test entity with its outcomes.
  - name: Result Histories
    description: APIs to fetch the historical results of a test entity.
  - name: Traces
    description: APIs to fetch Playwright traces for a run or a test entity.
  - name: Top Errors
    description: >-
      APIs to fetch a run's top errors, with the failing tests grouped by their
      shared error log.
paths:
  /projects/{project_id}/runs/{run_id}/top_errors:
    get:
      tags:
        - Top Errors
      summary: List top errors
      description: >-
        List a run's top errors, with the failing tests grouped by their shared
        error log and ordered by the number of affected tests, most first. For
        an exhaustive list of failing tests regardless of error, use the [list
        test entities](/api-reference/test-entities/list) endpoint with a status
        filter instead.
      operationId: listTopErrors
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/accept_header'
        - $ref: '#/components/parameters/project_id_param'
        - $ref: '#/components/parameters/run_id_param'
      responses:
        '200':
          description: >-
            OK - Request succeeded. Returns at most 20 error groups, ordered by
            the number of affected tests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/top_error_list_response'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
    accept_header:
      in: header
      name: Accept
      description: >-
        Specifies the expected response format. Must be set to
        `application/json` for proper API communication.
      required: true
      schema:
        type: string
        enum:
          - application/json
        default: application/json
    project_id_param:
      in: path
      name: project_id
      description: >-
        Id of the project. You can get `project_id` by listing your projects
        using the [List projects](/api-reference/projects/list) API.
      required: true
      schema:
        type: string
        example: pdqmxlz
    run_id_param:
      in: path
      name: run_id
      description: >-
        Id of the run. You can get `run_id` by listing runs using the [List
        runs](/api-reference/runs/list) API.
      required: true
      schema:
        type: string
        example: kftwnab
  schemas:
    top_error_list_response:
      type: object
      properties:
        top_errors:
          type: array
          items:
            $ref: '#/components/schemas/top_error'
    top_error:
      type: object
      properties:
        count:
          type: integer
          description: Number of tests affected by the error.
          example: 3
        log:
          type: string
          description: >-
            The error log the tests are grouped by, without Playwright's
            per-test `Call log:` section.
          example: 'TimeoutError: locator.click: Timeout 10000ms exceeded.'
        test_entity_ids:
          type: array
          description: Unique identifiers of every test affected by the error.
          items:
            type: string
          example:
            - vhrscje
            - dhkscfj
        test_entities:
          type: array
          description: The affected tests, each with its spec, project, and describe path.
          items:
            $ref: '#/components/schemas/top_error_test_entity'
    top_error_test_entity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the test entity.
          example: vhrscje
        title:
          type: string
          description: Title of the test.
          example: adds an item to the cart
        spec:
          type: object
          description: The spec file the test belongs to.
          properties:
            id:
              type: string
              description: Unique identifier of the spec.
              example: bhkscfe
            title:
              type: string
              description: Title of the spec.
              example: cart.spec.ts
        project:
          type: string
          description: Title of the project the test belongs to.
          example: spinkart-web
        describe_path:
          type: array
          description: Titles of the describe blocks enclosing the test, outermost first.
          items:
            type: string
          example:
            - Cart

````