1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "reportName": "Sample weekly sportswear competitor ad report",
12 "items": [
13 {
14 "libraryID": "sample-nike-001",
15 "brand": "Nike",
16 "keyword": "Nike",
17 "body": "Run-ready styles for every training day. Explore the latest performance collection.",
18 "startDate": "2026-05-20",
19 "isActive": true,
20 "platforms": [
21 "Facebook",
22 "Instagram"
23 ],
24 "ctaLink": "https://www.nike.com/running"
25 },
26 {
27 "libraryID": "sample-puma-001",
28 "brand": "PUMA",
29 "keyword": "Puma",
30 "body": "New season essentials built for training, streetwear, and everyday movement.",
31 "startDate": "2026-05-22",
32 "isActive": true,
33 "platforms": [
34 "Facebook",
35 "Instagram"
36 ],
37 "ctaLink": "https://us.puma.com/us/en/sports"
38 },
39 {
40 "libraryID": "sample-newbalance-001",
41 "brand": "New Balance",
42 "keyword": "New Balance",
43 "body": "Fresh running gear and comfort-first sneakers for your next workout.",
44 "startDate": "2026-05-24",
45 "isActive": true,
46 "platforms": [
47 "Facebook"
48 ],
49 "ctaLink": "https://www.newbalance.com/running/"
50 }
51 ],
52 "search": {
53 "keywords": [
54 "Nike",
55 "Puma",
56 "New Balance"
57 ],
58 "country": "US",
59 "activeStatus": "active",
60 "period": "sample input"
61 },
62 "maxItems": 500
63};
64
65
66const run = await client.actor("jy-labs/weekly-competitor-ad-intelligence").call(input);
67
68
69console.log('Results from dataset');
70console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
71const { items } = await client.dataset(run.defaultDatasetId).listItems();
72items.forEach((item) => {
73 console.dir(item);
74});
75
76