---
title: "Get agent statistics."
method: GET
path: "/api/v1/projects/{projectId}/stats"
tags: ["Agents"]
---

# Get agent statistics.

`GET /api/v1/projects/{projectId}/stats`

## Request

- Base URL: `https://app.customgpt.ai`
- URL: `https://app.customgpt.ai/api/v1/projects/{projectId}/stats`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/poll-the-people/apis/customgpt-ai/docs/api/v1/projects/:projectId/stats/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns usage metrics and performance statistics for an agent, including total conversations, query counts, document statistics, and processing information. Use this for monitoring and reporting.

## Path parameters

- `projectId` integer, required

## Response `200`

Agent stats

- object
  - `status` 'error' | 'success': The status of the response
  - `data` object
    - `pages_found` integer: Number of documents added to the agent
    - `pages_crawled` integer: Number of documents successfully read by the the agent
    - `pages_indexed` integer: Number of documents available in the agent's knowledge
    - `crawl_credits_used` integer: Number of read credits used by the agent
    - `query_credits_used` integer: Number of query credits used by the agent
    - `total_queries` integer: Number of queries used by the agent
    - `total_words_indexed` integer: Number of word processing credits used by the agent
    - `total_storage_credits_used` integer: Number of words stored for the agent

## Other responses

- `400`: Bad Argument
- `401`: API Token is either missing or invalid
- `404`: Agent not found
- `429`: Too many requests. You have exceeded your API rate limit.
- `500`: Internal Server Error

## Changes

- **2026-11-03** `77aab4354382`: 4 warning, 1 info
  - added the new `422.00` enum value to the `data/code` response property for the response status `400`
  - added the new `422.00` enum value to the `data/code` response property for the response status `401`
  - added the new `422.00` enum value to the `data/code` response property for the response status `404`
  - added the new `422.00` enum value to the `data/code` response property for the response status `500`
  - …1 more
- **2026-07-17** `b80e6dfcf78d`: 3 warning, 7 info
  - removed the optional property `data/index_credits_used` from the response with the `200` status
  - added the new `Agent id is required` enum value to the `data/message` response property for the response status `404`
  - added the new `Agent with id {projectId} not found` enum value to the `data/message` response property for the response status `404`
  - api tag `Agents` added
  - …6 more
- **2023-07-27** `2cd2d58839d0`: 1 info
  - added the non-success response with the status `400`
- …earlier changes not shown

[Operation history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/projects/:projectId/stats/get.md)

---

[API](https://skmtc.dev/poll-the-people/apis/customgpt-ai.md) - [All operations](https://skmtc.dev/poll-the-people/apis/customgpt-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/poll-the-people/apis/customgpt-ai/revisions/77aab4354382?raw)
