# List video channels of an account

`GET /api/v1/accounts/{name}/video-channels`

Authentication: no security requirement declared for this operation.

Parameters:

- `name` (path, string, required) - The username or handle of the account
  Type: string
  
  Example:
  
  ```json
  "chocobozzz | chocobozzz@example.org"
  ```

- `withStats` (query, boolean, optional) - include view statistics time series and total views (only if authenticated as the account user)
  Type: boolean

- `statsDays` (query, integer, optional) - number of days of view statistics to include in `viewsPerDay` when `withStats` is true (only if authenticated as the account user). `0` means all time (since the channel's earliest recorded stat). `viewsPerDay` always spans the whole requested range so channels can be compared to each other. Its bucket size is reported in `viewsGroupInterval`: it is derived from the requested range, narrowed to the channel history so that a young channel on a long range is not aggregated into a single coarse bucket. `totalViews` is unaffected by this parameter and always reports lifetime views.

  Type: integer
  
  default: 30
  
  enum: [30,90,365,0]

- `start` (query, integer, optional) - Offset used to paginate results
  Type: integer
  
  minimum: 0

- `count` (query, integer, optional) - Number of items to return
  Type: integer
  
  default: 15
  
  minimum: 1
  
  maximum: 100

- `search` (query, string, optional) - Plain text search, applied to various parts of the model depending on endpoint
  Type: string

- `sort` (query, string, optional) - Sort column
  Type: string
  
  Example:
  
  ```json
  "-createdAt"
  ```

- `includeCollaborations` (query, boolean, optional) - **PeerTube >= 8.0** Include objects from collaborated channels
  Type: boolean

Responses:

- 200: successful operation

Content type: application/json

Type: VideoChannelList

Schema: [VideoChannelList](https://sourcey-peertube.pages.dev/api-rest-reference/models/videochannellist.md)

- `total` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `data` (optional)
  Type: Array<Actor & object & Actor>
  
  Items:
    Type: Actor & object & Actor
    
    allOf:
      Reference: [VideoChannel](https://sourcey-peertube.pages.dev/api-rest-reference/models/videochannel.md); Type: Actor & object
    
      Reference: [Actor](https://sourcey-peertube.pages.dev/api-rest-reference/models/actor.md); Type: Actor

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/accounts/chocobozzz%20%7C%20chocobozzz%40example.org/video-channels?statsDays=30&count=15'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/accounts/chocobozzz%20%7C%20chocobozzz%40example.org/video-channels?statsDays=30&count=15', {
  method: 'GET',
});

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

### Python

```python
import requests

response = requests.get('https://peertube2.cpy.re/api/v1/accounts/chocobozzz%20%7C%20chocobozzz%40example.org/video-channels?statsDays=30&count=15')
print(response.text)
```
