Usage

Usage for the current or requested billing month.

GET
/v1/usage

What this customer used, session by session.

The month's counter says how much; this says what it was made of. Which is what anyone asks the moment a number looks wrong - which session, how long, how many pages, on which engine - and what nobody could answer before, because a session's record was deleted the moment it ended.

Sessions that never came up are listed with billable: false rather than left out: they cost us residential bytes on the exit check, and a usage page that hides our own failures flatters us.

X-API-Key<token>

The account key.

In: header

Query Parameters

period?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/usage"
{
  "period": "string",
  "resets": "string",
  "totals": {
    "sessions": 0,
    "billable_sessions": 0,
    "proxy_bytes": 0,
    "proxy_gb": 0,
    "session_seconds": 0,
    "pages": 0,
    "metered_bytes_this_period": 0
  },
  "sessions": [
    {
      "session_id": "string",
      "started_at": 0,
      "ended_at": 0,
      "seconds": 0,
      "proxy_bytes": 0,
      "cdp_bytes": 0,
      "pages": 0,
      "soft_navigations": 0,
      "engine": "string",
      "country": "string",
      "exit_ip": "string",
      "blocking": [
        "string"
      ],
      "warm_cookies": 0,
      "profile": "string",
      "profile_saved": true,
      "profile_note": "string",
      "webgl": "",
      "recording_url": "string",
      "recording_saved": true,
      "recording_seconds": 0,
      "recording_bytes": 0,
      "memory_peak_pct": 0,
      "tabs_closed_for_memory": 0,
      "state": "string",
      "error": "string",
      "ended_reason": "string",
      "billable": true
    }
  ]
}
{
  "code": "string",
  "detail": "string"
}
{
  "code": "string",
  "detail": "string"
}
{
  "code": "string",
  "detail": "string"
}
{
  "code": "string",
  "detail": "string"
}

Was this page helpful?