Skip to main content
Perplexity

Search documentation

Type to search this documentation.

Usage Analytics per Member

GET/v2/analytics/computer/usageUsage Analytics per Member

Returns your organization's Perplexity usage broken down per member, as daily buckets. Each day lists one row per member with usage that day, keyed by email. credit_usage carries the same Model and Credit Source breakdown as v1; query_volume carries Feature, Project and Comet. Uses the same organization analytics API key as v1. Only complete UTC days are returned; the in-progress day is never included.

Parameters

datasetstringqueryrequired

The dataset to query. query_volume at this grain carries Feature, Project and Comet breakdowns, but not Model or Model Family.

one of "credit_usage", "query_volume"

one of "credit_usage", "query_volume"

group_bystringqueryrequired

The dimension to group each day's usage by. user_email is currently the only supported value.

one of "user_email"

one of "user_email"

start_timeintegerqueryrequired

Window start in unix seconds (UTC), inclusive. Snapped down to the day grid, so the first day can include usage from before this time.

minimum 0

end_timeintegerquery

Window end in unix seconds (UTC), exclusive. Defaults to now; future values are capped at now. The window may span at most 90 days.

minimum 0

limitintegerquery

Member rows per page. Default 50, max 100. A page can span multiple days.

pagestringquery

Opaque pagination cursor from a previous response's next_page. Valid only with the same query parameters it was issued for.

Responses

200Per-member daily usage for the requested window. Days with no attributable usage are omitted; the analytics store syncs periodically, so recent days may not yet be present.application/json
objectComputerUsageV2Response
categoriesarray of stringrequired

Category breakdown labels each member row surfaces, in canonical render order. Each label is a key in every row's `by_categories`.

Show child attributes
dataarray of objectrequired

Daily buckets in chronological order, each with one row per member who used credits that day. Days with no attributable usage are omitted.

Show child attributes
Show array items
end_timeintegerrequired

Day end in unix seconds (UTC), exclusive.

resultsarray of objectrequired

One row per member with credit usage on this day.

Show child attributes
Show array items

One member's credit usage for a single day.

by_categoriesobjectrequired

The member's day broken down by each label in the response's top-level `categories` list.

countintegerrequired

The member's credit total for the day. May exceed the sum of any single breakdown — usage without a category attribution counts toward the total but not the breakdown.

user_emailstringrequired

The member's email. Rows whose member can no longer be resolved to an email are omitted.

start_timeintegerrequired

Day start in unix seconds (UTC), inclusive.

has_morebooleanrequired

Whether more member rows exist beyond this page.

next_pagenull | string

Cursor for the next page; pass as the page parameter with otherwise identical query parameters.

Example response
{
  "categories": [
    "Model",
    "Credit Source"
  ],
  "data": [
    {
      "end_time": 1746144000,
      "results": [
        {
          "by_categories": {
            "Credit Source": [
              {
                "category": "paid",
                "count": 900
              }
            ],
            "Model": [
              {
                "category": "claude-opus-4-8",
                "count": 900
              }
            ]
          },
          "count": 900,
          "user_email": "alice@example.com"
        },
        {
          "by_categories": {
            "Credit Source": [
              {
                "category": "promo",
                "count": 500
              }
            ],
            "Model": [
              {
                "category": "claude-sonnet-4-6",
                "count": 500
              }
            ]
          },
          "count": 500,
          "user_email": "bob@example.com"
        }
      ],
      "start_time": 1746057600
    }
  ],
  "has_more": true,
  "next_page": "eyJwayI6ICJPUkcjLi4uIn0="
}
400Invalid parameters (type: bad_request) — e.g. a dataset or group_by outside the accepted values — or a semantically invalid request (type: invalid_request), e.g. start_time after end_time, a window over 90 days, or a misused pagination cursor.application/json
objectAnalyticsErrorResponse
errorobjectrequired
Show child attributes
codeintegerrequired
messagestringrequired
typestringrequired
Example response
{
  "error": {
    "code": 400,
    "message": "start_time must be before end_time.",
    "type": "invalid_request"
  }
}
401Missing or invalid API key (type: unauthorized).application/json
objectAnalyticsErrorResponse
errorobjectrequired
Show child attributes
codeintegerrequired
messagestringrequired
typestringrequired
Example response
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "string"
  }
}
404The Analytics API is not enabled for this organization (type: feature_disabled).application/json
objectAnalyticsErrorResponse
errorobjectrequired
Show child attributes
codeintegerrequired
messagestringrequired
typestringrequired
Example response
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "string"
  }
}
429Rate limit exceeded (type: request_rate_limit_exceeded). Limits apply per organization across all of its keys.application/json
objectAnalyticsErrorResponse
errorobjectrequired
Show child attributes
codeintegerrequired
messagestringrequired
typestringrequired
Example response
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "string"
  }
}
Documentation menu