1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "inlineAds": [
12 {
13 "pageName": "Alpha Skin",
14 "adText": "Tired of dull, tired skin? Our serum fixes the problem in minutes.",
15 "startDate": "2026-09-01",
16 "videos": [
17 {
18 "url": "https://example.com/v.mp4"
19 }
20 ],
21 "ctaText": "Shop Now",
22 "linkUrl": "https://alphaskin.example/shop"
23 },
24 {
25 "pageName": "Alpha Skin",
26 "adText": "Save 40 percent this week. Premium quality serum, now on sale with free shipping.",
27 "startDate": "2026-06-01",
28 "images": [
29 "https://example.com/a.jpg"
30 ],
31 "ctaText": "Shop Now",
32 "linkUrl": "https://alphaskin.example/sale"
33 },
34 {
35 "pageName": "Beta Gear",
36 "adText": "5 reasons ten thousand runners switched. Loved by customers everywhere, rated five stars.",
37 "startDate": "2026-08-15",
38 "endDate": "2026-10-01",
39 "images": [
40 "https://example.com/b.jpg"
41 ]
42 },
43 {
44 "pageName": "Beta Gear",
45 "adText": "Introducing the brand new trail shoe. Our newest design is now available.",
46 "startDate": "2026-09-20",
47 "cards": [
48 {
49 "image": 1
50 },
51 {
52 "image": 2
53 },
54 {
55 "image": 3
56 }
57 ]
58 },
59 {
60 "pageName": "Gamma Learn",
61 "adText": "How it works: learn the system step by step in this free guide and discover more.",
62 "startDate": "2026-09-10"
63 }
64 ],
65 "maxAds": 5000
66};
67
68
69const run = await client.actor("delta_tools/ad-creative-pattern-analyzer").call(input);
70
71
72console.log('Results from dataset');
73console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
74const { items } = await client.dataset(run.defaultDatasetId).listItems();
75items.forEach((item) => {
76 console.dir(item);
77});
78
79