TikTok Shop processed billions in GMV across the US, UK, and Southeast Asia within its first 18 months, and the broader "TikTok-driven commerce" effect (where viral videos push shoppers to Amazon, Shopify, or a brand's own DTC site) is even larger. The hashtag #TikTokMadeMeBuyIt has surpassed 100 billion views and continues to spawn category-defining viral products: skincare serums, kitchen gadgets, leggings, beverages. For DTC brands, this means the discovery layer of e-commerce has shifted to a short-video feed you do not control.
You cannot run a 100-SKU catalog by manually scrolling TikTok. You need an API that pulls product mentions, creator activity, hashtag velocity, sound trends, and customer sentiment on a schedule, normalized into a database you can query. This post walks through five concrete e-commerce workflows on the TikLiveAPI public TikTok scraping endpoints, with Python snippets you can drop into a cron job tonight.
There is an important distinction up front: the public TikTok API (which is what TikLiveAPI exposes) lets you read everything an unauthenticated TikTok user could see in the app. It is not the TikTok Shop merchant API, which is a separate OAuth-gated system reserved for verified Shop sellers and handles orders, inventory, and fulfillment.
Here is what the public surface gives you, all of which is critical for e-commerce intelligence:
/challenge-posts/ and /search-video/./post-detail/ returns commerce_info, commercial_video_info, is_ad, anchors, and anchors_extras fields. These flag boosted creative and product anchors attached to organic-looking videos.music_info object on each post and the /music-posts/ endpoint let you trace which audio tracks are powering viral product videos so your paid social team can use the same sound in ad creative./post-comments/ returns raw user opinions ("Does it actually work on oily skin?", "Mine arrived broken"), which is gold for product managers.Run /search-video/ with publish_time=1 (last 24 hours) and sort_by=1 (like count) against your category keywords. Track view and like velocity over rolling windows. Surface anything growing faster than its 7-day baseline.
For every branded hashtag you run (#MyBrandHaul, #MyBrandReview), poll /challenge-posts/ daily. Cross-reference creator handles against your affiliate program and your seeding list to figure out which posts came from paid partners, which from organic fans, and which from competitors riding your hashtag.
Pull your top three competitors' user IDs via /userid/, then poll /user-posts/ nightly. Log which SKUs they push, how often, and which posts cross 100k views. This is your competitive demand signal a week before search trends move.
For any post mentioning your product over a view threshold, pull /post-comments/ and run them through a sentiment classifier. Bucket by SKU, by issue type (defect, sizing, scent, shipping), and route to the relevant team. See our companion piece on building a sentiment pipeline for the classifier setup.
Aggregate music_info.id across the top 100 videos in your category for the last 7 days. Songs that appear on 10+ viral posts are about to be everywhere. Your paid social team uses them in TikTok Spark Ads before competitors catch on.
The simplest entry point is a daily keyword poll. The endpoint accepts a publish_time filter (1 = last 24h, 7 = week, 30 = month) and a sort_by filter (0 = relevance, 1 = like count, 2 = date posted).
import os, requests, json
from datetime import date
API_KEY = os.environ["TIKLIVE_API_KEY"]
BASE = "https://api.tikliveapi.com"
HEADERS = {"X-Api-Key": API_KEY}
def search_24h(keyword, count=35):
r = requests.get(
f"{BASE}/search-video/",
params={"keyword": keyword, "count": count,
"publish_time": 1, "sort_by": 1},
headers=HEADERS, timeout=30,
)
r.raise_for_status()
return r.json()["videos"]
categories = ["glow serum", "matcha whisk", "lip oil", "puffer vest"]
snapshot = {date.today().isoformat(): {
kw: search_24h(kw) for kw in categories
}}
with open("trend_snapshot.json", "w") as f:
json.dump(snapshot, f)
Run this on a 6-hour cron. Diff the top 35 against yesterday and flag anything new with more than 50k likes.
For branded hashtag campaigns, first resolve the hashtag name to an ID via /challenge-info-name/ (the response returns the hashtag in the cha_name field, not name), then page through /challenge-posts/.
def resolve_hashtag(name):
r = requests.get(
f"{BASE}/challenge-info-name/",
params={"name": name},
headers=HEADERS, timeout=30,
)
data = r.json()
return data["id"], data["cha_name"], data["view_count"]
def hashtag_posts(challenge_id, count=35, cursor=0):
r = requests.get(
f"{BASE}/challenge-posts/",
params={"challenge_id": challenge_id,
"count": count, "cursor": cursor},
headers=HEADERS, timeout=30,
)
return r.json()
cha_id, cha_name, views = resolve_hashtag("tiktokmademebuyit")
print(f"{cha_name}: {views:,} views")
page = hashtag_posts(cha_id)
for v in page["videos"]:
print(v["author"]["unique_id"], v["play_count"], v["title"][:60])
Persist author.unique_id, play_count, and create_time for every post. Join against your affiliate database. Anything in the top decile of plays that is not in your affiliate list is either organic UGC (great, amplify it) or a creator you should sign.
Once you have a list of high-view posts mentioning your product, fetch comments. Each comment item uses an id field (not cid) and exposes text, digg_count, reply_total, and create_time.
def post_comments(url, count=50, cursor=0):
r = requests.get(
f"{BASE}/post-comments/",
params={"url": url, "count": count, "cursor": cursor},
headers=HEADERS, timeout=30,
)
return r.json()
def all_comments(url, hard_cap=500):
cursor, out = 0, []
while True:
page = post_comments(url, 50, cursor)
out.extend(page["comments"])
if not page.get("hasMore") or len(out) >= hard_cap:
break
cursor = page["cursor"]
return out
comments = all_comments("https://www.tiktok.com/@user/video/7XXXXXXXXXXX")
texts = [c["text"] for c in comments]
# Pipe `texts` into your classifier of choice (HuggingFace,
# OpenAI, AWS Comprehend, etc.) and aggregate by SKU.
Glue it together into one cron-runnable file that hits all five workflows and writes a dated JSON blob your BI tool can ingest.
import time
from pathlib import Path
def snapshot():
today = date.today().isoformat()
out = {"date": today, "categories": {}, "brand_hashtags": {},
"competitors": {}}
for kw in CATEGORY_KEYWORDS:
out["categories"][kw] = search_24h(kw, count=35)
time.sleep(0.5)
for tag in BRAND_HASHTAGS:
cha_id, _, _ = resolve_hashtag(tag)
out["brand_hashtags"][tag] = hashtag_posts(cha_id, 35)
time.sleep(0.5)
for userid in COMPETITOR_USER_IDS:
r = requests.get(f"{BASE}/user-posts/",
params={"userid": userid, "count": 35},
headers=HEADERS, timeout=30)
out["competitors"][userid] = r.json()
time.sleep(0.5)
Path(f"snapshots/{today}.json").write_text(json.dumps(out))
if __name__ == "__main__":
snapshot()
Schedule with cron at 02:00 in your reporting timezone. Pair with a 12:00 mid-day delta job that only hits the 24-hour search to catch within-day spikes.
The raw JSON is for engineers. Your category managers need widgets. The minimum viable e-commerce dashboard built on this data looks like:
music_info.id values by appearance count in your category, with a play button (the play field on /music-info/ returns the audio stream URL).Most teams ship this as a Looker, Metabase, or Retool dashboard reading the JSON snapshots from S3.
E-commerce on TikTok sits at the intersection of three regulatory regimes you need to handle:
Every call to the API costs 1 Balance Credit. The dashboard does not proxy traffic or deduct credits; the external api.tikliveapi.com handles billing and rate limits. Here is a realistic daily budget:
That is roughly 183 credits per day, or about 5,500 per month. Add a generous 50% overhead for ad-hoc investigations and you land around 8,000-10,000 credits monthly. Check the pricing page for current package tiers; credits never expire, so a quarterly buy works well. Every new account receives 100 free credits on email verification, which is enough to prototype the trend-discovery workflow before committing.
No. Order, inventory, and fulfillment data require the TikTok Shop merchant API and OAuth as a verified Shop seller. TikLiveAPI exposes the public surface: posts, hashtags, music, comments, user profiles, and ad creative metadata.
Call /post-detail/ on the video URL. The response includes is_ad, commerce_info, commercial_video_info, anchors, and anchors_extras fields. Together these flag boosted creative, branded content, and product anchors attached to the post.
Reading publicly posted comments is generally defensible under legitimate interest for product monitoring, but storage triggers obligations: minimize fields you retain, set a retention window, and honor deletion requests. Talk to your DPO before going to production in the EU.
The API targets 750ms average response time. For a snapshot pulling 200 calls with a 0.5s pause between requests, budget around 3-4 minutes end to end. Parallelize with care to stay inside your rate-limit window.
Yes. /post-detail/ returns three URLs: play (SD, no watermark), hdplay (HD, no watermark), and wmplay (watermarked). The simpler /download-video/ endpoint returns video and video_hd. Always confirm you have a license from the creator before using their content in your ads. See the download endpoint docs and the post-detail reference for the full schema.
Start with the trend-discovery snippet against three category keywords. Once you trust the signal, layer in brand-hashtag tracking, then comment sentiment. Test live in the playground, browse the full endpoint catalog in documentation, or contact us if you want help wiring this into your existing BI stack.
Ready to put what you read into code? Try our endpoints live or grab the full reference.