1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "maxDiscoveryChargeUsd": 0.5,
10 "sourceMode": "list",
11 "itemsList": [
12 {
13 "shortcode": "rA1x2Y3z4",
14 "post_url": "https://www.instagram.com/p/rA1x2Y3z4/",
15 "type": "Video",
16 "product_type": "clips",
17 "caption": """Why does your espresso taste sour? ☕
18It's almost never the beans — it's your grind. Here's the 10-second fix.
19Save this for your next shot.""",
20 "hashtags": [
21 "espresso",
22 "coffeetips",
23 "homebarista",
24 "coffeelover",
25 ],
26 "like_count": 3100,
27 "comment_count": 210,
28 "view_count": 41200,
29 "date": "2026-09-26T08:15:00+00:00",
30 "user": {
31 "username": "demo_roastery",
32 "full_name": "Demo Roastery",
33 "is_verified": False,
34 },
35 "from_url": "https://www.instagram.com/demo_roastery/",
36 "comments_disabled": False,
37 },
38 {
39 "shortcode": "rB2y3Z4a5",
40 "post_url": "https://www.instagram.com/p/rB2y3Z4a5/",
41 "type": "Sidecar",
42 "product_type": "carousel_container",
43 "caption": """5 brew ratios every home barista should know
44Swipe through, then try number 3 tomorrow morning.""",
45 "hashtags": [
46 "brewing",
47 "coffeetips",
48 "homebarista",
49 ],
50 "like_count": 1150,
51 "comment_count": 100,
52 "view_count": None,
53 "date": "2026-09-22T17:40:00+00:00",
54 "user": {
55 "username": "demo_roastery",
56 "full_name": "Demo Roastery",
57 "is_verified": False,
58 },
59 "from_url": "https://www.instagram.com/demo_roastery/",
60 "carousel_media_count": 5,
61 "comments_disabled": False,
62 },
63 {
64 "shortcode": "rC3z4A5b6",
65 "post_url": "https://www.instagram.com/p/rC3z4A5b6/",
66 "type": "Image",
67 "product_type": "feed",
68 "caption": "New single origin just landed: Ethiopia Guji, notes of peach and jasmine.",
69 "hashtags": [
70 "singleorigin",
71 "coffee",
72 ],
73 "like_count": 395,
74 "comment_count": 25,
75 "view_count": None,
76 "date": "2026-09-18T09:05:00+00:00",
77 "user": {
78 "username": "demo_roastery",
79 "full_name": "Demo Roastery",
80 "is_verified": False,
81 },
82 "from_url": "https://www.instagram.com/demo_roastery/",
83 "comments_disabled": False,
84 },
85 {
86 "shortcode": "rD4a5B6c7",
87 "post_url": "https://www.instagram.com/p/rD4a5B6c7/",
88 "type": "Image",
89 "product_type": "feed",
90 "caption": "Saturday at the roastery. Come say hi until 4 pm.",
91 "hashtags": [
92 "roastery",
93 "coffee",
94 ],
95 "like_count": 440,
96 "comment_count": 30,
97 "view_count": None,
98 "date": "2026-09-13T11:20:00+00:00",
99 "user": {
100 "username": "demo_roastery",
101 "full_name": "Demo Roastery",
102 "is_verified": False,
103 },
104 "from_url": "https://www.instagram.com/demo_roastery/",
105 "comments_disabled": False,
106 },
107 {
108 "shortcode": "rE5b6C7d8",
109 "post_url": "https://www.instagram.com/p/rE5b6C7d8/",
110 "type": "Video",
111 "product_type": "clips",
112 "caption": "Behind the scenes: roast day.",
113 "hashtags": [
114 "roasting",
115 "coffee",
116 ],
117 "like_count": 460,
118 "comment_count": 35,
119 "view_count": 7800,
120 "date": "2026-09-09T14:00:00+00:00",
121 "user": {
122 "username": "demo_roastery",
123 "full_name": "Demo Roastery",
124 "is_verified": False,
125 },
126 "from_url": "https://www.instagram.com/demo_roastery/",
127 "comments_disabled": False,
128 },
129 {
130 "shortcode": "rF6c7D8e9",
131 "post_url": "https://www.instagram.com/p/rF6c7D8e9/",
132 "type": "Image",
133 "product_type": "feed",
134 "caption": "Our autumn blend is back.",
135 "hashtags": [
136 "autumn",
137 "coffee",
138 ],
139 "like_count": 420,
140 "comment_count": 45,
141 "view_count": None,
142 "date": "2026-09-04T10:30:00+00:00",
143 "user": {
144 "username": "demo_roastery",
145 "full_name": "Demo Roastery",
146 "is_verified": False,
147 },
148 "from_url": "https://www.instagram.com/demo_roastery/",
149 "comments_disabled": False,
150 },
151 {
152 "shortcode": "fA1x2Y3z4",
153 "post_url": "https://www.instagram.com/p/fA1x2Y3z4/",
154 "type": "Video",
155 "product_type": "clips",
156 "caption": """How to do your first pull-up in 4 weeks 💪
157No gym needed — just a door frame and a towel.
158Comment PULL and I'll send you the plan.""",
159 "hashtags": [
160 "pullup",
161 "calisthenics",
162 "homeworkout",
163 "fitnessmotivation",
164 "strength",
165 ],
166 "like_count": 2650,
167 "comment_count": 480,
168 "view_count": 63000,
169 "date": "2026-09-25T06:45:00+00:00",
170 "user": {
171 "username": "demo_fitcoach",
172 "full_name": "Demo Fit Coach",
173 "is_verified": False,
174 },
175 "from_url": "https://www.instagram.com/demo_fitcoach/",
176 "comments_disabled": False,
177 },
178 {
179 "shortcode": "fB2y3Z4a5",
180 "post_url": "https://www.instagram.com/p/fB2y3Z4a5/",
181 "type": "Sidecar",
182 "product_type": "carousel_container",
183 "caption": """3 mistakes that keep your squat stuck at the same weight
184Mistake #2 surprised most of my clients.""",
185 "hashtags": [
186 "squat",
187 "strengthtraining",
188 "gymtips",
189 ],
190 "like_count": 1020,
191 "comment_count": 90,
192 "view_count": None,
193 "date": "2026-09-20T18:10:00+00:00",
194 "user": {
195 "username": "demo_fitcoach",
196 "full_name": "Demo Fit Coach",
197 "is_verified": False,
198 },
199 "from_url": "https://www.instagram.com/demo_fitcoach/",
200 "carousel_media_count": 5,
201 "comments_disabled": False,
202 },
203 {
204 "shortcode": "fC3z4A5b6",
205 "post_url": "https://www.instagram.com/p/fC3z4A5b6/",
206 "type": "Image",
207 "product_type": "feed",
208 "caption": "Meal prep Sunday. Chicken, rice, greens.",
209 "hashtags": [
210 "mealprep",
211 "fitfood",
212 ],
213 "like_count": 330,
214 "comment_count": 20,
215 "view_count": None,
216 "date": "2026-09-15T12:00:00+00:00",
217 "user": {
218 "username": "demo_fitcoach",
219 "full_name": "Demo Fit Coach",
220 "is_verified": False,
221 },
222 "from_url": "https://www.instagram.com/demo_fitcoach/",
223 "comments_disabled": False,
224 },
225 {
226 "shortcode": "fD4a5B6c7",
227 "post_url": "https://www.instagram.com/p/fD4a5B6c7/",
228 "type": "Video",
229 "product_type": "clips",
230 "caption": "Quick mobility flow before work.",
231 "hashtags": [
232 "mobility",
233 "stretching",
234 ],
235 "like_count": 360,
236 "comment_count": 40,
237 "view_count": 5200,
238 "date": "2026-09-11T07:30:00+00:00",
239 "user": {
240 "username": "demo_fitcoach",
241 "full_name": "Demo Fit Coach",
242 "is_verified": False,
243 },
244 "from_url": "https://www.instagram.com/demo_fitcoach/",
245 "comments_disabled": False,
246 },
247 {
248 "shortcode": "fE5b6C7d8",
249 "post_url": "https://www.instagram.com/p/fE5b6C7d8/",
250 "type": "Image",
251 "product_type": "feed",
252 "caption": "Client win of the week — 12 weeks, one big smile.",
253 "hashtags": [
254 "clientwin",
255 "transformation",
256 ],
257 "like_count": 390,
258 "comment_count": 30,
259 "view_count": None,
260 "date": "2026-09-07T16:20:00+00:00",
261 "user": {
262 "username": "demo_fitcoach",
263 "full_name": "Demo Fit Coach",
264 "is_verified": False,
265 },
266 "from_url": "https://www.instagram.com/demo_fitcoach/",
267 "comments_disabled": False,
268 },
269 {
270 "shortcode": "fF6c7D8e9",
271 "post_url": "https://www.instagram.com/p/fF6c7D8e9/",
272 "type": "Image",
273 "product_type": "feed",
274 "caption": "Rest day reminder: recovery is training too.",
275 "hashtags": [
276 "recovery",
277 "restday",
278 ],
279 "like_count": 340,
280 "comment_count": 25,
281 "view_count": None,
282 "date": "2026-09-02T09:00:00+00:00",
283 "user": {
284 "username": "demo_fitcoach",
285 "full_name": "Demo Fit Coach",
286 "is_verified": False,
287 },
288 "from_url": "https://www.instagram.com/demo_fitcoach/",
289 "comments_disabled": False,
290 },
291 {
292 "shortcode": "sA1x2Y3z4",
293 "post_url": "https://www.instagram.com/p/sA1x2Y3z4/",
294 "type": "Image",
295 "product_type": "feed",
296 "caption": """Stop layering five serums. Here's what a dermatologist-reviewed routine actually looks like.
297Save this before your next skincare haul.""",
298 "hashtags": [
299 "skincare",
300 "skincareroutine",
301 "glowup",
302 "serum",
303 "skintok",
304 "beautytips",
305 "dermatology",
306 "cleanbeauty",
307 ],
308 "like_count": 2250,
309 "comment_count": 310,
310 "view_count": None,
311 "date": "2026-09-24T13:25:00+00:00",
312 "user": {
313 "username": "demo_skinlab",
314 "full_name": "Demo Skin Lab",
315 "is_verified": False,
316 },
317 "from_url": "https://www.instagram.com/demo_skinlab/",
318 "comments_disabled": False,
319 },
320 {
321 "shortcode": "sB2y3Z4a5",
322 "post_url": "https://www.instagram.com/p/sB2y3Z4a5/",
323 "type": "Video",
324 "product_type": "clips",
325 "caption": """3 ingredients that don't mix 🚫
326Number 2 is in half your bathroom cabinets.""",
327 "hashtags": [
328 "skincare",
329 "ingredients",
330 "skincaretips",
331 ],
332 "like_count": 1180,
333 "comment_count": 140,
334 "view_count": 28900,
335 "date": "2026-09-19T19:00:00+00:00",
336 "user": {
337 "username": "demo_skinlab",
338 "full_name": "Demo Skin Lab",
339 "is_verified": False,
340 },
341 "from_url": "https://www.instagram.com/demo_skinlab/",
342 "comments_disabled": False,
343 },
344 {
345 "shortcode": "sC3z4A5b6",
346 "post_url": "https://www.instagram.com/p/sC3z4A5b6/",
347 "type": "Image",
348 "product_type": "feed",
349 "caption": "New: barrier repair cream, now in a larger jar.",
350 "hashtags": [
351 "newlaunch",
352 "skincare",
353 ],
354 "like_count": 410,
355 "comment_count": 30,
356 "view_count": None,
357 "date": "2026-09-16T10:10:00+00:00",
358 "user": {
359 "username": "demo_skinlab",
360 "full_name": "Demo Skin Lab",
361 "is_verified": False,
362 },
363 "from_url": "https://www.instagram.com/demo_skinlab/",
364 "comments_disabled": False,
365 },
366 {
367 "shortcode": "sD4a5B6c7",
368 "post_url": "https://www.instagram.com/p/sD4a5B6c7/",
369 "type": "Image",
370 "product_type": "feed",
371 "caption": "Behind the lab: where we test every batch.",
372 "hashtags": [
373 "behindthescenes",
374 "lab",
375 ],
376 "like_count": 380,
377 "comment_count": 35,
378 "view_count": None,
379 "date": "2026-09-10T12:45:00+00:00",
380 "user": {
381 "username": "demo_skinlab",
382 "full_name": "Demo Skin Lab",
383 "is_verified": False,
384 },
385 "from_url": "https://www.instagram.com/demo_skinlab/",
386 "comments_disabled": False,
387 },
388 {
389 "shortcode": "sE5b6C7d8",
390 "post_url": "https://www.instagram.com/p/sE5b6C7d8/",
391 "type": "Sidecar",
392 "product_type": "carousel_container",
393 "caption": "Ingredient glossary, part one.",
394 "hashtags": [
395 "ingredients",
396 "skincare",
397 ],
398 "like_count": 430,
399 "comment_count": 25,
400 "view_count": None,
401 "date": "2026-09-06T15:00:00+00:00",
402 "user": {
403 "username": "demo_skinlab",
404 "full_name": "Demo Skin Lab",
405 "is_verified": False,
406 },
407 "from_url": "https://www.instagram.com/demo_skinlab/",
408 "carousel_media_count": 5,
409 "comments_disabled": False,
410 },
411 {
412 "shortcode": "sF6c7D8e9",
413 "post_url": "https://www.instagram.com/p/sF6c7D8e9/",
414 "type": "Image",
415 "product_type": "feed",
416 "caption": "Weekend sale: 15% off the starter set.",
417 "hashtags": [
418 "sale",
419 "skincare",
420 ],
421 "like_count": 365,
422 "comment_count": 20,
423 "view_count": None,
424 "date": "2026-09-01T08:00:00+00:00",
425 "user": {
426 "username": "demo_skinlab",
427 "full_name": "Demo Skin Lab",
428 "is_verified": False,
429 },
430 "from_url": "https://www.instagram.com/demo_skinlab/",
431 "comments_disabled": False,
432 },
433 ],
434 "discoveryInput": {},
435}
436
437
438run = client.actor("rich_minds/ig-competitor-winning-posts").call(run_input=run_input)
439
440
441print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
442for item in client.dataset(run.default_dataset_id).iterate_items():
443 print(item)
444
445