Skip to content

Commit f341bc0

Browse files
committed
docs: update README with transcript pagination details
Added documentation on handling transcript pagination, including the `next_cursor` parameter and response splitting logic. Expanded instructions with a JSON example for configuring response limits.
1 parent 53da860 commit f341bc0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Fetches the transcript of a specified YouTube video.
1919
#### Parameters
2020
- **url** *(string)*: The full URL of the YouTube video. This field is required.
2121
- **lang** *(string, optional)*: The desired language for the transcript. Defaults to `en` if not specified.
22+
- **next_cursor** *(string, optional)*: Cursor to retrieve the next page of the transcript.
2223

2324
## Installation
2425
> [!NOTE]
@@ -67,6 +68,30 @@ npx -y @smithery/cli list clients
6768

6869
Refer to the [Smithery CLI documentation](https://github.com/smithery-ai/cli) for additional details.
6970

71+
## Response Pagination
72+
When retrieving transcripts for longer videos, the content may exceed the token size limits of the LLM.
73+
To avoid this issue, this server splits transcripts that exceed 50,000 characters.
74+
If a transcript is split, the response will include a `next_cursor`.
75+
To retrieve the next part, include this `next_cursor` value in your request.
76+
77+
The token size limits vary depending on the LLM and language you are using. If you need to split responses into smaller chunks, you can adjust this using the `--response-limit` command line argument. For example, the configuration below splits responses to contain no more than 15,000 characters each:
78+
79+
```json
80+
{
81+
"mcpServers": {
82+
"youtube-transcript": {
83+
"command": "uvx",
84+
"args": [
85+
"--from",
86+
"git+https://github.com/jkawamoto/mcp-youtube-transcript",
87+
"mcp-youtube-transcript",
88+
"--response-limit",
89+
"15000"
90+
]
91+
}
92+
}
93+
}
94+
```
7095

7196
## Using Proxy Servers
7297
In environments where access to YouTube is restricted, you can use proxy servers.

0 commit comments

Comments
 (0)