1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "posts": [
12 {
13 "id": "cold-brew-launch",
14 "caption": "Sunday reset ☕ Our new oat milk cold brew is finally here! Smooth, low acid and made in small batches in Austin.\nWhich flavor should we drop next? Comment below 👇\n.\n.\n.\n#coffee #coldbrew #oatmilk #austincoffee #love #instagood #like4like #coffeeshop #smallbatch #photooftheday #coffeelover #austintx",
15 "firstComment": "#coffeetime #latteart #specialtycoffee"
16 },
17 {
18 "id": "monday",
19 "caption": "I love #coffee and #mondays. Shop the beans: https://shop.example.com"
20 }
21 ]
22};
23
24
25const run = await client.actor("feedwise/instagram-caption-checker").call(input);
26
27
28console.log('Results from dataset');
29console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
30const { items } = await client.dataset(run.defaultDatasetId).listItems();
31items.forEach((item) => {
32 console.dir(item);
33});
34
35