Project

Get Agent Visits

Changed on

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

get/agent-analytics/visits

Request

  • Base URL
    https://api.peec.ai/customer/v1
  • URL
    https://api.peec.ai/customer/v1/agent-analytics/visits
  • Auth
    • API key in header X-API-Key
    • or API key in query parameter api_key
    • or HTTP bearer

Query parameters

project_idstring

Required if using a company api key

Example:or_f45b94ba-5e35-4982-93ed-285e72ee14eb
limitinteger
offsetinteger
start_datestring date

full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21

Example:2025-09-22
end_datestring date

full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21

Example:2025-09-22
group_bystring[]

Dimension(s) to group visit counts by.

[
  "bot_id"
]
bot_idsstring[]

Optional list of bot IDs to filter by.

[
  "AppleBot",
  "GoogleBot"
]
verification_statusesstring[]

Verification statuses to include. Defaults to verified and unverifiable, excluding spoofed traffic. Include all three statuses to restore totals that contain spoofed traffic.

[
  "verified",
  "unverifiable"
]
time_bucket'hour' | 'day' | 'week' | 'month'

Optional time_bucket for grouping visits by time.

Example:day

Response

Success

total_countnumber required

Total number of grouped rows.

totalCountnumber required

Total number of grouped rows.

Example response

{
  "data": [
    {
      "bot_id": "GPTBot",
      "visits": 1402
    },
    {
      "bot_id": "AppleBot",
      "visits": 893
    }
  ],
  "total_count": 2,
  "totalCount": 2
}

Changes

    • breaking

      for the query request parameter limit, the type changed from number to integer

    • breaking

      for the query request parameter offset, the type changed from number to integer

    • warning

      for the query request parameter offset, the max was set to 9007199254740991.00

    • info

      added the new optional query request parameter verification_statuses