API reference / Videos & comments / Comments

Comments

A page of comments on a video.

GETapi.tikultra.com/v1/video/commentsStandard · 5 credits
Upstream
/aweme/v2/comment/list/
Access
Every plan
Runs on
LeanPool · android · tiktok · 47.6.3
Pagination
{ cursor, has_more }
Client
os, app_flavour, app_version overrides
Billing
Failed calls are free
Older path
/v1/scrape/comments

Authorization

x-api-keyheader · stringrequired

Your API key. Create one in API keys.

Query parameters

aweme_idstringaweme_id or url

The numeric video ID. For example 7705852133855161377.

urlstringaweme_id or url

A share link instead of an aweme_id: tiktok.com, vm.tiktok.com or vt.tiktok.com.

cursorstring

The cursor from the previous page. Omit it for the first page.

countinteger

Items per page. For example 20.

sort_strategystring

hot or new. One of hot, new.

Client and egress overrides

Optional. Leave them out to run as android · tiktok · 47.6.3 from the default pool. See Clients and versions.

osstring

android or ios. For example android.

app_flavourstring

Run as tiktok, lite, lite_coin, pro, studio, shop, tv, douyin. For example tiktok.

app_versionstring

A release of that app. Defaults to the current default for (os, app_flavour). For example 47.6.3.

regionstring

Two-letter country code for egress. For example US.

citystring

A supported city in that region. For example miami.

Response

A 200 returns JSON with stable field names. Every response carries x-credits-cost, x-credits-tier and x-credits-remaining.

Pagination

Pass cursor from the previous page and stop when has_more is false. Both sit at the top level of every page; the raw upstream cursor fields are still in the body. See Pagination.

Page shape
{
  "cursor": "1794158512000",
  "has_more": true,
  "items": [
    "…"
  ]
}
PythonNode.jspages
import os, requests

def pages(path, **params):
    cursor = None
    while True:
        if cursor:
            params["cursor"] = cursor
        r = requests.get(f"https://api.tikultra.com{path}", params=params,
                         headers={"x-api-key": os.environ["TIKULTRA_KEY"]})
        r.raise_for_status()
        page = r.json()
        yield page
        if not page["has_more"]:
            return
        cursor = page["cursor"]

for page in pages("/v1/video/comments", aweme_id=7705852133855161377, count=50):
    print(page["cursor"], page["has_more"])

Errors

Errors return a JSON body with a stable code and cost 0 credits. See Errors and retries.