Skip to content

Comments

One comment we fetched. This table is sparse next to the comment count on a video. There is no delete flag. Replies are not nested.

POST /comments/search17 columns

Request

POST /comments/search

An empty JSON object is the first page. A column you omit is not filtered. A column value is an object, and an empty object is rejected. Operators on one column are combined, and columns are combined with each other. Unknown fields are rejected. A JSON string is not a number, and a JSON number is not an id.

Request
{
  "video_id": { "eq": "7123456789012348672" },
  "text": { "match": "outfit" },
  "author_liked": { "eq": true },
  "limit": 20
}

A comment removed upstream disappears here only after reconcile. This route does not add a deleted filter, because the column does not exist.

Options

matchstring

Full-text query against the comment body. @ is rejected. The full-text rules are on the API page.

1 to 512 characters. @ is rejected.

sortarray

One to three keys, each field and direction. Direction is asc or desc. Field is a column on this route, or weight when a match is set. An explicit sort replaces the default and does not add id.

1 to 3 keys.

limitint

Page size. Default 20. Minimum 1. Maximum 100.

default 20.

offsetint

Matching rows to skip. Default 0. offset plus limit cannot exceed 1000.

default 0.

Response

total is how many rows match the filter, before paging. It is not the length of this page. limit and offset are the values after defaults. hits holds at most limit rows, and each row has every column, in the order below. No rows is still 200, with total 0 and hits empty. 0, an empty string, and -1 stay as stored. They are not turned into null. The response sends Cache-Control: no-store.

Example row. reply_count is the thread size, not a list of replies. Both scores are 0, which means the stored value was empty.

Response
{
  "total": 1,
  "limit": 20,
  "offset": 0,
  "hits": [
    {
      "id": "7123456789012348673",
      "video_id": "7123456789012348672",
      "author_id": "1234567890123456789",
      "text": "love this outfit",
      "created_at": 1767225600000,
      "language": "en",
      "likes": 12,
      "reply_count": 3,
      "author_liked": true,
      "author_pinned": false,
      "is_high_purchase_intent": false,
      "is_translatable": true,
      "reply_score": 0,
      "show_more_score": 0,
      "first_seen_at": 1767225601000,
      "last_seen_at": 1767300000000,
      "updated_at": 1767300000000
    }
  ]
}

Comment

idid

TikTok comment id, the cid. Decimal string.

eq, neq, gt, gte, lt, lte, in

video_idid

The post this comment is on. Decimal string. The same value as id on Videos.

eq, neq, gt, gte, lt, lte, in

author_idid

The commenter. Decimal string. The profile is often a stub author row that has not had a detail scrape.

eq, neq, gt, gte, lt, lte, in

texttext

Comment body. The JSON name is text. match searches this field only.

match, eq, neq

created_atint

When the comment was written, in Unix milliseconds.

eq, neq, gt, gte, lt, lte, in

languagestring

Detected language of the comment, or an empty string when it is unknown. eq is exact and case-sensitive.

eq, neq, in, regex

Counts

likesint

Like count on the comment from the last sync.

eq, neq, gt, gte, lt, lte, in

reply_countint

Thread size reported for this comment. Child replies are not nested objects in this table.

eq, neq, gt, gte, lt, lte, in

Flags

author_likedbool

The creator of the video liked this comment.

eq

author_pinnedbool

The creator of the video pinned this comment.

eq

is_high_purchase_intentbool

Commerce-intent flag on the comment.

eq

is_translatablebool

Translatable flag on the comment.

eq

Scores

reply_scorefloat

Rank score returned for the reply. The number is opaque. 0 means the stored value was empty.

eq, neq, gt, gte, lt, lte, in

show_more_scorefloat

Rank score returned for show-more. The number is opaque. 0 means the stored value was empty.

eq, neq, gt, gte, lt, lte, in

Clocks

first_seen_atint

When we first stored the comment, in Unix milliseconds.

eq, neq, gt, gte, lt, lte, in

last_seen_atint

When we last observed the comment, in Unix milliseconds.

eq, neq, gt, gte, lt, lte, in

updated_atint

When the last write touched this comment, in Unix milliseconds.

eq, neq, gt, gte, lt, lte, in

Videos, Authors, Hashtags, Health.