# PeerTube API

> Returns PeerTube videos, channels, channel videos and comment threads, plus federated video search across the network.

Category: Social & Video. Region: global. 11 endpoints at `https://api.hoshime.com/v1/peertube/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/peertube
## GET /v1/peertube/search

Videos across the federated PeerTube network that match a query.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to search for in video titles and descriptions. (e.g. linux) |
| `limit` | integer | no | Number of videos, from 1 to 50. (default 10) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `commentCount` (integer (int64)), `description` (string), `durationSeconds` (integer (int64)), `host` (string), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `shortId` (string), `tags` (string[]), `thumbnails` (Image[]), `thumbnails[].height` (any), `thumbnails[].url` (string), `thumbnails[].width` (any), `title` (string), `url` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/peertube/search?query=linux" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/video

One video from the PeerTube instance that hosts it, by UUID or short id.

Scope: `social:read` · Units: 1 · Cached: 10 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Video UUID or short id. (e.g. da5463ca-fbc7-4311-948a-356594d5c70a) |
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `commentCount` (integer (int64)), `description` (string), `durationSeconds` (integer (int64)), `host` (string), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `shortId` (string), `tags` (string[]), `thumbnails` (Image[]), `thumbnails[].height` (any), `thumbnails[].url` (string), `thumbnails[].width` (any), `title` (string), `url` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/peertube/video?id=da5463ca-fbc7-4311-948a-356594d5c70a&instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/videos

Videos of one PeerTube server, most trending, newest, most viewed or most liked first, 20 per page.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `sort` | string | no | Order: -trending, -publishedAt (newest), -views or -likes. (one of -trending, -publishedAt, -views, -likes; default -trending) |
| `nsfw` | string | no | false leaves out videos marked NSFW, both includes them. (one of false, both; default false) |
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `commentCount` (integer (int64)), `description` (string), `durationSeconds` (integer (int64)), `host` (string), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `shortId` (string), `tags` (string[]), `thumbnails` (Image[]), `thumbnails[].height` (any), `thumbnails[].url` (string), `thumbnails[].width` (any), `title` (string), `url` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/peertube/videos?instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/channels

Channels a PeerTube server knows, newest first, 20 per page.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `bio` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `host` (string), `id` (string), `name` (string), `postCount` (integer (int64)), `url` (string), `username` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/peertube/channels?instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/channelVideos

Videos of one channel, newest first, 20 per page. A channel on another server is named name@host.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | yes | Channel name, or name@host for a channel on another server, such as serval_nonsense@makertube.net. (e.g. serval_nonsense@makertube.net) |
| `nsfw` | string | no | false leaves out videos marked NSFW, both includes them. (one of false, both; default false) |
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `commentCount` (integer (int64)), `description` (string), `durationSeconds` (integer (int64)), `host` (string), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `shortId` (string), `tags` (string[]), `thumbnails` (Image[]), `thumbnails[].height` (any), `thumbnails[].url` (string), `thumbnails[].width` (any), `title` (string), `url` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/peertube/channelVideos?channel=serval_nonsense%40makertube.net&instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/videoComments

Top-level comment threads on one video, newest first, 20 per page, with the reply count of each.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Video UUID or short id. (e.g. da5463ca-fbc7-4311-948a-356594d5c70a) |
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `createdAt` (string), `id` (string), `likeCount` (integer (int64)), `replyCount` (integer (int64)), `text` (string), `url` (string), `videoId` (string)

```bash
curl "https://api.hoshime.com/v1/peertube/videoComments?id=da5463ca-fbc7-4311-948a-356594d5c70a&instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/categories

Video categories of one PeerTube server, with their ids.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `id` (string), `name` (string)

```bash
curl "https://api.hoshime.com/v1/peertube/categories?instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/instance

Name, description and languages of one PeerTube server.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `description` (string), `host` (string), `name` (string), `shortDescription` (string), `terms` (string)

```bash
curl "https://api.hoshime.com/v1/peertube/instance?instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/channel

One PeerTube channel by name: its display name, description, follower count and creation time. A channel on another server is named name@host.

Scope: `social:read` · Units: 1 · Cached: 30 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | yes | Channel name, or name@host for a channel on another server, such as serval_nonsense@makertube.net. (e.g. serval_nonsense@makertube.net) |
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `bio` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `host` (string), `id` (string), `name` (string), `postCount` (integer (int64)), `url` (string), `username` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/peertube/channel?channel=serval_nonsense%40makertube.net&instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/channelPlaylists

Playlists of one PeerTube channel, 20 per page. A channel on another server is named name@host.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `channel` | string | yes | Channel name, or name@host for a channel on another server. (e.g. lizardguystreamarchive@spectra.video) |
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `createdAt` (string), `description` (string), `id` (string), `title` (string), `updatedAt` (string), `url` (string), `videoCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/peertube/channelPlaylists?channel=lizardguystreamarchive%40spectra.video&instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/peertube/playlistVideos

Videos of one PeerTube playlist in playlist order, 20 per page.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Playlist UUID or short id, as channelPlaylists gives it. (e.g. 44d18b2e-e4c0-4b6a-9a86-d8546803e3a0) |
| `instance` | string | no | Hosting instance: spectra.video or framatube.org. (one of spectra.video, framatube.org; default spectra.video; e.g. spectra.video) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `commentCount` (integer (int64)), `description` (string), `durationSeconds` (integer (int64)), `host` (string), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `shortId` (string), `tags` (string[]), `thumbnails` (Image[]), `thumbnails[].height` (any), `thumbnails[].url` (string), `thumbnails[].width` (any), `title` (string), `url` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/peertube/playlistVideos?id=44d18b2e-e4c0-4b6a-9a86-d8546803e3a0&instance=spectra.video" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
