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

# Get insights

> Retrieve insights for the workspace. Supports three query modes: 'last' for a rolling time window (e.g., '30m', '2h'), 'from'/'to' for a date range (RFC3339), or no time params for most recent insights.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/insights
openapi: 3.0.0
info:
  description: >-
    REST API for accessing and managing your Nex data. Generate API keys from
    the Nex web UI and use them to authenticate requests.
  title: Nex Developer API
  contact: {}
  version: '1.0'
servers:
  - url: https://app.nex.ai/api/developers
security: []
paths:
  /v1/insights:
    get:
      tags:
        - Insights
      summary: Get insights
      description: >-
        Retrieve insights for the workspace. Supports three query modes: 'last'
        for a rolling time window (e.g., '30m', '2h'), 'from'/'to' for a date
        range (RFC3339), or no time params for most recent insights.
      operationId: getInsights
      parameters:
        - description: Rolling time window (e.g., '30m', '2h', '1d')
          name: last
          in: query
          required: false
          schema:
            type: string
        - description: Start of date range (RFC3339 UTC timestamp)
          name: from
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - description: End of date range (RFC3339 UTC timestamp)
          name: to
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - description: Maximum number of insights to return
          name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
      responses:
        '200':
          description: List of insights
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/developer.InsightsResponse'
        '400':
          description: Bad request - Invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    developer.InsightsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/developer.InsightResponse'
          description: Array of insight objects
    httpx.APIError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    developer.InsightResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique insight identifier
        workspace_id:
          type: string
          description: Workspace the insight belongs to
        content:
          type: string
          description: Human-readable insight text
        type:
          type: string
          description: Insight category or type
        entities:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              type:
                type: string
          description: Entities referenced in this insight
        created_at:
          type: string
          format: date-time
          description: When the insight was generated
  securitySchemes:
    ApiKeyAuth:
      description: 'API key for authentication (format: "Bearer YOUR_API_KEY")'
      type: apiKey
      name: Authorization
      in: header

````