Skip to main content
POST
/
api
/
youtube
/
video
/
comments
/youtube/video/comments
curl --request POST \
  --url https://api.anysite.io/api/youtube/video/comments \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "video": "<string>",
  "count": 1000,
  "timeout": 300
}
'
[
  {
    "id": "<string>",
    "text": "<string>",
    "@type": "YoutubeComment",
    "author": {
      "id": "<string>",
      "@type": "YoutubeCommentAuthor",
      "name": "<string>",
      "url": "<string>",
      "avatar": "<string>",
      "is_verified": false,
      "is_creator": false
    },
    "published_at": 123,
    "like_count": 123,
    "reply_count": 123,
    "reply_level": 0
  }
]

Authorizations

access-token
string
header
required

Headers

access-token
string
required

Body

application/json
video
string
required

YouTube video ID or URL

Examples:

"dQw4w9WgXcQ"

"https://www.youtube.com/watch?v=dQw4w9WgXcQ"

count
integer
required

Max number of comments to fetch

Required range: 1 <= x <= 2000
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500

Response

Successful Response

id
string
required
text
string
required
@type
string
default:YoutubeComment
author
YoutubeCommentAuthor · object
published_at
integer | null
like_count
integer | null
reply_count
integer | null
reply_level
integer
default:0