Comments

The top comments of a TikTok video with likes, reply counts, dates, creator-liked flags and the commenters' usernames.

Try it in the dashboard 100 free credits when you sign up, no card.

GET/v1/tiktok/comments

Costs 1 credit per 20 items requested. Only requests that return data are charged.

Parameters

NameTypeDescription
videorequired string Video URL as a browser shows it: https://www.tiktok.com/@user/video/ followed by the video id. A vm.tiktok.com short link is not accepted: open it and pass the address it leads to.
limitoptional integer How many comments to return. Every started 20 comments cost 1 credit. Default: 20. From 1 to 100.

Example request

curl "https://pipefetch.com/v1/tiktok/comments?video=https%3A%2F%2Fwww.tiktok.com%2F%40scout2015%2Fvideo%2F6718335390845095173&limit=20" \
  -H "x-api-key: YOUR_API_KEY"

Example response

A real answer to the request above. Long texts and lists are shortened here, and the people who wrote comments, reviews or posts are replaced by a stand-in.

200 OK 路 application/json
{
  "data": {
    "video": {
      "id": "6718335390845095173",
      "url": "https://www.tiktok.com/@scout2015/video/6718335390845095173",
      "caption": "Scramble up ur name & I鈥檒l try to guess it馃槏鉂わ笍 #foryoupage #PetsOfTikTok #aesthetic",
      "commentCount": 5712
    },
    "comments": [
      {
        "id": "0000000000",
        "text": "Well it鈥檚 pretty easy...and obvious 馃槀 hlysa",
        "likeCount": 345,
        "replyCount": 20,
        "createdAt": "2019-07-27T13:35:22.000Z",
        "language": null,
        "position": 1,
        "isPinned": false,
        "isLikedByCreator": true,
        "isByCreator": false,
        "labels": [
          "Liked by creator"
        ],
        "mentions": [],
        "hashtags": [],
        "imageUrls": [],
        "author": {
          "id": "0000000000",
          "secUid": "0000000000",
          "username": "example_user",
          "nickname": "Example Person",
          "url": "https://example.com/profile",
          "avatarUrl": "https://example.com/avatar.jpg",
          "isVerified": false
        }
      },
      {
        "id": "0000000000",
        "text": "Guys people are guessing names it's on my username 馃槀",
        "likeCount": 49,
        "replyCount": 5,
        "createdAt": "2019-07-29T05:10:43.000Z",
        "language": null,
        "position": 2,
        "isPinned": false,
        "isLikedByCreator": false,
        "isByCreator": false,
        "labels": [],
        "mentions": [],
        "hashtags": [],
        "imageUrls": [],
        "author": {
          "id": "0000000000",
          "secUid": "0000000000",
          "username": "example_user",
          "nickname": "Example Person",
          "url": "https://example.com/profile",
          "avatarUrl": "https://example.com/avatar.jpg",
          "isVerified": false
        }
      }
    ]
  },
  "credits": {
    "used": 1,
    "remaining": 99
  }
}

Good to know

  • Comments come in TikTok's own order, top comments first, and position is the rank. There is no newest-first order.
  • Top-level comments only; replyCount tells you how many replies each one has.
  • The price follows limit: 1 credit for up to 20 comments and 5 credits for 100, also when the video has fewer comments than you asked for.
  • video.commentCount is the total TikTok's comment list reports. It can differ a little from commentCount of the video endpoint, which TikTok serves from another place.
  • A video TikTok shows no comments for answers 404 and costs nothing: no_comments when it has none, video_not_found when it was deleted, is private, has comments turned off or the link is wrong. TikTok does not say which of those four it is.

Errors

Every error has the same shape, and none of them is charged. The full list is in the error reference.

Looking for an overview and use cases? See the TikTok Comments API page.