How to list a YouTube channel's videos by handle
Get a paginated list of a YouTube channel's videos with titles, views, lengths and publish times
On this page
You have three competitor YouTube channels and need the latest 40 videos from each to compare upload cadence and format. Run anyapi.youtube.channel_videos once per channel, page through the cursor until each list reaches 40 videos or the cursor ends, and put the rows into one table. Agents call it through POST /v1/runs with toolId anyapi.youtube.channel_videos
No run has been executed for this guide; the table below is a design, not a result
The table to build
The deliverable is one table with a handle column you add and these video columns: id, title, url, views, lengthText, publishedTime. Example handles (replace with your targets): @northernlens, @acme-plumbing-example, @example-studio
Values here are placeholders showing the shape
| Channel | id | title | url | views | lengthText | publishedTime |
|---|---|---|---|---|---|---|
| Example A | (video id) | (video title) | (video url) | (integer) | (11:56 or null) | (string) |
| Example B | (video id) | (video title) | (video url) | (integer) | (11:56 or null) | (string) |
The agent fills one row per video and keeps the channel label on each row so the three lists stay separate. The table feeds your choice about which competitor formats to prioritize for the content calendar
Inputs for each call
The contract lists handle or channelId as the identifier. handle is the channel handle, and channelId is the YouTube channel ID
cursor is optional and comes from data.nextCursor on a previous response. sort is optional with the values latest or popular; use latest for a recency-oriented list
requireFields is optional. Name output fields the request must be able to return, such as views; if the cheapest source cannot return a named field, a dearer source serves and you are quoted and charged its price. The enum lists lengthText and views. A named field can still be absent on a video that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. Omit requireFields and routing is unchanged, with the cheapest source serving. A source that returns only a rounded or shortened value for a field does not count as returning it
Read the output fields
found is boolean. When found is false, data is null and reason is present with the value not_found; the contract says a found: false answer is a successful call, not an error. When found is true, data.videos is the array for the page and data.nextCursor is the continuation token or null when that lane has no more
Use publishedTime and createdUtc for upload cadence. createdUtc is a UTC epoch timestamp in seconds; multiply by 1000 for a JS Date in milliseconds. Use lengthText for format length, views for popularity, and title plus url to identify each row. lengthText can be null when the serving source does not report it. views can be rounded by some sources (6.4M instead of 6,474,059); name views in requireFields to be served only by a source that returns the exact count, after checking the quoted price
Page through each channel
Pagination is cursor-based. Call the tool for one channel, read data.nextCursor, and pass it back as cursor on the next call. If data.nextCursor is null, that lane has no more. Repeat for each channel. On a paginated walk, requireFields applies to the first page only; later pages stay with the source that page chose, at the price it was quoted
Companion guide: list YouTube channel live streams
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to list the latest 40 videos for each of three example YouTube channels. Check the current inputs and price of anyapi.youtube.channel_videos before running anything. Call it once per channel with handle or channelId, use sort latest, and page by passing data.nextCursor back as cursor until you have 40 videos for that channel or data.nextCursor is null. If exact view counts matter, name views in requireFields only after checking the quoted price. Return a table with channel, id, title, url, views, lengthText and publishedTime. Do not invent rows. The handles below are examples; replace them with your targets.
@northernlens
@acme-plumbing-example
@example-studioEstimated tool cost
Prices from the Purrkey catalog, read November 13, 2026. The catalog lists anyapi.youtube.channel_videos at up to $0.0036 per call, unit max_call. The unit means "Maximum per call. Successful runs settle at the actual AnyAPI charge." The table below is a ceiling, not a settled charge. Model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| First page, one channel | calls x max price | $0.0036 per call | 1 | $0.0036 |
| Three channels, two pages each | calls x max price | $0.0036 per call | 6 | $0.0216 |
A request that names views in requireFields can be quoted higher than the base max_call in this table. The first-page check totals $0.0036; the three-channel walk totals $0.0216
Next action
Open the YouTube channel videos tool and run the first page for one example channel
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 a YouTube channel's videos by handle?
Call anyapi.youtube.channel_videos with handle and read data.videos; page with data.nextCursor passed back as cursor.
What input does anyapi.youtube.channel_videos take?
The contract lists handle or channelId, plus optional cursor, sort and requireFields; handle also has the alias username.
How does pagination work for YouTube channel videos?
Pagination is cursor-based. Pass data.nextCursor from a response back as cursor to continue, and stop when data.nextCursor is null.
What fields come back for each video?
Each video row includes id, url, title, views, lengthText and publishedTime, with createdUtc and image also in the schema.
What does found false mean for this tool?
A found: false answer is a successful call, not an error, and reason is present with the value not_found.
How much does it cost to list videos from three channels?
At the listed max_call price, a three-channel walk with two pages per channel is 6 calls at up to $0.0036 per call, a ceiling of $0.0216. A first page for one channel is 1 call at up to $0.0036.
Can requireFields change the price?
Yes. Naming views or lengthText in requireFields can raise the price when the cheapest source cannot return a named field and a dearer source serves.
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.