Single Comment
GET/v1/youtube/video/comment1 credit
Returns one comment or reply by its id, from a comment link (`watch?v=…&lc=…`), so you can check that a specific comment exists and read its text, author, likes and reply count.
01Query parameters
| Name | Type | Description |
|---|---|---|
| urlrequired | string | Video URL (watch, youtu.be, shorts or live). A comment link carries the comment id in `lc` (e.g. `https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgwPwTibxdgqCHZxktd4AaABAg`); without `lc`, pass `comment_id`. |
| comment_idoptional | string | Comment id; a reply's id is `<parent id>.<reply id>`. Required when `url` has no `lc`; when both are given, `comment_id` wins. |
02Request
curl "https://api.scrapesocial.ai/v1/youtube/video/comment?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ%26lc%3DUgwPwTibxdgqCHZxktd4AaABAg" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/youtube/video/comment?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ%26lc%3DUgwPwTibxdgqCHZxktd4AaABAg
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"id": "UgwPwTibxdgqCHZxktd4AaABAg",
"content": "My algebra teacher said that this was a link to the test answers",
"publishedTimeText": "7 years ago",
"publishedTime": "2019-10-25T17:07:17.411Z",
"replyLevel": 0,
"author": {
"name": "@bdr8823",
"channelId": "UCdi6tGxvFvTRGe-7dAn7m7w",
"isVerified": false,
"isCreator": false,
"avatarUrl": "https://yt3.ggpht.com/ytc/AIdro_kcDoQJUNDkDzTrA5kaF5ADVujN-6UcDjMP2Kydtw=s88-c-k-c0x00ffffff-no-rj",
"channelUrl": "https://youtube.com/@bdr8823"
},
"engagement": {
"likes": 69000,
"replies": 639
},
"repliesContinuationToken": "Eg0SC2RRdzR3OVdnWGNRGAYygwEaUBIaVWd3UHdUaWJ4ZGdxQ0haeGt0ZDRBYUFCQWciAggAKhhVQ3VBWEZrZ3N3MUw3eGFDZm5kNUpKT3cyC2RRdzR3OVdnWGNRQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3dQd1RpYnhkZ3FDSFp4a3RkNEFhQUJBZw%3D%3D",
"parent": null,
"videoId": "dQw4w9WgXcQ",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&lc=UgwPwTibxdgqCHZxktd4AaABAg"
}Common to every endpoint
Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}04Notes
Our own endpoint (ScrapeCreators has no single-comment route). The answer is the comment in the same shape as an item of `/v1/youtube/video/comments` (`id`, `content`, `publishedTimeText`, `publishedTime`, `replyLevel`, `author`, `engagement`, `repliesContinuationToken`), plus `parent`, `videoId` and `url` (the comment link). For a reply, `replyLevel` is 1, `repliesContinuationToken` is null and `parent` is the comment it answers; for a top-level comment `parent` is null. A comment YouTube does not show (deleted, held for review, or a wrong id) answers 404 `Comment not found`; an unknown video 404 `Video not found`; a video with comments turned off 404 `Comments are turned off for this video`; all free. A URL without `lc` and no `comment_id`, or an id that cannot be a comment id, is a free 400. A missing comment takes longer to answer (about 8–12 s), because it is checked from several connections before we say it is gone.
05Errors & credits
Every error has success: false, a real HTTP status and costs no credits.
400missing_parameter
A required parameter is missing or invalid.
403private_account
The account is private or age-restricted.
404not_found
No such account.
503upstream_error
The platform did not answer; retry shortly.