playlistItems_insert
Add a YouTube video to a specific playlist using its video ID. Optionally set start/end times to trim the video and add a note. Requires OAuth and consumes 50 quota units.
Instructions
Add a video (videoId) to a playlist (playlistId). startAt/endAt are in seconds and converted to ISO 8601 durations. Quota cost: 50 units. Requires OAuth access token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Maximum 280 characters. Note associated with the playlist item. | |
| part | No | Resource properties to set and return. Options: contentDetails, id, snippet, status. | snippet |
| endAt | No | End time in seconds of the video portion to play (contentDetails). | |
| startAt | No | Start time in seconds of the video portion to play (contentDetails). | |
| videoId | Yes | The YouTube video ID to add to the playlist. Required. | |
| position | No | The 0-based position of the item. Only if the playlist uses manual ordering. | |
| playlistId | Yes | The ID of the playlist to add the item to. Required. | |
| onBehalfOfContentOwner | No | Content owner to act on behalf of (YouTube partners only). | |
| onBehalfOfContentOwnerChannel | No | Channel ID to act on behalf of (YouTube partners only). |