1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "items",
12 "items": [
13 {
14 "publicationName": "AI Operator Weekly",
15 "platform": "newsletter",
16 "sourceUrl": "https://aioperator.example/p/ops-pilot-sponsored?utm_source=sample",
17 "title": "This week in practical AI automation",
18 "excerpt": "Today's sponsor is OpsPilot. Use coupon BUILD20 for founder-friendly workflow automation.",
19 "publishDate": "2026-07-02",
20 "category": "AI startups",
21 "tags": [
22 "SaaS founders",
23 "automation"
24 ],
25 "audienceHint": "B2B SaaS founders and AI builders",
26 "sponsorMentions": "OpsPilot",
27 "offerText": "OpsPilot helps small teams automate handoffs without hiring a full operations squad."
28 },
29 {
30 "showName": "Creator Revenue Lab",
31 "platform": "podcast",
32 "episodeUrl": "https://podcasts.example/creator-revenue-lab/88?ref=sample",
33 "title": "How niche creators package premium sponsorships",
34 "description": "This episode includes a sponsor read from MediaKit Pro and a promo code for new publisher accounts.",
35 "postedAt": "2026-06-26T09:00:00.000Z",
36 "category": "creator monetization",
37 "tags": [
38 "newsletter growth",
39 "sponsorships"
40 ],
41 "audienceHint": "independent publishers and creator operators",
42 "sponsorMentions": [
43 "MediaKit Pro"
44 ]
45 },
46 {
47 "channelName": "Weekend Notes",
48 "platform": "manual",
49 "title": "A few thoughts from the week",
50 "text": "A casual personal update about writing routines, books, and local events.",
51 "postedAt": "2026-06-30",
52 "category": "personal blog"
53 }
54 ],
55 "brandProfile": "AI workflow automation platform for B2B SaaS and RevOps teams",
56 "targetAudience": [
57 "SaaS founders",
58 "RevOps",
59 "AI builders"
60 ],
61 "targetCategories": [
62 "AI",
63 "SaaS",
64 "operations"
65 ],
66 "excludedNiches": [
67 "gambling",
68 "adult"
69 ],
70 "competitors": [
71 "WorkflowPilot",
72 "OpsStack"
73 ],
74 "scrapedAt": "2026-07-05T12:00:00.000Z"
75};
76
77
78const run = await client.actor("rotvuvo/newsletter-podcast-sponsor-lead-scorer").call(input);
79
80
81console.log('Results from dataset');
82console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
83const { items } = await client.dataset(run.defaultDatasetId).listItems();
84items.forEach((item) => {
85 console.dir(item);
86});
87
88