Lists the videos of one of your YouTube channels, including private, unlisted and scheduled ones, with views, likes, comments and status.
curl -X POST "https://api.primaryapi.com/v1/run/youtube.my_videos" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":2}'{
"output": {
"found": true,
"data": {
"totalResults": 142,
"nextCursor": "eyJ0IjoiRUFBYUJsQlVPa05CU1EiLCJwIjo…",
"videos": [
{
"title": "Workshop tour (premieres Friday)",
"viewCount": 0,
"likeCount": 0,
"madeForKids": false, …
}, …
],
"channelId": "UCa1b2c3d4e5f6g7h8i9j0kL", …
}
},
"credits": 1
}Input and output
4 fields
2.5 fields
Good to know
Runs as your connected Google account. Needs the Read YouTube capability.
Videos come in the order of the channel’s uploads playlist. Private and scheduled videos are included because you own them.
Pass channelId when the account has several channels.
For watch time and audience reports use youtube.analytics_report.
The same key and credits work for every API.