# YouTube API

> Returns video details and statistics, channel profiles and about pages, search results, a channel's videos, Shorts and community posts with their comments, and YouTube Charts by country: top songs, videos, artists, Shorts songs and trending videos.

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

Details and statistics of one video.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Video id or URL (watch, youtu.be, shorts, embed or live). (e.g. dQw4w9WgXcQ) |
| `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), `category` (string), `commentCount` (integer (int64)), `description` (string), `durationSeconds` (integer (int64)), `id` (string), `isFamilySafe` (boolean), `isLive` (boolean), `isUnlisted` (boolean), `keywords` (Keyword[]), `keywords[].name` (string), `likeCount` (integer (int64)), `publishedAt` (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/youtube/video?id=dQw4w9WgXcQ" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/channel

Profile and statistics of one channel.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Channel id (UC…), @handle, or channel URL. (e.g. @YouTube) |
| `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: `avatar` (Image[]), `avatar[].height` (any), `avatar[].url` (string), `avatar[].width` (any), `avatarUrl` (string), `banner` (Image[]), `banner[].height` (any), `banner[].url` (string), `banner[].width` (any), `bio` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `handle` (string), `id` (string), `isFamilySafe` (boolean), `keywords` (string), `name` (string), `postCount` (integer (int64)), `url` (string), `username` (string), `verified` (boolean), `videoCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/youtube/channel?id=%40YouTube" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/search

Videos that match a search, about 20 per page. Sort and filter by upload date or length.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Search terms. Required for the first page. (e.g. music) |
| `sort` | string | no | Order of the results: relevance (the default), date, views or rating. (one of relevance, date, views, rating; default relevance) |
| `uploaded` | string | no | Only videos uploaded in this period. Default: any time. (one of hour, today, week, month, year) |
| `duration` | string | no | Only videos of this length: under4 (under 4 minutes), 4to20 (4 to 20 minutes) or over20 (over 20 minutes). Default: any length. (one of under4, 4to20, over20) |
| `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), `duration` (string), `durationSeconds` (integer (int64)), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `publishedText` (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/youtube/search?query=music" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/searchChannels

Channels that match a search by name or handle, about 20 per page, most relevant first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Search terms. Required for the first page. (e.g. rick astley) |
| `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)), `id` (string), `name` (string), `postCount` (integer (int64)), `url` (string), `username` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/youtube/searchChannels?query=rick+astley" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/searchPlaylists

Playlists that match a search, about 20 per page, most relevant first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Search terms. Required for the first page. (e.g. lo-fi beats) |
| `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: `id` (string), `thumbnails` (Image[]), `thumbnails[].height` (any), `thumbnails[].url` (string), `thumbnails[].width` (any), `title` (string), `url` (string), `videoCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/youtube/searchPlaylists?query=lo-fi+beats" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/channelVideos

Videos of a channel's Videos tab, about 30 per page, newest first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Channel id (UC…), @handle, or channel URL. (e.g. @YouTube) |
| `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), `duration` (string), `durationSeconds` (integer (int64)), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `publishedText` (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/youtube/channelVideos?id=%40YouTube" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/channelShorts

Shorts of a channel's Shorts tab, about 30 per page, newest first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Channel id (UC…), @handle, or channel URL. (e.g. @YouTube) |
| `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), `duration` (string), `durationSeconds` (integer (int64)), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `publishedText` (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/youtube/channelShorts?id=%40YouTube" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/channelSearch

Videos of one channel that match a search, about 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Channel id (UC…), @handle, or channel URL. (e.g. @YouTube) |
| `query` | string | no | Search terms. Required for the first page. (e.g. music) |
| `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), `duration` (string), `durationSeconds` (integer (int64)), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `publishedText` (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/youtube/channelSearch?id=%40YouTube&query=music" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/playlist

Title, owner and the first videos of one playlist, about 100. Page through every video with youtube/playlistVideos.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Playlist id (PL…, UU…, OLAK5…) or playlist URL. (e.g. PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI) |
| `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: `channelId` (string), `channelName` (string), `id` (string), `items` (SearchVideo[]), `items[].author` (Author), `items[].commentCount` (integer (int64)), `items[].description` (string), `items[].duration` (string), `items[].durationSeconds` (integer (int64)), `items[].id` (string), `items[].likeCount` (integer (int64)), `items[].publishedAt` (string), `items[].publishedText` (string), `items[].thumbnails` (Image[]), `items[].title` (string), `items[].url` (string), `items[].viewCount` (integer (int64)), `title` (string), `url` (string), `videoCount` (integer (int64)), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/youtube/playlist?id=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/playlistVideos

Videos of one playlist in playlist order, about 100 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Playlist id (PL…, UU…, OLAK5…) or playlist URL. (e.g. PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI) |
| `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), `duration` (string), `durationSeconds` (integer (int64)), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `publishedText` (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/youtube/playlistVideos?id=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/comments

Comments of one video, about 20 per page; replies come from commentReplies.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Video id or URL. (e.g. dQw4w9WgXcQ) |
| `sort` | string | no | top (the default) or newest. (one of top, newest; default top) |
| `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)), `publishedText` (string), `repliesCursor` (string), `replyCount` (integer (int64)), `text` (string)

```bash
curl "https://api.hoshime.com/v1/youtube/comments?id=dQw4w9WgXcQ" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/commentReplies

Replies to one comment, about 10 per page. Give the cursor of a comment from comments, or the video and the comment id.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `cursor` | string | no | repliesCursor of a comment from comments, or nextCursor of the previous page of replies. |
| `id` | string | no | Video id or URL of the comment, when no cursor is given. (e.g. dQw4w9WgXcQ) |
| `commentId` | string | no | Id of a top comment of that video (in its first pages of comments), when no cursor is given. (e.g. UgzKYksqeQ5gA3t0g0F4AaABAg) |
| `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)), `publishedText` (string), `repliesCursor` (string), `replyCount` (integer (int64)), `text` (string)

```bash
curl "https://api.hoshime.com/v1/youtube/commentReplies?id=dQw4w9WgXcQ&commentId=UgzKYksqeQ5gA3t0g0F4AaABAg" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/transcript

Transcript of one video as timed segments, from its caption tracks.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Video id or URL. (e.g. dQw4w9WgXcQ) |
| `lang` | string | no | Language code, such as en, id or de. Default: the track YouTube selects first. |
| `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), `language` (string), `segments` (Segment[]), `segments[].duration` (number (double)), `segments[].start` (number (double)), `segments[].text` (string), `text` (string)

```bash
curl "https://api.hoshime.com/v1/youtube/transcript?id=dQw4w9WgXcQ" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/chapters

Chapters of one video, each with its title and start time, as the chapter bar of the watch page shows them. Empty when the video has none.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Video id or URL. (e.g. jNQXAC9IVRw) |
| `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: `startSeconds` (integer (int64)), `title` (string)

```bash
curl "https://api.hoshime.com/v1/youtube/chapters?id=jNQXAC9IVRw" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/suggestions

YouTube search suggestions for partial text, the autocomplete of the search box.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Partial search text. (e.g. music) |
| `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: `query` (string), `suggestions` (Suggestion[]), `suggestions[].text` (string)

```bash
curl "https://api.hoshime.com/v1/youtube/suggestions?query=music" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/hashtag

Videos and Shorts on a hashtag page, the videos the page lists first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tag` | string | yes | Hashtag, with or without the #, or its youtube.com/hashtag URL. (e.g. music) |
| `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), `duration` (string), `durationSeconds` (integer (int64)), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `publishedText` (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/youtube/hashtag?tag=music" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/related

Videos YouTube suggests beside one video, about 20 per page.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Video id or URL. (e.g. dQw4w9WgXcQ) |
| `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), `duration` (string), `durationSeconds` (integer (int64)), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `publishedText` (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/youtube/related?id=dQw4w9WgXcQ" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/channelStreams

Live and past streams of a channel's Streams tab, about 30 per page, newest first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Channel id (UC…), @handle, or channel URL. (e.g. @NASA) |
| `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), `duration` (string), `durationSeconds` (integer (int64)), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `publishedText` (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/youtube/channelStreams?id=%40NASA" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/musicCharts

YouTube Music charts for a country: the chart playlists of each shelf, such as top songs or top music videos. Read a playlist with playlist.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `gl` | string | no | Two-letter country code the charts are for. Default US. (default US) |
| `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: `country` (string), `items` (ChartItem[]), `items[].playlistId` (string), `items[].section` (string), `items[].subtitle` (string), `items[].thumbnails` (Image[]), `items[].title` (string), `items[].url` (string)

```bash
curl "https://api.hoshime.com/v1/youtube/musicCharts" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/charts

YouTube Charts of a country: top songs, music videos, artists, songs most used in Shorts, or trending videos, with views and rank changes.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `gl` | string | no | Two-letter country code the chart is for. Default US. (default US; e.g. ID) |
| `chart` | string | no | songs, videos and artists rank by views; shortsSongs by the Shorts that use the song; trendingVideos is right now. Default songs. (one of songs, videos, artists, shortsSongs, trendingVideos; default songs) |
| `period` | string | no | daily exists for videos and shortsSongs. Default weekly; trendingVideos has no period. (one of weekly, daily) |
| `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: `chart` (string), `country` (string), `endDate` (string), `entries` (ChartEntry[]), `entries[].artists` (string[]), `entries[].channelId` (string), `entries[].durationSeconds` (any), `entries[].periodsOnChart` (any), `entries[].previousRank` (any), `entries[].rank` (any), `entries[].releaseDate` (string), `entries[].thumbnailUrl` (string), `entries[].title` (string), `entries[].url` (string), `entries[].videoId` (string), `entries[].viewChangePercent` (number (double)), `entries[].viewCount` (integer (int64)), `period` (string)

```bash
curl "https://api.hoshime.com/v1/youtube/charts?gl=ID" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/channelPlaylists

Playlists of a channel's Playlists tab, about 20 per page, in the order YouTube shows them.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Channel id (UC…), @handle, or channel URL. (e.g. @YouTube) |
| `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: `id` (string), `thumbnails` (Image[]), `thumbnails[].height` (any), `thumbnails[].url` (string), `thumbnails[].width` (any), `title` (string), `url` (string), `videoCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/youtube/channelPlaylists?id=%40YouTube" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/channelReleases

Music releases (albums, EPs and singles) of a channel's Releases tab, as playlists.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Channel id (UC…), @handle, or channel URL. (e.g. @RickAstleyYT) |
| `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: `id` (string), `thumbnails` (Image[]), `thumbnails[].height` (any), `thumbnails[].url` (string), `thumbnails[].width` (any), `title` (string), `url` (string), `videoCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/youtube/channelReleases?id=%40RickAstleyYT" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/channelPosts

Community posts of a channel's Posts tab: text, likes, comments and an image or video when the post has one.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Channel id (UC…), @handle, or channel URL. (e.g. @RickAstleyYT) |
| `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)), `createdAt` (string), `id` (string), `images` (Image[]), `images[].height` (any), `images[].url` (string), `images[].width` (any), `likeCount` (integer (int64)), `media` (Media[]), `media[].durationSeconds` (integer (int64)), `media[].height` (any), `media[].thumbnailUrl` (string), `media[].type` (string), `media[].url` (string), `media[].width` (any), `publishedText` (string), `shareCount` (integer (int64)), `text` (string), `url` (string), `videoId` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/youtube/channelPosts?id=%40RickAstleyYT" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/channelAbout

About panel of one YouTube channel: description, country, join date, total views and links.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Channel id (UC…), @handle, or channel URL. (e.g. @YouTube) |
| `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: `country` (string), `description` (string), `id` (string), `joinedAt` (string), `links` (ChannelLink[]), `links[].title` (string), `links[].url` (string), `subscriberCount` (integer (int64)), `url` (string), `videoCount` (integer (int64)), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/youtube/channelAbout?id=%40YouTube" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/post

One YouTube community post: text, image or video, likes and comment count.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Post id, or its youtube.com/post/<id> URL, or a channel community URL with ?lb=<id>. (e.g. Ugkx1pBuBGmDe8kRZ-eWXB2H7yyJhX-6NUcX) |
| `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)), `createdAt` (string), `id` (string), `images` (Image[]), `images[].height` (any), `images[].url` (string), `images[].width` (any), `likeCount` (integer (int64)), `media` (Media[]), `media[].durationSeconds` (integer (int64)), `media[].height` (any), `media[].thumbnailUrl` (string), `media[].type` (string), `media[].url` (string), `media[].width` (any), `publishedText` (string), `shareCount` (integer (int64)), `text` (string), `url` (string), `videoId` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/youtube/post?id=Ugkx1pBuBGmDe8kRZ-eWXB2H7yyJhX-6NUcX" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/postComments

Comments of one YouTube community post, paged.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Post id, or its youtube.com/post/<id> URL, or a channel community URL with ?lb=<id>. (e.g. Ugkx1pBuBGmDe8kRZ-eWXB2H7yyJhX-6NUcX) |
| `sort` | string | no | top (the default) or newest. (one of top, newest; default top) |
| `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)), `publishedText` (string), `repliesCursor` (string), `replyCount` (integer (int64)), `text` (string)

```bash
curl "https://api.hoshime.com/v1/youtube/postComments?id=Ugkx1pBuBGmDe8kRZ-eWXB2H7yyJhX-6NUcX" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/youtube/postCommentReplies

Replies to one comment of a YouTube community post, paged. Give the repliesCursor of a comment from postComments.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Post id or URL the comment belongs to. (e.g. Ugkx1pBuBGmDe8kRZ-eWXB2H7yyJhX-6NUcX) |
| `cursor` | string | no | repliesCursor of a comment from postComments, or nextCursor of the previous page of replies. Without it the answer is empty. |
| `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)), `publishedText` (string), `repliesCursor` (string), `replyCount` (integer (int64)), `text` (string)

```bash
curl "https://api.hoshime.com/v1/youtube/postCommentReplies?id=Ugkx1pBuBGmDe8kRZ-eWXB2H7yyJhX-6NUcX" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
