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

# Get Agent Visits

> Aggregate agent access log visits grouped by a chosen dimension (bot, response status, host, path).



## OpenAPI

````yaml https://api.peec.ai/customer/v1/openapi/json get /agent-analytics/visits
openapi: 3.0.3
info:
  title: Peec AI Customer API
  description: Development documentation
  version: 1.0.0
  contact:
    name: Peec AI Team
    email: support@peec.ai
servers:
  - url: https://api.peec.ai/customer/v1
security: []
paths:
  /agent-analytics/visits:
    get:
      tags:
        - Project
      summary: Get Agent Visits
      description: >-
        Aggregate agent access log visits grouped by a chosen dimension (bot,
        response status, host, path).
      operationId: getAgent-analyticsVisits
      parameters:
        - name: project_id
          in: query
          required: false
          schema:
            description: Required if using a company api key
            example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
            type: string
        - name: limit
          in: query
          required: false
          schema:
            default: 1000
            type: number
            minimum: 1
            maximum: 10000
        - name: offset
          in: query
          required: false
          schema:
            default: 0
            type: number
            minimum: 0
        - name: start_date
          in: query
          required: false
          schema:
            default: '2026-01-01'
            description: >-
              full-date notation as defined by RFC 3339, section 5.6, for
              example, 2017-07-21
            example: '2025-09-22'
            type: string
            format: date
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
        - name: end_date
          in: query
          required: false
          schema:
            default: '2026-01-01'
            description: >-
              full-date notation as defined by RFC 3339, section 5.6, for
              example, 2017-07-21
            example: '2025-09-22'
            type: string
            format: date
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
        - name: group_by
          in: query
          required: false
          schema:
            description: Dimension(s) to group visit counts by.
            example:
              - bot_id
            type: array
            items:
              type: string
              enum:
                - bot_id
                - response_status
                - request_host
                - request_path
        - name: bot_ids
          in: query
          required: false
          schema:
            description: Optional list of bot IDs to filter by.
            example:
              - AppleBot
              - GoogleBot
            type: array
            items:
              type: string
        - name: time_bucket
          in: query
          required: false
          schema:
            description: Optional time_bucket for grouping visits by time.
            example: day
            type: string
            enum:
              - hour
              - day
              - week
              - month
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        bot_id:
                          type: string
                          example: GPTBot
                        response_status:
                          type: number
                          example: 200
                        request_host:
                          type: string
                          example: example.com
                        time_bucket:
                          example: '2026-03-01 00:00:00'
                          type: string
                        request_path:
                          type: string
                          example: /path
                        visits:
                          type: number
                          example: 1402
                      required:
                        - visits
                  total_count:
                    type: number
                    description: Total number of grouped rows.
                    example: 10
                  totalCount:
                    type: number
                    description: Total number of grouped rows.
                    example: 10
                    deprecated: true
                required:
                  - data
                  - total_count
                  - totalCount
                description: Success
                example:
                  data:
                    - bot_id: GPTBot
                      visits: 1402
                    - bot_id: AppleBot
                      visits: 893
                  total_count: 2
                  totalCount: 2
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
        - BearerAuth: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````