---
title: "Summarize billing events"
method: GET
path: "/admin/billing/summary"
tags: ["Billing"]
---

# Summarize billing events

`GET /admin/billing/summary`

## 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`

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.

## Query parameters

- `from` string
- `to` string
- `endpoint` string
- `plan` 'Free' | 'Starter' | 'Growth' | 'Pro' | 'Business' | 'Enterprise' | 'Admin'
- `user_id` string
- `exclude_user_id` string
- `group_by` 'user'
- `event_status` 'reserved' | 'charged' | 'non_billable' | 'failed'
- `billable` boolean

## Headers

- `x-api-key` string, required

## Response `200`

Billing summary

- BillingBillingSummaryResponseDoc
  - `code` integer
  - `data` BillingBillingSummaryItemDoc[]
    - `billable` boolean
    - `charged_requests` integer
    - `credits` integer
    - `email` string
    - `endpoint` string
    - `failed_requests` integer
    - `non_billable_requests` integer
    - `overage` integer
    - `plan` string
    - `requests` integer
    - `user_id` string
  - `msg` string

## Other responses

- `400`: Invalid query parameters
- `401`: Authentication required
- `403`: Admin plan required
- `500`: Internal server error

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/0497899e2016?raw)
