1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "transcripts": [
12 {
13 "title": "Small Shop Growth podcast, episode 12 (sample)",
14 "transcript": "0:00 Welcome back to the Small Shop Growth podcast. Today we talk about email versus social for a five-person store.\n0:09 Quick note before we start: this episode is sponsored by Parcelly, the shipping app that prints labels in one click.\n0:17 Use the code GROWTH20 at checkout for twenty percent off your first three months.\n0:24 Okay, so my guest runs a candle shop with four employees and about nine thousand customers.\n0:32 The thing that surprised me most: she stopped posting on Instagram for a whole quarter.\n0:39 And revenue did not drop. It went up eleven percent, because the time went into the newsletter.\n0:47 Her open rate sits at forty-two percent, which is roughly double the retail average.\n0:55 Honestly, I think most small brands are addicted to likes and it is killing their margins.\n1:03 A listener, Maria from Lisbon, asked: how often should I send without annoying people?\n1:10 Her answer was once a week, same day, same time, and every email has one clear offer.\n1:18 She also tested two subject lines on every send for six months.\n1:25 Short subject lines under thirty characters won seventy percent of those tests.\n1:33 The worst email she ever sent was a discount nobody asked for. Unsubscribes tripled that day.\n1:41 Her rule now: never discount to fix a slow week, fix the product page instead.\n1:49 If this helped, subscribe and leave a review, it really helps a small show like ours.\n1:56 Next week: how to price handmade products without racing to the bottom."
15 }
16 ],
17 "find": [
18 "clip_worthy",
19 "claims_statistics",
20 "sponsor_segments"
21 ]
22};
23
24
25const run = await client.actor("reliable_tools/youtube-transcript-extractor").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