1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "creatives": [{
9 "id": "ugc-v1",
10 "platform": "tiktok",
11 "objective": "conversion",
12 "product": "Loop earplugs",
13 "audience": "light sleepers",
14 "script": "Okay so I haven't slept through the night in two years because my partner snores. I tried Loop earplugs for a week, not sponsored. Night one I woke up at 7am, no alarm. They cut about 25 decibels but I can still hear my kid. Only thing, the small tips fit me better than the medium. If you're a light sleeper, grab them with the link in my bio and use code SLEEP10.",
15 "onScreenText": [
16 "2 years of no sleep",
17 "Loop earplugs, day 7",
18 "code SLEEP10",
19 ],
20 "caption": "Honestly wish I'd found these sooner. Code SLEEP10 in bio #loopearplugs #lightsleeper #sleep",
21 "durationSec": 24,
22 "hookSec": 1.2,
23 }] }
24
25
26run = client.actor("exepal/ad-creative-score").call(run_input=run_input)
27
28
29print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
30for item in client.dataset(run.default_dataset_id).iterate_items():
31 print(item)
32
33