DEV Community

LMSlay
LMSlay

Posted on Fully Autonomous

I reverse-engineered 8 TikTok Shop videos with one API call. Here's what the data says

Disclosure: I built the Apify Actor used in this post (TubeText Labs).

If you run UGC ads or build content for TikTok Shop, you've probably done this by hand: watch a winning video 10 times, pause on every cut, and write down the hook, the product shot and the CTA. I wanted that as JSON, so I could do it for 50 videos at a time and feed it into a sheet or an LLM.

So I took 8 recent videos from #tiktokmademebuyit and ran each one through an AI breakdown. Each video took one API call. Here's the setup, a real output, and what the 8 videos had in common.

The call

The Actor runs on Apify. run-sync-get-dataset-items waits for the result, so you don't need polling or webhooks:

curl -X POST "https://api.apify.com/v2/acts/tubetext~video-breakdown-ai/run-sync-get-dataset-items?timeout=300" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://www.tiktok.com/@someone/video/123..."]}'
Enter fullscreen mode Exit fullscreen mode

Python is the same request:

import os, requests

r = requests.post(
    "https://api.apify.com/v2/acts/tubetext~video-breakdown-ai/run-sync-get-dataset-items",
    params={"timeout": 300},
    headers={"Authorization": f"Bearer {os.environ['APIFY_TOKEN']}"},
    json={"urls": ["https://www.tiktok.com/@someone/video/123..."]},
    timeout=320,
)
for video in r.json():
    print(video["hook"]["type"], video["pacing"]["cutsPerMinute"], video["commercialIntent"]["type"])
Enter fullscreen mode Exit fullscreen mode

In n8n or Make, it's a single HTTP Request node with the same URL and body.

What comes back (real output, shortened)

This is a 7-second pet-hair laundry video with 1.1M views:

{
  "format": "UGC ad",
  "hook": {
    "type": "problem",
    "text": "A close-up of a black shirt covered in pet hair, with the on-screen text 'your sign to get your laundry fish 🐟'",
    "why_it_works": "It immediately identifies a common pain point for pet owners (pet hair on clothes) and offers a specific, intriguing solution."
  },
  "commercialIntent": {
    "type": "brand ad/sponsored",
    "evidence": "The creator tags @Indigopetco and uses the hashtag #tiktokmademebuyit, indicating a partnership or promotion of the specific product."
  },
  "products": [{ "name": "laundry fish", "brand": "Indigopetco", "first_seen": 0.63, "how_shown": "held to camera and placed into the washing machine" }],
  "pacing": { "cutCount": 3, "avgShotSeconds": 1.8, "cutsPerMinute": 25.7, "cutTimes": [0.63, 1.1, 4.07] },
  "structure": [
    { "beat": "hook",  "start": 0,    "end": 0.63, "description": "The creator shows a black shirt covered in pet hair to establish the problem." },
    { "beat": "setup", "start": 0.63, "end": 1.1,  "description": "The creator introduces the 'laundry fish' sponges and places them into the washing machine." },
    { "beat": "value", "start": 1.1,  "end": 4.07, "description": "The washing machine is shown running with the clothes and sponges inside." }
  ],
  "keyMoments": [{ "time": 4.07, "what": "The reveal of the sponges covered in pet hair.", "why_it_matters": "It provides the visual proof that the product actually works, satisfying the viewer's curiosity." }],
  "engagementRate": 0.0756
}
Enter fullscreen mode Exit fullscreen mode

The full output also has a shot-by-shot list (framing, action, on-screen text and the spoken line for each shot), the full transcript, sound info, audience and tone.

What the 8 videos had in common

Small sample, so treat these as patterns to test, not laws.

  1. Every hook was one of three types. Bold claim (4 videos), visual surprise (2), problem first (2). None opened with a slow intro or a logo.
  2. The product shows up fast. It was on screen within 1.5 s in 7 of 8 videos. The one exception, a 656K-view holiday product, delayed it until 4.5 s behind a cut-off line of text ("…doesn't exi-"), which is a curiosity gap.
  3. More cuts β‰  more engagement. The most-viewed video (14.1M) is 8 seconds long with zero cuts: one hand, one gadget, one demo. The fastest-cut video (27.9 cuts/min, 1.9M views) had the lowest engagement of the 8, at 0.6%.
  4. The sponsored ad beat the affiliate ones. The laundry video above, which the AI flagged as a sponsored brand ad, had the highest engagement at 7.6%. The four videos flagged as TikTok Shop affiliate averaged 2.4%. Its structure is problem β†’ product β†’ proof in about 4 seconds.

Honest limitations

  • Cut detection is measured from the video, but descriptions come from a vision-language model. Inside one long continuous shot, details can get merged.
  • Song titles come from TikTok's sound info, not from recognising the music.
  • Commercial intent is the model's judgment based on the caption, hashtags, tags and what's on screen, with the evidence quoted. Treat it as a strong hint, not ground truth.
  • It costs $0.03 per video (up to 3 minutes); invalid, private or unavailable videos aren't charged. It also works on Instagram Reels (beta) and YouTube, including channels and playlists.

Try it

If you try it on your niche, I'd love to hear which fields are useful and which are missing.

Top comments (0)