1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentItems": [
10 {
11 "id": "v1",
12 "author": "shopcreator1",
13 "text": "portable blender morning routine #blender #tiktokmademebuyit",
14 "views": 1200000,
15 "likes": 96000,
16 "comments": 3100,
17 "shares": 22000,
18 "hashtags": [
19 "blender",
20 "tiktokmademebuyit",
21 ],
22 },
23 {
24 "id": "v2",
25 "author": "shopcreator2",
26 "text": "desk lamp setup #desksetup #lamp",
27 "views": 340000,
28 "likes": 18000,
29 "comments": 700,
30 "shares": 3100,
31 "hashtags": [
32 "desksetup",
33 "lamp",
34 ],
35 },
36 ],
37 "previousItems": [{
38 "id": "v1",
39 "author": "shopcreator1",
40 "text": "portable blender morning routine #blender #tiktokmademebuyit",
41 "views": 520000,
42 "likes": 39000,
43 "comments": 1600,
44 "shares": 8000,
45 "hashtags": [
46 "blender",
47 "tiktokmademebuyit",
48 ],
49 }],
50}
51
52
53run = client.actor("quanmatrix/tiktok-product-viral-signal-intelligence").call(run_input=run_input)
54
55
56print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
57for item in client.dataset(run.default_dataset_id).iterate_items():
58 print(item)
59
60