1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentItems": [
10 {
11 "id": "p1",
12 "username": "brandA",
13 "caption": "5 quick running recovery tips",
14 "likesCount": 9200,
15 "commentsCount": 430,
16 "videoViewCount": 182000,
17 "timestamp": "2026-09-09T12:00:00Z",
18 "type": "Reel",
19 },
20 {
21 "id": "p2",
22 "username": "brandB",
23 "caption": "new trail shoe launch review",
24 "likesCount": 4100,
25 "commentsCount": 190,
26 "videoViewCount": 65000,
27 "timestamp": "2026-09-08T12:00:00Z",
28 "type": "Reel",
29 },
30 ],
31 "previousItems": [{
32 "id": "p1",
33 "username": "brandA",
34 "caption": "5 quick running recovery tips",
35 "likesCount": 6100,
36 "commentsCount": 270,
37 "videoViewCount": 105000,
38 "timestamp": "2026-09-09T12:00:00Z",
39 "type": "Reel",
40 }],
41}
42
43
44run = client.actor("quanmatrix/instagram-content-competitive-gap-intelligence").call(run_input=run_input)
45
46
47print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
48for item in client.dataset(run.default_dataset_id).iterate_items():
49 print(item)
50
51