Skip to main content
POST
/
api
/
v1
/
youtube
/
video
/
comments
List YouTube video comments
curl --request POST \
  --url https://app.dumplingai.com/api/v1/youtube/video/comments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<string>",
  "continuationToken": "<string>",
  "order": "top",
  "requestSource": "API"
}'
{
  "comments": [
    {
      "id": "<string>",
      "content": "<string>",
      "publishedTimeText": "<string>",
      "publishedTime": "2023-11-07T05:31:56Z",
      "replyLevel": 1,
      "author": {
        "name": "<string>",
        "channelId": "<string>",
        "isVerified": true,
        "isCreator": true,
        "avatarUrl": "<string>",
        "channelUrl": "<string>"
      },
      "engagement": {
        "likes": 123,
        "replies": 123
      }
    }
  ],
  "continuationToken": "<string>"
}

Description

This endpoint retrieves comments from a YouTube video with support for pagination and different sorting orders. Includes comment content, author information, engagement metrics, and timestamps.

Endpoint

POST https://app.dumplingai.com/api/v1/youtube/video/comments

Headers

  • Content-Type: application/json
  • Authorization: Bearer <API_KEY> (required)

Request Body

{
  "url": "string", // Required. Full YouTube video URL
  "continuationToken": "string", // Optional. Token for pagination from previous response
  "order": "string" // Optional. Sort order: "top" or "newest". Default: "top"
}

Accepted Values for order

ValueDescription
topSort by most liked comments first
newestSort by most recently posted comments

Responses

Success (200)

Returns an array of comments from the specified video with pagination support.
{
  "comments": [
    {
      "id": "Ugz1234567890abcdefghij",
      "content": "This CSS tutorial is incredibly helpful! The flexbox examples at 8:45 finally made it click for me. Thank you! 🎉",
      "publishedTimeText": "2 hours ago",
      "publishedTime": "2024-01-15T14:30:00.000Z",
      "replyLevel": 0,
      "author": {
        "name": "John Doe",
        "channelId": "UCuserChannelId123",
        "isVerified": true,
        "isCreator": false,
        "avatarUrl": "https://yt3.googleusercontent.com/ytc/AIdro_avatar_url",
        "channelUrl": "https://www.youtube.com/channel/UCuserChannelId123"
      },
      "engagement": {
        "likes": 1250,
        "replies": 23
      }
    },
    {
      "id": "Ugz9876543210jihgfedcba",
      "content": "Quick question: would you recommend using CSS Grid for the entire layout or just specific components? Great explanation btw!",
      "publishedTimeText": "1 day ago",
      "publishedTime": "2024-01-14T10:15:00.000Z",
      "replyLevel": 0,
      "author": {
        "name": "Jane Smith",
        "channelId": "UCanotherUserId456",
        "isVerified": false,
        "isCreator": false,
        "avatarUrl": "https://yt3.googleusercontent.com/ytc/AIdro_another_avatar",
        "channelUrl": "https://www.youtube.com/channel/UCanotherUserId456"
      },
      "engagement": {
        "likes": 89,
        "replies": 5
      }
    }
  ],
  "continuationToken": "Eg0SC1UyN..."
}
  • Content-Type: application/json
  • X-RateLimit-Limit: The rate limit for the user
  • X-RateLimit-Remaining: The remaining number of requests for the user

Bad Request (400)

Returned if the request is invalid or missing required parameters.
{
  "error": "'url' parameter is required and must be a non-empty string. Please provide a YouTube video URL."
}

Bad Gateway (502)

Returned if the external service is unavailable or returns invalid data.
{
  "error": "Failed to retrieve YouTube video comments"
}

Internal Server Error (500)

Returned if there’s an unexpected server error.
{
  "error": "An unexpected server error occurred while fetching YouTube video comments"
}

Example Request

curl -X POST https://app.dumplingai.com/api/v1/youtube/video/comments \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "order": "top"
}'

Example Response

{
  "comments": [
    {
      "id": "Ugz1234567890abcdefghij",
      "content": "This CSS tutorial is incredibly helpful! The flexbox examples at 8:45 finally made it click for me. Thank you! 🎉",
      "publishedTimeText": "2 hours ago",
      "publishedTime": "2024-01-15T14:30:00.000Z",
      "replyLevel": 0,
      "author": {
        "name": "John Doe",
        "channelId": "UCuserChannelId123",
        "isVerified": true,
        "isCreator": false,
        "avatarUrl": "https://yt3.googleusercontent.com/ytc/AIdro_avatar_url",
        "channelUrl": "https://www.youtube.com/channel/UCuserChannelId123"
      },
      "engagement": {
        "likes": 1250,
        "replies": 23
      }
    }
  ],
  "continuationToken": "Eg0SC1UyN..."
}

Notes

  • The url parameter must be a valid YouTube video URL
  • Comments are returned in the specified sort order (top or newest)
  • The continuationToken from the response can be used to fetch additional comments
  • replyLevel indicates the nesting level of the comment (0 = top-level comment)
  • Author information includes verification status and creator badges
  • Engagement metrics show like count and reply count for each comment
  • Some videos may have comments disabled, resulting in an empty comments array
  • This endpoint uses 1 credit per request

Rate Limiting

Rate limit headers (X-RateLimit-Limit and X-RateLimit-Remaining) are included in the response to indicate the user’s current rate limit status.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string<uri>
required
continuationToken
string

Token to fetch the next page of comments.

order
enum<string>
default:top
Available options:
top,
newest
requestSource
enum<string>

Optional identifier describing where the API request originated.

Available options:
API,
WEB,
MAKE_DOT_COM,
ZAPIER,
N8N,
PLAYGROUND,
DEFAULT_AUTOMATION,
AGENT_PREVIEW,
AGENT_LIVE,
AUTOPILOT,
STUDIO

Response

Comments retrieved.

comments
object[]
continuationToken
string | null