---
title: "Get Index Stats"
method: GET
path: "/api/v1/knowledge/documents/stats"
tags: ["knowledge-documents"]
---

# Get Index Stats

`GET /api/v1/knowledge/documents/stats`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/knowledge/documents/stats`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Get statistics about the user's knowledge index.

Returns information about the total number of documents
and index status.

**Security:**
Statistics are scoped to the authenticated user's account.

## Response `200`

Successful Response

- IndexStats: Statistics about the knowledge index.
  - `document_count` integer: Total documents in index
  - `index_name` string, required: OpenSearch index name
  - `exists` boolean: Whether the index exists

---

[API](https://skmtc.dev/gnosari/apis/gnosari-api.md) · [All operations](https://skmtc.dev/gnosari/apis/gnosari-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gnosari/apis/gnosari-api/revisions/f299cf53ae5f?raw)
