Top-level comments on a YouTube video or Short (text, author, likes, reply count, publish time), top or newest first, with cursor pagination.
2 credits/ call
Never more than 38 credits a call.
You only pay when data comes back.
curl -X POST "https://api.primaryapi.com/v1/run/youtube.video_comments" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=5EWaxmWgQMI"}'{
"output": {
"found": true,
"data": {
"nextCursor": "eyJsIjoieW91dHViZS52aWRlb19jb21tZW5…",
"comments": [
{
"likes": 110,
"replies": 5,
"text": "I love how in the middle he said \"I…",
"author": "@SimonT80", …
}
]
}
},
"credits": 2
}Input and output
4 fields
https://www.youtube.com/watch?v=5EWaxmW….11 fields
Good to know
One page per call. Send nextCursor back as cursor to read the next page.
Unknown URL? It comes back as not found, not as an error.
The same key and credits work for every API.