POST /collection lists the items of a playlist, channel, profile, album or podcast feed, a page at a time, without downloading anything. Each item comes with a url you send to /import, /transcribe or /metadata, one item per request. A page costs $0.003, up to 200 items.
Which links work
List pages on other sites often work too: send the link and see. These don’t:
List a playlist
GET /collection/status?id={jobId} every few seconds, or pass a webhookUrl and get the page by webhook. A completed page looks like this:
Item fields
The
collection object has the list’s id, url, title and uploader, and itemCount when the site says how many items there are (or once the whole list is known); null otherwise.
Page through a collection
Send the sameurl with the previous page’s nextCursor as cursor to get the next page. nextCursor is null on the last page. Every page costs the same, so use limit: 200 when you want the whole list: 1,000 items is 5 pages, $0.015.
url it came from; any other url, or an edited cursor, gets a 400 with INVALID_CURSOR. To have each page pushed to you instead of polling, pass webhookUrl and start the next page from the webhook handler with the nextCursor in it.
Import every item
Each item is an ordinary link, so imports from a collection follow the usual limits: 240 imports an hour per key, 2 running at once, and at most 50 queued or running. A playlist of 300 videos is over that last cap on purpose. Don’t send them all at once: save the items, submit a few, let the webhook tell you when each one finishes, then submit more. First save every item as a row in your database. Skip live streams, and keepisCollection items aside to list on their own:
submitted, which makes room for the next run. Write it, and a sweep for missed webhooks, as in Batch imports: the handler reads the job with your key, saves mediaUrl on success, and requeues a failure that has retryable: true. A transcript per item works the same way with POST /transcribe, which allows 3 running and 50 queued or running.
maxCostDollars stops one long video from spending more than you meant. When duration is in the list you can also skip items over a length you care about before importing; when it’s null, the cap still protects you.
Limits
Lists are a snapshot for about an hour
Lists are a snapshot for about an hour
Pages of the same link come from the same list as long as you keep paging: each page keeps the list for another hour. A cursor only works with the list it came from, so once a list has gone unused for an hour its cursors expire: the job fails with
INVALID_CURSOR and isn’t charged. List again from the first page, which also picks up what’s new. Dedupe on id across separate listings.Up to 5,000 items per link
Up to 5,000 items per link
Importly lists the first 5,000 items of a collection, in the collection’s own order. When there are more, the last page has
nextCursor: null and truncated: true. If the site says up front how many items it has, truncated is true from the first page; otherwise it becomes true when you reach the end of what’s listed. Very long lists can stop before 5,000, also with truncated: true. For a channel’s newest uploads, the first pages are the ones you want.Private and deleted YouTube videos
Private and deleted YouTube videos
YouTube lists don’t include private or deleted videos, as on YouTube’s own playlist page. YouTube can also leave out a few videos it limits to some regions.
itemCount is the number of videos you can get, so it can be lower than the count YouTube shows.YouTube channels list their videos
YouTube channels list their videos
A channel link lists the channel’s videos, newest first. Its Shorts and live streams are separate lists: send
youtube.com/@name/shorts or youtube.com/@name/streams. A channel with no regular videos lists its Shorts and live tabs instead, as items with isCollection: true that you list in turn.Very large podcast feeds
Very large podcast feeds
A feed with a very long archive, such as a daily show’s, can be too big to list right now and fails with
COLLECTION_TOO_LARGE, at no charge. Retrying the same feed won’t help.Empty collections
Empty collections
A playlist with no items completes with
items: [] and is charged like any other page.Errors
None of these are charged. Other failures, such as a private playlist, use the usual codes.
Pricing and rate limits
$0.003 per page, whatever its `limit`. Only a page that completes is charged; failed listings and status checks are free. For some sites the end of a list is only known after a final page with no items; that page is free. Starting a listing needs a balance of at least $0.003. The imports, transcripts and metadata you then request for each item are charged as usual: see Pricing & credits.POST /collection allows 600 requests per hour per key, with 5 listings running and 100 queued or running at once.
With your agent
Over MCP, the same job is thelist_collection_items tool, with check_collection_items to collect each page. The tool tells the agent to send items one at a time to import_media, transcribe_media or get_basic_metadata and to wait for those jobs before starting more. See MCP tools.
Reference: POST /collection
Request fields and responses.
Batch imports
The webhook handler and the sweep for missed webhooks.