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

# List tags

> Returns a paginated list of tags matching the supplied filters, optionally with the linked-query count per tag.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/tags/list
openapi: 3.0.0
info:
  title: MentionLab Public API v0.3.4-rc
  description: ''
  version: 0.3.4-rc
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/tags/list:
    post:
      tags:
        - Tags
      summary: List tags
      description: >-
        Returns a paginated list of tags matching the supplied filters,
        optionally with the linked-query count per tag.
      operationId: TagsController_list
      parameters:
        - name: limit
          required: false
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 50
        - name: page
          required: false
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListTagDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PagingResponse'
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/TagResponse'
                  page:
                    $ref: '#/components/schemas/Paging'
        '400':
          description: >-
            The request failed validation — the body, query or path parameters
            are malformed or out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: The request is missing valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The authenticated principal lacks the required permission, or access
            to the requested organisation/project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    ListTagDto:
      type: object
      properties:
        name:
          type: string
          description: Filter tags by name using a case-insensitive partial match.
          example: branding
        with_queries_count:
          type: boolean
          description: Include the count of queries associated with each tag
          example: true
        sort:
          description: >-
            Sorting options for the tag list. Currently only the "name" field is
            sortable. Defaults to ascending order by name.
          example:
            - field: name
              direction: ASC
          type: array
          items:
            $ref: '#/components/schemas/SortOptions'
    PagingResponse:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Paging'
      required:
        - page
    TagResponse:
      type: object
      properties:
        id:
          type: number
          example: 1
          description: Unique identifier for the tag
        project:
          type: object
          description: The project this tag belongs to
          example: a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6
        name:
          type: string
          description: Name of the tag
          example: feature
        color:
          type: string
          description: Color of the tag in hex format
          example: '#3B82F6'
        queryCount:
          type: number
          example: 5
          description: Number of queries associated with this tag
        groupId:
          type: string
          description: >-
            ID of the tag group node this tag is filed under; null when
            ungrouped.
          format: uuid
          nullable: true
        groupName:
          type: string
          description: >-
            Name of the tag group node this tag is filed under; null when
            ungrouped.
          nullable: true
      required:
        - id
        - project
        - name
        - color
    Paging:
      type: object
      properties:
        totalRecords:
          type: number
        limit:
          type: number
        currentPage:
          type: number
        totalPages:
          type: number
        nextPage:
          type: number
        prevPage:
          type: number
      required:
        - totalRecords
        - limit
        - currentPage
        - totalPages
        - nextPage
        - prevPage
    ApiErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error.
          example: 400
        message:
          type: string
          description: >-
            Human-readable description of the error. Validation failures return
            an array of per-field validation errors instead of a single string.
          example: Validation failed
        error:
          type: string
          description: Short name of the HTTP error.
          example: Bad Request
      required:
        - statusCode
    SortOptions:
      type: object
      properties:
        field:
          type: string
          description: Field name to sort by
        direction:
          type: string
          enum:
            - ASC
            - DESC
          description: Sort direction
      required:
        - field
        - direction

````