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

# Get the bot log report

> Returns the AI bot traffic of the site from the uploaded server logs: an overview, a trend, the visit purposes and the response statuses. Use `date_range` to select the period (`7g`, `1a`, `3a`, `6a`, `1y` or `custom` with `since` and `until`). Use `compare` to select the comparison period (`previous`, `previous_year` or `custom` with `compare_since` and `compare_until`).



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sites/{site_uuid}/bot-logs
openapi: 3.0.3
info:
  title: Perquery API
  version: 1.0.0
  description: Read-only access to the data of your Perquery organization.
servers:
  - url: https://perquery.ai/api
security:
  - apiKey: []
paths:
  /v1/sites/{site_uuid}/bot-logs:
    get:
      tags:
        - Bot logs
      summary: Get the bot log report
      description: >-
        Returns the AI bot traffic of the site from the uploaded server logs: an
        overview, a trend, the visit purposes and the response statuses. Use
        `date_range` to select the period (`7g`, `1a`, `3a`, `6a`, `1y` or
        `custom` with `since` and `until`). Use `compare` to select the
        comparison period (`previous`, `previous_year` or `custom` with
        `compare_since` and `compare_until`).
      operationId: bot_log_report
      parameters:
        - in: query
          name: compare
          schema:
            enum:
              - previous
              - previous_year
              - custom
            type: string
            default: previous
            minLength: 1
          description: |-
            * `previous` - previous
            * `previous_year` - previous_year
            * `custom` - custom
        - in: query
          name: compare_since
          schema:
            type: string
            format: date
          description: The first day of a `custom` comparison.
        - in: query
          name: compare_until
          schema:
            type: string
            format: date
          description: The last day of a `custom` comparison.
        - in: query
          name: date_range
          schema:
            enum:
              - 7g
              - 1a
              - 3a
              - 6a
              - 1y
              - custom
            type: string
            default: 1a
            minLength: 1
          description: |-
            * `7g` - 7g
            * `1a` - 1a
            * `3a` - 3a
            * `6a` - 6a
            * `1y` - 1y
            * `custom` - custom
        - in: query
          name: since
          schema:
            type: string
            format: date
          description: The first day of a `custom` range.
        - in: path
          name: site_uuid
          schema:
            type: string
            format: uuid
          required: true
        - in: query
          name: until
          schema:
            type: string
            format: date
          description: The last day of a `custom` range.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Report'
          description: ''
      security:
        - apiKey: []
components:
  schemas:
    Report:
      type: object
      properties:
        overview:
          $ref: '#/components/schemas/Overview'
        trend:
          type: array
          items:
            $ref: '#/components/schemas/TrendLine'
        purposes:
          type: array
          items:
            $ref: '#/components/schemas/PurposeShare'
        statuses:
          type: array
          items:
            $ref: '#/components/schemas/StatusShare'
      required:
        - overview
        - purposes
        - statuses
        - trend
    Overview:
      type: object
      properties:
        total_visits:
          type: integer
        delta:
          type: number
          format: double
          nullable: true
        ok_rate:
          type: number
          format: double
        top_bot:
          type: string
        first_day:
          type: string
          format: date
          nullable: true
        last_day:
          type: string
          format: date
          nullable: true
      required:
        - delta
        - first_day
        - last_day
        - ok_rate
        - top_bot
        - total_visits
    TrendLine:
      type: object
      properties:
        bot:
          type: string
        points:
          type: array
          items:
            $ref: '#/components/schemas/TrendPoint'
      required:
        - bot
        - points
    PurposeShare:
      type: object
      properties:
        purpose:
          $ref: '#/components/schemas/BotPurpose'
        hits:
          type: integer
        share:
          type: number
          format: double
      required:
        - hits
        - purpose
        - share
    StatusShare:
      type: object
      properties:
        code:
          type: string
        hits:
          type: integer
        share:
          type: number
          format: double
      required:
        - code
        - hits
        - share
    TrendPoint:
      type: object
      properties:
        day:
          type: string
          format: date
        hits:
          type: integer
      required:
        - day
        - hits
    BotPurpose:
      enum:
        - citation
        - indexing
        - training
      type: string
      description: |-
        * `citation` - citation
        * `indexing` - indexing
        * `training` - training
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: '`ApiKey pq_<prefix>_<secret>`. An API key gives read-only access.'

````

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