JustSERPDocs
TikTok

TikTok Comments

The comments of a TikTok video or photo post, or with `comment_id` the replies to one comment, answered as the document: `video`, `comments`, `pagination` (and `parent_comment` for replies).

GET
/v1/tiktok/comments

The comments of a TikTok video or photo post, or with comment_id the replies to one comment, answered as the document: video, comments, pagination (and parent_comment for replies). A page is 20 comments; pagination.next_page_token is sent back as next_page_token for the page after (it carries the video, the cursor and the list, so it can be sent alone) and is absent on the last page. video.comments is the count TikTok displays, which includes replies and can exceed what the list returns. A video with no comments, with comments off, or that does not exist answers 200 with an empty comments and an error. Short links are not accepted (400): send url in full or video_id. zero_retention is not handled.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
url?string

The full address of the video or photo post. Short links are 400.

video_id?string

The number at the end of the post's address. Not with url.

Match^\d{1,19}$
comment_id?string

A comment from a previous answer: list its replies instead.

Match^\d{1,19}$
next_page_token?string

The previous answer's pagination.next_page_token. A token this API did not give, or one of another video or list, is 400.

Response Body

The comments, as the document. When the call could not be parsed, the usual envelope.

application/json
  1. response

The first keys of a document-form answer. Unlike DocumentHead there is no search_information unless the engine has one (there is none for the AI engines, Events, Events Details, Facebook, Tripadvisor Place, Trending Now and the Apple engines' places).

search_metadata*
search_parameters*

The parameters the search ran with, defaults filled in; engine is the engine's name.

search_information?
video?
parent_comment?

The comment whose replies are listed.

comments?array<>
pagination?

Absent on the last page.

error?string

Why the list is empty.

Example Request
curl -X GET 'https://api.justserp.com/v1/tiktok/comments?video_id=6718335390845095173'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {},  "video": {    "id": "string",    "link": "string",    "comments": 0  },  "parent_comment": {    "id": "string",    "replies": 0  },  "comments": [    {      "position": 0,      "id": "string",      "text": "string",      "image": "string",      "likes": 0,      "replies": 0,      "iso_date": "string",      "language": "string",      "is_pinned": true,      "is_liked_by_creator": true,      "reply_to": {        "id": "string",        "username": "string",        "name": "string"      },      "author": {        "id": "string",        "username": "string",        "link": "string",        "name": "string",        "avatar": "string",        "is_verified": true      }    }  ],  "pagination": {    "next_page_token": "string"  },  "error": "string"}