spicrawlspicrawlDocs
Usage

Report drift between billed usage and the request log for one day

Compares billed usage for one UTC day with usage re-derived from the Postgres request log.

Requires scope: read

GET
/v1/usage/reconciliation

Compares billed usage for one UTC day with usage re-derived from the Postgres request log. Report only; nothing is repaired (repairable is always false).

Pitfalls:

  • Read interpretation before drift. In the current deployment the Postgres request log is usually empty (request_log_rows: 0), so every billed row shows as absent_from_request_log. That is not evidence of overbilling.
  • Defaults to yesterday (UTC); today is still accumulating.

Authorization

bearerAuth
AuthorizationBearer <token>

Authorization: Bearer <key>. Read the key from the SPICRAWL_API_KEY environment variable; never hard-code or log it. spicrawl_test_… keys can never spend live credits. Scopes: scrape, batch, sessions (granted by default), browser and read (granted deliberately). A missing scope is 403 ERR::AUTH::INSUFFICIENT_SCOPE naming the scope.

In: header

Query Parameters

day?string

UTC day to reconcile, YYYY-MM-DD. Defaults to yesterday.

Formatdate

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/v1/usage/reconciliation"
{  "day": "2026-09-21",  "drift": [    {      "project_id": "01J9Y0000000000000000PROJ1",      "metric": "credits",      "stored_qty": 3100000000,      "observed_qty": 0,      "delta": -3100000000,      "action": "absent_from_request_log"    }  ],  "request_log_rows": 0,  "interpretation": "The Postgres request log holds no rows for this day, so there is nothing to re-derive usage from and every billed row is reported as `absent_from_request_log`. ...",  "repairable": false}