YepAPI
TikTok API

Video Comments

Get comments for a TikTok video with pagination.

POST/v1/tiktok/comments
$0.01/call

Usage

const res = await fetch('https://api.yepapi.com/v1/tiktok/comments', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ url: 'https://www.tiktok.com/@username/video/7356291048572839174' }),
});
const { data } = await res.json();
console.log(data);
curl -X POST https://api.yepapi.com/v1/tiktok/comments \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.tiktok.com/@username/video/7356291048572839174"}'

Request Body

ParameterTypeRequiredDescriptionDefault
urlstringYesFull TikTok video URL
cursorstringNoPagination cursor from previous response
countnumberNoNumber of results to return20

Response

{
  "ok": true,
  "data": {
    "has_more": true,
    "cursor": "20",
    "total_comments": 3200,
    "comments": [
      {
        "comment_id": "7356291048572839175",
        "text": "This recipe is amazing! Made it last night",
        "create_time": 1712346000,
        "digg_count": 4500,
        "reply_count": 12,
        "author": {
          "unique_id": "foodlover99",
          "nickname": "Food Lover",
          "avatar": "https://p16-sign.tiktokcdn.com/..."
        }
      },
      {
        "comment_id": "7356291048572839176",
        "text": "What type of pasta did you use?",
        "create_time": 1712347000,
        "digg_count": 890,
        "reply_count": 3,
        "author": {
          "unique_id": "homecook_mike",
          "nickname": "Mike Cooks",
          "avatar": "https://p16-sign.tiktokcdn.com/..."
        }
      }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.has_morebooleanWhether more comments are available
data.cursorstringCursor for fetching the next page
data.total_commentsnumberTotal number of comments on the video
data.commentsobject[]Array of comment objects
data.comments[].comment_idstringUnique comment identifier
data.comments[].textstringComment text content
data.comments[].create_timenumberUnix timestamp of when the comment was posted
data.comments[].digg_countnumberNumber of likes on the comment
data.comments[].reply_countnumberNumber of replies to the comment
data.comments[].authorobjectComment author information

Use the cursor value from the response to paginate through comments.

On this page