# List categories

> Source: https://truto.one/docs/api-reference/admin/categories/list/

`GET /category`

Resource: **Categories**

## Response body

- **`results`** _(array<object>)_
  - **`name`** _(string)_
    The internal name/slug of the category.
  - **`label`** _(string)_
    A user-facing label or descriptive name for the category.
  - **`created_at`** _(string)_
    The date and time when the category was created.
  - **`updated_at`** _(string)_
    The date and time when the category was last updated.
- **`next_cursor`** _(string)_
- **`limit`** _(number)_

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/category' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/category', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/category"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
```

### Truto TS SDK

```typescript
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

for await (const item of truto.category.list()) {
  console.log(item);
}
```

### Truto Python SDK

```python
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    async for item in truto_api.categories.list():
        print(item)

asyncio.run(main())
```
