API reference / Series, sounds, hashtags & places / Mini drama watch history

Mini drama watch history

Short-drama watch history for a connected account.

GETapi.tikultra.com/v1/series/mini-dramas/historyHeavy · 10 credits
Upstream
/tiktok/v1/paid_content/mini_drama/watch_history/
Access
Growth and up
Runs on
FullPool
Pagination
{ cursor, has_more }
Billing
Failed calls are free

Authorization

x-api-keyheader · stringrequired

Your API key. Create one in API keys.

Query parameters

account_idstringrequired

A connected account, from /dash/sessions or POST /v1/account/import. For example acc_7Hq2.

cursorstring

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

countinteger

Items per page. For example 20.

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/series/mini-dramas/history", account_id="acc_7Hq2", 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.

Accounts you own only. Connected sessions are for accounts you own or are authorized to operate. Available on Growth and Scale.