Cabinhub News API v1.0.0

Docs / Read Usage

Read Usage

Read Usage

GET/v1/account/usage
Auth
cookie session
Cache-Control
no-store
Source of truth
clients/openapi.json and docs/API.md §12

The same numbers /v1/usage gives a key, for one customer in one UTC month. items_served and requests are traffic (every item in every served response, re-polls included); quota is the sum of monthly_quota over the customer's live keys, and 0 means unlimited.

Description: docs/API.md §12

Parameters

NameInRequiredTypeExampleNotes
monthquerynostring2026-11YYYY-MM; defaults to the current UTC month.

Example request

curl
Shell
curl -sS \
  'https://vg.tempproject.online/v1/account/usage?month=2026-11' \
  -H "Cookie: cbn_session=$NEWS_SESSION"
Python, standard library only
Python
import json
import os
import urllib.request

URL = "https://vg.tempproject.online/v1/account/usage?month=2026-11"


def call() -> dict:
    req = urllib.request.Request(URL, headers={
        "Cookie": f"cbn_session={os.environ['NEWS_SESSION']}",
    })
    with urllib.request.urlopen(req, timeout=15) as res:
        print(res.status, res.headers.get("ETag"))
        return json.loads(res.read().decode("utf-8"))


if __name__ == "__main__":
    body = call()
    print(json.dumps(body, indent=2, ensure_ascii=False)[:2000])
TypeScript, Node 18+, no dependencies
TypeScript
const res = await fetch(
  "https://vg.tempproject.online/v1/account/usage?month=2026-11",
  {
    method: "GET",
    headers: {
      cookie: `cbn_session=${process.env.NEWS_SESSION}`,
    },
  },
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(res.headers.get("etag"), await res.json());

The requests are generated from the path template and the parameters in clients/openapi.json, so a new parameter appears here without an edit to this site.

Example response

Response body
JSON
{
  "month": "2026-11",
  "quota": 45000,
  "billable_items": 412,
  "items_served": 1284,
  "requests": 96,
  "by_day": [
    {"day": "2026-11-10", "requests": 54, "items_served": 684},
    {"day": "2026-11-11", "requests": 42, "items_served": 600}
  ],
  "by_endpoint": [
    {"endpoint": "/v1/feed/{locale}", "requests": 60, "items_served": 1200},
    {"endpoint": "/v1/items/{item_id}", "requests": 36, "items_served": 84}
  ],
  "months_available": ["2026-10", "2026-11"]
}

Response example in docs/API.md §12 (GET /v1/account/usage)

Failures

This operation can answer 200, 401, 422. The full envelope for each status, with its body, is on Errors.