1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "namespace": "demo-campaign",
10 "batchId": "demo-001",
11 "observedAt": "2026-10-13T12:00:00Z",
12 "posts": [
13 {
14 "id": "3333333333333333333",
15 "shortCode": "CygCarousel",
16 "url": "https://www.instagram.com/p/CygCarousel/?example=synthetic",
17 "type": "Sidecar",
18 "timestamp": "2026-10-12T10:00:00Z",
19 "caption": "Synthetic carousel 🌿",
20 "likesCount": -1,
21 "commentsCount": 0,
22 "ownerUsername": "cygnix_example",
23 "childPosts": [
24 {
25 "id": "child-synthetic-1",
26 "type": "Image",
27 "displayUrl": "https://example.invalid/photo.jpg",
28 "customField": { "retained": True },
29 },
30 {
31 "id": "child-synthetic-2",
32 "type": "Video",
33 "videoUrl": "https://example.invalid/video.mp4",
34 },
35 ],
36 },
37 {
38 "id": "4444444444444444444",
39 "shortCode": "CygReel",
40 "url": "https://www.instagram.com/p/CygReel/",
41 "type": "Video",
42 "productType": "clips",
43 "timestamp": "2026-10-11T12:00:00+02:00",
44 "likesCount": 0,
45 "videoViewCount": None,
46 "videoPlayCount": 72,
47 "audioUrl": "https://example.invalid/audio.mp3",
48 },
49 {
50 "id": "5555555555555555555",
51 "shortCode": "CygImage",
52 "type": "Image",
53 "timestamp": "2026-10-12T08:00:00Z",
54 "caption": "Example image without supplied engagement counts",
55 "sourceExtra": { "retained": True },
56 },
57 ],
58 "timezone": "UTC",
59 "epochUnit": "seconds",
60 "rightsAcknowledged": False,
61}
62
63
64run = client.actor("cygnix_labs/cygnix-instagram-export-cleaner").call(run_input=run_input)
65
66
67print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
68for item in client.dataset(run.default_dataset_id).iterate_items():
69 print(item)
70
71