# Get Recent Queries

GET https://fai.buildwithfern.com/queries/{domain}

Reference: https://buildwithfern.com/learn/docs/ai-features/ask-fern/api-reference/query/get-recent-queries

## OpenAPI Specification

```yaml
openapi: 3.1.1
info:
  title: Get Recent Queries
  version: endpoint_query.get_recent_queries
paths:
  /queries/{domain}:
    get:
      operationId: get-recent-queries
      summary: Get Recent Queries
      tags:
        - - subpackage_query
      parameters:
        - name: domain
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: The page number for pagination
          required: false
          schema:
            type:
              - integer
              - 'null'
        - name: limit
          in: query
          description: The number of queries per page
          required: false
          schema:
            type:
              - integer
              - 'null'
        - name: cutoff_time
          in: query
          description: Only return queries after this time
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: include_assistant
          in: query
          description: Whether to include assistant responses in the results
          required: false
          schema:
            type:
              - boolean
              - 'null'
        - name: start_date
          in: query
          description: The start date of the period to retrieve analytics for
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: end_date
          in: query
          description: The end date of the period to retrieve analytics for
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: Authorization
          in: header
          description: >-
            Bearer authentication of the form `Bearer <token>`, where token is
            your auth token.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetQueriesResponse'
        '422':
          description: Validation Error
          content: {}
components:
  schemas:
    Query:
      type: object
      properties:
        query_id:
          type: string
        conversation_id:
          type: string
        domain:
          type: string
        text:
          type: string
        role:
          type: string
        source:
          type: string
        created_at:
          type: string
          format: date-time
        time_to_first_token:
          type:
            - number
            - 'null'
          format: double
        subqueries:
          type:
            - array
            - 'null'
          items:
            type: string
      required:
        - query_id
        - conversation_id
        - domain
        - text
        - role
        - source
        - created_at
    PaginationResponse:
      type: object
      properties:
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
      required:
        - total
        - page
        - limit
    GetQueriesResponse:
      type: object
      properties:
        queries:
          type: array
          items:
            $ref: '#/components/schemas/Query'
          description: List of queries matching the request criteria
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
          description: Pagination information
      required:
        - queries
        - pagination

```