Summarize billing events
Admin-only endpoint that aggregates billing events by plan, endpoint, and billable flag. Pass group_by=user to instead group by caller (user+plan) with the user's email attached, optionally narrowed with user_id or endpoint. Without an explicit time range, the summary is bounded to the last 30 days. The credits field sums charged credits only.
Request
- Base URL: https://api.crawlora.net/api/v1
- URL: https://api.crawlora.net/api/v1/admin/billing/summary
- Auth: API key in header x-api-key
Query parameters
Created-at lower bound in RFC3339 format
Created-at upper bound in RFC3339 format
Normalized endpoint or API path
Billing plan
Restrict to a single caller by user id
Comma-separated caller user ids to drop from every aggregate (e.g. static:kuma-monitor); ignored when user_id is set
Group by caller instead of plan+endpoint+billable
Billing event status
Filter billable or non-billable events
Headers
Admin API key required unless an Admin JWT is already present
Response
Billing summary
Example response
{
"code": 200,
"data": [
{
"billable": true,
"charged_requests": 1150,
"credits": 3450,
"email": "user@example.com",
"endpoint": "google/search",
"failed_requests": 5,
"non_billable_requests": 45,
"plan": "Pro",
"requests": 1200,
"user_id": "8f0b1c2d3e4f5a6b7c8d9e0f"
}
],
"msg": "OK"
}Changes
No recorded changes to this operation across all 2 revisions of this API.