---
title: "Get document count"
method: POST
path: "/api/index/v1/getdocumentcount"
tags: ["Troubleshooting"]
deprecated: true
---

# Get document count

`POST /api/index/v1/getdocumentcount`

> **Deprecated.**

Fetches document count for the specified custom datasource.

Tip: Use [/debug/{datasource}/status](https://developers.glean.com/indexing/debugging/datasource-status) for richer information.

## Request body

- GetDocumentCountRequest — Describes the request body of the /getdocumentcount API call
  - `datasource` string, required — Datasource name for which document count is needed.

## Response `200`

OK

- GetDocumentCountResponse — Describes the response body of the /getdocumentcount API call
  - `documentCount` integer — Number of documents corresponding to the specified custom datasource.

## Other responses

- `400` — Bad Request
- `401` — Not Authorized
- `409` — Conflict

---

[API](https://skmtc.net/gleanwork/apis/glean-indexing-api.md) · [All operations](https://skmtc.net/gleanwork/apis/glean-indexing-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleanwork/glean-indexing-api/versions/1c92beda1a4f/schema)
