> ## 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.

# Get all queries

> Returns a paginated list of the project's queries, applying the filters and sorting from the request body; each result includes its tag IDs.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/queries/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/queries/list:
    post:
      tags:
        - Queries
      summary: Get all queries
      description: >-
        Returns a paginated list of the project's queries, applying the filters
        and sorting from the request body; each result includes its tag IDs.
      operationId: QueriesController_list
      parameters:
        - name: limit
          required: false
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 500
            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/ListQueryDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PagingResponse'
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/QueryResponse'
                  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:
    ListQueryDto:
      type: object
      properties:
        query:
          type: string
          description: >-
            Free-text search filter applied to the query text. Performs a
            case-insensitive partial match against the query name.
          example: climate change
        languages:
          type: array
          description: >-
            Filter queries by language. Accepts one or more supported language
            codes; only queries matching any of the provided codes are returned.
          example:
            - en
            - fr
          items:
            type: string
            enum:
              - en
              - es
              - fr
              - pt
              - de
              - it
              - tr
              - nl
              - pl
              - sq
              - ar
              - hy
              - az
              - ba
              - eu
              - be
              - bn
              - bho
              - bs
              - bg
              - yue
              - ca
              - zh-cn
              - hr
              - cs
              - da
              - et
              - fo
              - fi
              - gl
              - ka
              - el
              - gu
              - hi
              - hu
              - id
              - ga
              - ja
              - jv
              - kn
              - ks
              - kk
              - kok
              - ko
              - ky
              - lv
              - lt
              - ru
              - mk
              - mai
              - ms
              - mt
              - cmn
              - mr
              - mwr
              - nan
              - ro-MD
              - mn
              - cnr
              - ne
              - 'no'
              - or
              - ps
              - fa
              - pa
              - raj
              - ro
              - sa
              - sat
              - sr
              - sd
              - si
              - sk
              - sl
              - sv
              - uk
              - ur
              - uz
              - vi
              - cy
              - wuu
              - th
        countries:
          type: array
          description: >-
            Filter queries by country. Accepts one or more supported country
            codes; only queries matching any of the provided codes are returned.
          example:
            - BE
            - FR
          items:
            type: string
            enum:
              - AD
              - AE
              - AF
              - AG
              - AL
              - AM
              - AO
              - AR
              - AT
              - AU
              - AZ
              - BA
              - BB
              - BD
              - BE
              - BF
              - BG
              - BH
              - BI
              - BJ
              - BN
              - BO
              - BR
              - BS
              - BT
              - BW
              - BZ
              - CA
              - CD
              - CF
              - CG
              - CH
              - CI
              - CL
              - CN
              - CM
              - CO
              - CR
              - CV
              - CY
              - CZ
              - DE
              - DJ
              - DK
              - DM
              - DO
              - DZ
              - EC
              - EE
              - EG
              - ER
              - ES
              - ET
              - FI
              - FJ
              - FM
              - FR
              - GA
              - GB
              - GD
              - GE
              - GH
              - GM
              - GN
              - GQ
              - GR
              - GT
              - GW
              - GY
              - HK
              - HN
              - HR
              - HT
              - HU
              - ID
              - IE
              - IL
              - IN
              - IQ
              - IS
              - IT
              - JM
              - JO
              - JP
              - KE
              - KG
              - KH
              - KI
              - KM
              - KR
              - KW
              - KZ
              - LA
              - LB
              - LC
              - LI
              - LK
              - LR
              - LS
              - LT
              - LU
              - LV
              - LY
              - MA
              - MC
              - MD
              - ME
              - MG
              - MH
              - MK
              - ML
              - MM
              - MN
              - MR
              - MT
              - MU
              - MV
              - MW
              - MX
              - MY
              - MZ
              - NA
              - NE
              - NG
              - NI
              - NL
              - 'NO'
              - NP
              - NR
              - NZ
              - OM
              - PA
              - PE
              - PG
              - PH
              - PK
              - PL
              - PS
              - PT
              - PW
              - PY
              - QA
              - RO
              - RS
              - RW
              - SA
              - SB
              - SC
              - SD
              - SE
              - SG
              - SI
              - SK
              - SL
              - SM
              - SN
              - SO
              - SR
              - SS
              - SV
              - SZ
              - TD
              - TG
              - TH
              - TJ
              - TL
              - TM
              - TN
              - TO
              - TR
              - TT
              - TV
              - TW
              - TZ
              - UA
              - UG
              - US
              - UY
              - UZ
              - VA
              - VN
              - VU
              - WS
              - YE
              - ZA
              - ZM
              - ZW
        types:
          type: array
          description: >-
            Filter queries by type. Accepts one or more types; only queries
            matching any of the provided types are returned. Untyped queries are
            excluded when this filter is set.
          items:
            $ref: '#/components/schemas/QueryType'
        hasRecurrenceSetting:
          type: boolean
          description: >-
            Filter queries by whether they are linked to a recurrence setting.
            `true` returns only linked (recurring) queries; `false` returns only
            unlinked queries.
          example: false
        recurrenceSettingIds:
          description: >-
            Filter to queries that are EITHER unassigned (no recurrence setting)
            OR linked to one of the given recurrence setting ids. Omit to apply
            no such filter.
          example:
            - 018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c
          type: array
          items:
            type: string
        tagIds:
          description: >-
            Filter queries by associated tag identifiers. Returns queries linked
            to any of the provided tag IDs.
          example:
            - 12
            - 34
          type: array
          items:
            type: number
        tagGroupIds:
          description: >-
            Filter queries by tag group IDs. Returns queries linked to any tag
            filed under a selected group. Combines with tagIds as a union.
          example:
            - 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
          type: array
          items:
            type: string
        tagNames:
          description: >-
            Filter queries by associated tag names. Performs a case-insensitive
            match and returns queries linked to any of the provided tag names.
          example:
            - politics
            - economy
          type: array
          items:
            type: string
        sort:
          description: >-
            Sorting options for the result set. Each entry specifies a field and
            direction. Sortable fields are "query" and "updatedAt". Defaults to
            sorting by query ascending.
          example:
            - field: query
              direction: ASC
          type: array
          items:
            $ref: '#/components/schemas/SortOptions'
    PagingResponse:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Paging'
      required:
        - page
    QueryResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier (UUID) of the query.
          example: a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6
          format: uuid
        project:
          type: object
          description: The project this query belongs to
          example: a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6
        tags:
          type: object
          example:
            - 1
            - 2
            - 3
          description: The tags IDs this query belongs to
        query:
          type: string
          description: The search query text tracked for this entry.
          example: mentionlab
        language:
          type: string
          description: ISO 639-1 language code used to scope the query results.
          example: en
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code used to scope the query results.
          example: US
        type:
          description: >-
            The type of question the query asks. Null for queries that have not
            been classified.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/QueryType'
        recurrenceSetting:
          nullable: true
          description: >-
            The recurrence setting this query is linked to, or null when the
            query does not recur.
          type: object
          allOf:
            - $ref: '#/components/schemas/RecurrenceSettingRefDto'
        updatedAt:
          format: date-time
          type: string
          description: Timestamp of the last time the query was updated.
          example: '2023-08-22T10:00:00.000Z'
      required:
        - id
        - project
        - tags
        - query
        - language
        - country
        - 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
    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).
    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
    RecurrenceSettingRefDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the recurrence setting
          example: 018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c
        name:
          type: string
          description: Display name of the recurrence setting
          example: Daily core queries
      required:
        - id
        - name

````