> ## 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 the project's queries

> Sorted by text, A to Z, unless `sort` says otherwise.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs/v2-json get /api/v2/projects/{projectId}/queries
openapi: 3.0.0
info:
  title: MentionLab Public API v2
  description: ''
  version: 0.6.48
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/v2/projects/{projectId}/queries:
    get:
      tags:
        - Queries
      summary: List the project's queries
      description: Sorted by text, A to Z, unless `sort` says otherwise.
      operationId: QueriesV2Controller_list_v2
      parameters:
        - name: page
          required: false
          in: query
          description: >-
            Which slice of the matched rows to return, counted from 1. Rows
            skipped are (page - 1) * limit.
          schema:
            minimum: 1
            maximum: 1000000
            default: 1
            example: 2
            type: integer
        - name: limit
          required: false
          in: query
          description: >-
            How many rows one page holds, capped at 100 to keep a single
            response bounded.
          schema:
            minimum: 1
            maximum: 100
            default: 25
            example: 50
            type: integer
        - name: search
          required: false
          in: query
          description: Substring of the query text, accents and apostrophes folded
          schema:
            example: running shoes
            type: string
        - name: languages
          required: false
          in: query
          description: >-
            Queries in any of these languages, as reference locale language
            codes
          schema:
            example:
              - en
              - fr
            type: array
            items:
              type: string
        - name: countries
          required: false
          in: query
          description: >-
            Queries run for any of these markets, as country codes of the
            reference locales
          schema:
            example:
              - US
              - GB
            type: array
            items:
              type: string
        - name: types
          required: false
          in: query
          description: Queries of any of these types; an untyped query matches none
          schema:
            type: array
            items:
              $ref: '#/components/schemas/QueryType'
        - name: tagIds
          required: false
          in: query
          description: Queries carrying these tags, by tag id. See tagMode
          schema:
            example:
              - 12
              - 34
            type: array
            items:
              type: number
        - name: tagGroupIds
          required: false
          in: query
          description: Queries with a tag of these groups. See tagMode
          schema:
            example:
              - 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
            type: array
            items:
              type: string
              format: uuid
        - name: tagMode
          required: false
          in: query
          description: >-
            "and" (default): every tag, and a tag of each group. "or": any tag,
            or a tag of any group
          schema:
            type: string
            enum:
              - and
              - or
        - name: recurrenceSettingIds
          required: false
          in: query
          description: Queries on any of these schedules
          schema:
            example:
              - 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
            type: array
            items:
              type: string
              format: uuid
        - name: hasRecurrenceSetting
          required: false
          in: query
          description: Whether a schedule runs them
          schema:
            example: true
            type: boolean
        - name: sort
          required: false
          in: query
          description: 'Comma-separated field:asc|desc pairs. Sortable: query, updatedAt.'
          schema:
            example: query:asc
            type: string
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
        - name: projectId
          required: true
          in: path
          schema:
            format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PagingResponse'
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/QueryV2Response'
                  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:
    QueryType:
      type: string
      enum:
        - comparative
        - informative
        - perception
      description: >-
        The type of question the query asks: "comparative" (compares options),
        "informative" (seeks facts or how-to information) or "perception"
        (probes opinions about a brand).
    PagingResponse:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Paging'
      required:
        - page
    QueryV2Response:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of the query, as used on every per-query route
        query:
          type: string
          example: best running shoes
          description: The query text sent to the engines, exactly as it is run
        language:
          type: string
          description: >-
            Language the query is written in, as a language code of the
            reference locales
          example: en
        country:
          type: string
          example: US
          description: >-
            Market the query is run for, as a country code of the reference
            locales
        type:
          nullable: true
          description: How the query is classified; null when it is not
          allOf:
            - $ref: '#/components/schemas/QueryType'
        tags:
          description: Tags linked to the query; empty when it carries none
          type: array
          items:
            $ref: '#/components/schemas/QueryTagV2'
        recurrenceSetting:
          nullable: true
          description: The schedule that runs it, if any
          type: object
          allOf:
            - $ref: '#/components/schemas/QueryRecurrenceSettingV2'
        updatedAt:
          type: string
          format: date-time
          description: >-
            When the query or its tags last changed, as an ISO 8601 instant in
            UTC
      required:
        - id
        - query
        - language
        - country
        - type
        - tags
        - recurrenceSetting
        - updatedAt
    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
    QueryTagV2:
      type: object
      properties:
        id:
          type: number
          description: Id of the tag, used to link or unlink it on a query
          example: 12
        name:
          type: string
          description: Label of the tag, unique within the project
          example: Branded
        color:
          type: string
          description: 'Colour of the tag, as a #rrggbb hex string'
          example: '#3b82f6'
      required:
        - id
        - name
        - color
    QueryRecurrenceSettingV2:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of the schedule, as used on the recurrence-settings routes
          example: 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
        name:
          type: string
          description: Label the schedule is listed under, usually its cadence
          example: Weekly
      required:
        - id
        - name

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.