const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/bots?period=7d&filter=all", {
headers: { Authorization: `Bearer ${SESSION_TOKEN}` },
})
const bots = await res.json()
curl "https://api.openrevenue.com/api/v1/projects/example.com/bots?period=7d&filter=all" \
-H "Authorization: Bearer session_token"
{
"period": "7d",
"filter": "all",
"data": {
"totals": { "all": 120, "verified": 95, "ai_answer": 40, "indexing": 50, "training": 20, "other": 10 },
"series": [
{ "date": 1716163200000, "count": 18, "byBot": [{ "name": "Googlebot", "count": 12 }] }
],
"topBots": [
{ "slug": "googlebot", "name": "Googlebot", "category": "indexing", "count": 50, "verified": 48 }
],
"topPages": [
{ "path": "/", "count": 40 }
]
}
}
Bots
Returns bot traffic totals, a time series, top bots, and top crawled pages. Prefer a session Bearer token — API keys may receive empty traffic because the underlying action is session-only.
GET
/
api
/
v1
/
projects
/
{domain}
/
bots
const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/bots?period=7d&filter=all", {
headers: { Authorization: `Bearer ${SESSION_TOKEN}` },
})
const bots = await res.json()
curl "https://api.openrevenue.com/api/v1/projects/example.com/bots?period=7d&filter=all" \
-H "Authorization: Bearer session_token"
{
"period": "7d",
"filter": "all",
"data": {
"totals": { "all": 120, "verified": 95, "ai_answer": 40, "indexing": 50, "training": 20, "other": 10 },
"series": [
{ "date": 1716163200000, "count": 18, "byBot": [{ "name": "Googlebot", "count": 12 }] }
],
"topBots": [
{ "slug": "googlebot", "name": "Googlebot", "category": "indexing", "count": 50, "verified": 48 }
],
"topPages": [
{ "path": "/", "count": 40 }
]
}
}
Response
Errors
| Status | Error | Description |
|---|---|---|
401 | Invalid or missing API key | The Authorization header is missing or the Bearer token is invalid. |
404 | Project not found | No project with that domain exists for the authenticated user. |
const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/bots?period=7d&filter=all", {
headers: { Authorization: `Bearer ${SESSION_TOKEN}` },
})
const bots = await res.json()
curl "https://api.openrevenue.com/api/v1/projects/example.com/bots?period=7d&filter=all" \
-H "Authorization: Bearer session_token"
{
"period": "7d",
"filter": "all",
"data": {
"totals": { "all": 120, "verified": 95, "ai_answer": 40, "indexing": 50, "training": 20, "other": 10 },
"series": [
{ "date": 1716163200000, "count": 18, "byBot": [{ "name": "Googlebot", "count": 12 }] }
],
"topBots": [
{ "slug": "googlebot", "name": "Googlebot", "category": "indexing", "count": 50, "verified": 48 }
],
"topPages": [
{ "path": "/", "count": 40 }
]
}
}
Was this page helpful?