# Get document count for a filter set.

`GET /api/plugins/docs/documents/count`

Authentication: no security requirement declared for this operation.

Parameters:

- `select` (query, object, optional)
  Type: object
  
  Schema: [Object](https://sourcey-gauzy.pages.dev/api-reference/models/object/index.md)

- `relations` (query, object, optional)
  Type: object
  
  Schema: [Object](https://sourcey-gauzy.pages.dev/api-reference/models/object/index.md)

- `where` (query, object, required)
  Type: object
  
  Schema: [Object](https://sourcey-gauzy.pages.dev/api-reference/models/object/index.md)

- `order` (query, object, optional)
  Type: object
  
  Schema: [Object](https://sourcey-gauzy.pages.dev/api-reference/models/object/index.md)

- `withDeleted` (query, boolean, optional)
  Type: boolean

- `take` (query, number, optional)
  Type: number
  
  minimum: 0
  
  maximum: 100

- `skip` (query, number, optional)
  Type: number
  
  minimum: 0

- `kind` (query, array, optional)
  Type: array
  
  Items:
    Type: string
    
    enum: ["FOLDER","PAGE","FILE"]

- `status` (query, array, optional)
  Type: array
  
  Items:
    Type: string
    
    enum: ["UPLOADED","PROCESSING","READY","FAILED"]

- `knowledgeStatus` (query, array, optional)
  Type: array
  
  Items:
    Type: string
    
    enum: ["NONE","QUEUED","INDEXING","INDEXED","FAILED","EXCLUDED"]

- `reviewStatus` (query, array, optional)
  Type: array
  
  Items:
    Type: string
    
    enum: ["NONE","PENDING","APPROVED","REJECTED"]

- `needsReview` (query, boolean, optional)
  Type: boolean

- `source` (query, array, optional)
  Type: array
  
  Items:
    Type: string
    
    enum: ["UPLOAD","EDITOR","CHAT","EMAIL","INTEGRATION","SYSTEM","IMPORT"]

- `categoryIds` (query, array, optional)
  Type: array
  
  Items:
    Type: string

- `tagIds` (query, array, optional)
  Type: array
  
  Items:
    Type: string

- `visibility` (query, string, optional)
  Type: string
  
  enum: ["ORGANIZATION","PRIVATE"]

- `archived` (query, string, optional)
  Type: string
  
  enum: ["exclude","include","only"]

- `searchable` (query, boolean, optional)
  Type: boolean

- `createdAtFrom` (query, string, optional)
  Type: string

- `createdAtTo` (query, string, optional)
  Type: string

- `updatedAtFrom` (query, string, optional)
  Type: string

- `updatedAtTo` (query, string, optional)
  Type: string

- `parentId` (query, string, optional) - Parent id or 'root'
  Type: string

- `q` (query, string, optional)
  Type: string

- `searchIn` (query, string, optional)
  Type: string
  
  enum: ["name","content"]

- `sort` (query, string, optional)
  Type: string
  
  enum: ["name","updatedAt","createdAt","size","kind"]

- `sortOrder` (query, string, optional)
  Type: string
  
  enum: ["ASC","DESC"]

Responses:

- 200: Successfully retrieved the document count.

## Examples

### cURL

```bash
curl -X GET 'http://localhost:3000/api/plugins/docs/documents/count'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/plugins/docs/documents/count', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('http://localhost:3000/api/plugins/docs/documents/count')
print(response.text)
```
