curl --request GET \
--url https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get Agent Traffic
Retrieve aggregated bot and AI agent traffic data for a specific site.
This endpoint provides visibility into how AI agents and bots are accessing your web properties. Use it to analyze traffic patterns, identify top agents, and understand crawl behavior over time.
Available Dimensions
The following dimensions can be included in the fields parameter to group results:
| Field | Description |
|---|---|
date | Daily timestamp for the traffic record |
site | The site’s registered domain, lowercase, without scheme or www. |
path | URL path on the site |
agent_source | The source/origin of the agent (e.g., OpenAI, Google, Anthropic) |
agent_type | Classification of the agent type |
Metrics
Traffic counts are automatically included in the response based on the selected dimensions.
curl --request GET \
--url https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrunchai.com/v1/{brand_id}/sites/{site_id}/agent-traffic")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the site to retrieve agent traffic for.
26[0-7][0123456789ABCDEFGHJKMNPQRSTVWXYZ]{25}Query Parameters
Start date for the query range (inclusive). Format: YYYY-MM-DD.
End date for the query range (inclusive). Format: YYYY-MM-DD.
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 aggregation bucket for grouping results. Options: day, week, month. Defaults to day.
day, week Filter results to a specific URL path or path prefix.
Maximum number of rows to return. Use with offset for pagination.
1 <= x <= 100000Number of rows to skip before returning results. Use with limit for pagination.
x >= 0Response
Successful Response
Response containing agent traffic data with metadata and aggregated traffic records.