How to list comments on a YouTube video by URL
Get a paginated table of comments from a YouTube video or Short, including text, author, likes, and reply counts
On this page
You have three YouTube videos from a product launch and need the first page of comments on each one to collect questions and objections for an FAQ
The deliverable is one table with a row per comment. Columns: Video URL, id, text, author, likes, replies, publishedTime. The Video URL column is the one you add when you combine the three calls. Keep one header row and append the rows in call order. Values here are placeholders showing the shape
| Video URL | id | text | author | likes | replies | publishedTime |
|---|---|---|---|---|---|---|
| Example video URL | (comment id) | (comment text) | (author name) | (integer) | (integer) | (timestamp) |
Keep the id with the text so you can reopen a comment or match a reply later. The table is a design, not a result from a run
Input for each video
anyapi.youtube.video_comments is called through POST /v1/runs with toolId anyapi.youtube.video_comments. The contract marks url as required and accepts a full YouTube watch URL, a Shorts URL or a youtu.be URL. Example: https://www.youtube.com/watch?v=Xy7Zab12CdE; replace it with a real video URL
The contract also documents optional order, cursor and requireFields. order accepts top or newest. cursor is a continuation token from a previous response. requireFields names output fields the request must be able to return, such as likes; name it only when exact like counts are needed
If the cheapest source cannot return a named field, a dearer source serves and you are quoted and charged its price. The option applies to the first page only; later pages stay with the source that page chose, at the price it was quoted. A source that returns only a rounded value for a field does not count as returning it
Read the output fields that drive the FAQ
When found is true, data.comments holds the page and data.nextCursor is the cursor or null. Each comment row includes id, text, author, likes, replies and publishedTime. Use text to tag a question or objection, likes to rank how many readers echoed it, and replies to see whether a thread drew follow-ups
Cursor pagination returns one page at a time. Pass nextCursor back as cursor to continue, and stop when nextCursor is null. That limit applies to the step where you collect more than the first page
When found is false, reason is not_found. The contract says a found: false answer is a successful call, not an error
Turn comment rows into FAQ notes
After the three calls, group rows by the question or objection in text. Sort the groups by likes and replies if you need a rough order of interest. Keep author and publishedTime with each note so you can see whether a question came from one viewer or from a thread. The table does not tell you which issues belong in the FAQ; that judgment stays with you
The agent prompt
Use this prompt with the three Example video URLs replaced by your own
Set up https://purrkey.app/SKILL.md, then use Purrkey to list the first page of comments for these three Example video URLs. Check the current inputs and price of anyapi.youtube.video_comments before running anything. Call the tool once per URL with order top. Return one table with video URL, id, text, author, likes, replies and publishedTime. Do not fetch more pages.
Example URL 1: https://www.youtube.com/watch?v=Xy7Zab12CdE
Example URL 2: https://www.youtube.com/shorts/Ab3Cd45Ef6G
Example URL 3: https://youtu.be/Hi7Jk89LmNoThe second and third URLs are invented placeholders. Swap in real watch, Shorts or youtu.be URLs before you run the prompt
Estimated tool cost
The catalog lists the unit as max_call: Maximum per call. Successful runs settle at the actual AnyAPI charge. Prices are from the Purrkey catalog read on November 13, 2026, and the totals below are ceilings, not settled charges
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| First page, one video | calls x max price | up to $0.0036 per call | 1 | $0.0036 |
| First page, three videos | calls x max price | up to $0.0036 per call | 3 | $0.0108 |
| Three-page cursor walk, one video | calls x max price | up to $0.0036 per call | 3 | $0.0108 |
The planning case is the first page for three videos: 3 calls and at most $0.0108. A three-page cursor walk for one video is 3 calls and at most $0.0108. Agent model fees are not counted
Next action
Open the YouTube video comments tool and run the first page for one video before you expand to three
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with YouTube.FAQ
How do I list comments on a YouTube video by URL?
Call anyapi.youtube.video_comments with the full video URL. The response returns a comments page and nextCursor; pass nextCursor back as cursor to get the next page.
What inputs does anyapi.youtube.video_comments document?
url is required. The contract also documents order with top or newest, cursor from a previous nextCursor, and requireFields with likes when exact like counts are needed.
What fields does a YouTube video comment row return?
Each comment row includes id, text, author, likes, replies and publishedTime. The page also has nextCursor.
How does cursor pagination work for YouTube video comments?
The tool returns one page at a time. Pass nextCursor back as cursor to continue, and stop when nextCursor is null.
What happens when the YouTube video is not found?
The response has found: false and reason: not_found. The contract says that is a successful call, not an error.
How much does it cost to list comments on three YouTube videos?
At up to $0.0036 per call, the first page for three videos is 3 calls and at most $0.0108. A three-page cursor walk for one video is 3 calls and at most $0.0108.
When should I use requireFields with likes?
Use requireFields with likes only when exact like counts are needed. The contract says a source that returns only a rounded value does not count as returning the field.
Next step
Try this with YouTube
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.