Skip to main content
Some apps take a link that stands for many videos or episodes: a course importer that takes a YouTube playlist, a clip tool that follows a creator’s channel, a podcast archive that takes a feed. Your backend needs every item in it as a link of its own. 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. List pages on other sites often work too: send the link and see. These don’t:

List a playlist

Like every endpoint, listing runs as a job. Poll 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 same url 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.
A cursor only works with the 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 keep isCollection items aside to list on their own:
Then run a sender once a minute. It keeps at most 20 imports in flight, well under the cap of 50, so other imports your app starts still have room, and sends at most 4 a minute, under 240 an hour:
The webhook handler moves each finished import’s row out of 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

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.
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.
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.
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.
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 the list_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.