1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 "Competitor Store (Electrolyte Drink Mix · $45/30-sticks · Subscribe-and-Save 15% · Free shaker at $75): Weakness = 480mg maltodextrin filler + $6.99 shipping under $75. Counter-Hook: '1,000mg pure electrolytes with 0g maltodextrin filler—and free shipping on every box.'",
13 "Competitor Store (Collagen Peptides · $52/tub · 3-Pack $129 · 30-day unopened return policy): Weakness = Return policy excludes opened tubs + bovine-only source. Counter-Hook: 'Try the entire tub for 60 days—100% money-back even if the scoop hits the bottom.'",
14 "Competitor Store (Ergonomic Mesh Chair · $499 · +$89 headrest add-on · 3-year warranty): Weakness = Headrest and 4D armrests sold as $148 upsells. Counter-Hook: 'Full-spec ergonomic mesh chair with 4D armrests and headrest included—12-year frame warranty.'"
15 ]
16};
17
18
19const run = await client.actor("ultra-liquid/shopify-competitor-ad-pain-analyzer").call(input);
20
21
22console.log('Results from dataset');
23console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
24const { items } = await client.dataset(run.defaultDatasetId).listItems();
25items.forEach((item) => {
26 console.dir(item);
27});
28
29