# Usage Analytics

**GET** `/v1/analytics/computer/usage`

Returns your organization's Perplexity usage analytics as a bucketed time series for a single dataset. Requires an organization analytics API key, generated by an org admin from Settings → Organization → Computer in the Perplexity web app. Only complete UTC grid buckets are returned: start_time snaps down to its bucket, and the in-progress bucket is never included. Datasets differ in what they count: credits for credit_usage, queries for query_volume, distinct active members for daily_active_users, and thread counts for the rest. Buckets of daily_active_users are not additive — a member active on several days is counted once per day, so summing them is not the window's active-member count.

Base URL: `https://api.perplexity.ai`

## Authorization

| Option | Scheme | Type | Sent as | Scopes |
| --- | --- | --- | --- | --- |
| Option 1 | `HTTPBearer` | `http` | `Authorization: Bearer <token>` | — |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `dataset` | `string` | Yes | The dataset to query. query_volume and daily_active_users are daily organization-level datasets: they reject bucket_width=1h and user_email. Allowed values: `credit_usage`, `connectors`, `artifacts`, `skills`, `spaces`, `workflows`, `task_durations`, `query_volume`, `daily_active_users`. |
| `start_time` | `integer` | Yes | Window start in unix seconds (UTC), inclusive. Snapped down to the bucket grid, so the first bucket can include usage from before this time. |
| `end_time` | `integer` | No | Window end in unix seconds (UTC), exclusive. Defaults to now; future values are capped at now. The window may span at most 90 days. |
| `bucket_width` | `string` | No | Bucket size. Buckets align to the UTC grid. Not accepted as 1h for query_volume or daily_active_users, which are stored at day grain. Allowed values: `1d`, `1h`. |
| `limit` | `integer` | No | Buckets per page. 1d: default 7, max 31. 1h: default 24, max 168. |
| `page` | `string` | No | Opaque pagination cursor from a previous response's next_page. Valid only with the same query parameters it was issued for. |
| `user_email` | `string` (email) | No | Restrict results to a single member of your organization. Emails that don't match a current member return a generic 400. Not available for query_volume or daily_active_users, which are aggregated per organization; use the v2 endpoint for per-member query volume. |

## Responses

| Status | Description | Media type |
| --- | --- | --- |
| `200` | Bucketed usage for the requested window. Buckets without data carry count 0; the analytics store syncs periodically, so a zero in a recent bucket can mean the data hasn't synced yet. | `application/json` |
| `400` | Invalid parameters (type: bad_request) or semantically invalid request (type: invalid_request) — e.g. start_time after end_time, a window over 90 days, a misused pagination cursor, or a user_email that doesn't match a member of the organization. | `application/json` |
| `401` | Missing or invalid API key (type: unauthorized). | `application/json` |
| `404` | The Analytics API is not enabled for this organization (type: feature_disabled). | `application/json` |
| `429` | Rate limit exceeded (type: request_rate_limit_exceeded). Limits apply per organization across all of its keys. | `application/json` |

### Example response: 200 — Bucketed usage for the requested window. Buckets without data carry count 0; the analytics store syncs periodically, so a zero in a recent bucket can mean the data hasn't synced yet.

```json
{
  "categories": [
    "Model",
    "Credit Source"
  ],
  "data": [
    {
      "by_categories": {
        "Credit Source": [
          {
            "category": "paid",
            "count": 250
          },
          {
            "category": "promo",
            "count": 80
          }
        ],
        "Model": [
          {
            "category": "claude-opus-4-8",
            "count": 210
          },
          {
            "category": "claude-sonnet-4-6",
            "count": 120
          }
        ]
      },
      "count": 350,
      "end_time": 1746144000,
      "start_time": 1746057600
    }
  ],
  "has_more": false,
  "next_page": null
}
```

### Example response: 400 — Invalid parameters (type: bad_request) or semantically invalid request (type: invalid_request) — e.g. start_time after end_time, a window over 90 days, a misused pagination cursor, or a user_email that doesn't match a member of the organization.

```json
{
  "error": {
    "code": 400,
    "message": "start_time must be before end_time.",
    "type": "invalid_request"
  }
}
```

### Example response: 401 — Missing or invalid API key (type: unauthorized).

```json
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "string"
  }
}
```

### Example response: 404 — The Analytics API is not enabled for this organization (type: feature_disabled).

```json
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "string"
  }
}
```

### Example response: 429 — Rate limit exceeded (type: request_rate_limit_exceeded). Limits apply per organization across all of its keys.

```json
{
  "error": {
    "code": 0,
    "message": "string",
    "type": "string"
  }
}
```

## Related pages

- [Add a skill revision](./updateskill.md)
- [Cancel Agent Response](./cancelagentresponse.md)
- [Create a skill](./createskill.md)
- [Create Agent Response](./createagent.md)
- [Create Async Chat Completion](./create_async_chat_completions_async_chat_completions_post.md)
- [Create Chat Completion](./chat_completions_chat_completions_post.md)
- [Create Contextualized Embeddings](./contextualized_embeddings_v1_contextualizedembeddings_post.md)
- [Create Embeddings](./embeddings_v1_embeddings_post.md)
- [Delete a skill](./deleteskill.md)
- [Download Agent Response File](./downloadagentfile.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
