Skip to main content
GET
/
{brand_id}
/
sites
/
{site_id}
/
agent-traffic
Get Agent Traffic
curl --request GET \
  --url https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic \
  --header 'Authorization: Bearer <token>'
{
  "meta": {
    "start_date": "2023-12-25",
    "end_date": "2023-12-25",
    "time_bucket": "day"
  },
  "data": [
    {
      "requests": 123,
      "date": "<string>",
      "site": "<string>",
      "path": "<string>",
      "agent_source": "<string>",
      "agent_type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

brand_id
integer
required
site_id
required

The unique identifier of the site to retrieve agent traffic for.

Required string length: 26

Query Parameters

start_date
string<date>
required

Start date for the query range (inclusive). Format: YYYY-MM-DD.

end_date
string<date>
required

End date for the query range (inclusive). Format: YYYY-MM-DD.

fields
string | null

Comma-separated list of dimensions to include in the response. Available dimensions: date, site, path, agent_source, agent_type. If not specified, returns aggregated totals.

time_bucket
enum<string>
default:day

Time aggregation bucket for grouping results. Options: day, week, month. Defaults to day.

Available options:
day,
week
path
string | null

Filter results to a specific URL path or path prefix.

limit
integer
default:10000

Maximum number of rows to return. Use with offset for pagination.

Required range: 1 <= x <= 100000
offset
integer
default:0

Number of rows to skip before returning results. Use with limit for pagination.

Required range: x >= 0

Response

Successful Response

Response containing agent traffic data with metadata and aggregated traffic records.

meta
AgentTrafficMeta · object
required

Query metadata including fields and date range.

data
AgentTrafficRow · object[]
required

Array of agent traffic records matching the query criteria.