1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "datasetItems": [
12 {
13 "_demo": "Replace me with rows from your Creative Center scraper run (or use videoUrls / materialIds / datasetId). This demo row returns one uncharged row showing the per-row status contract.",
14 "brand_name": "Demo Brand",
15 "ad_title": "Demo Top Ad — replace me with rows from your Creative Center scraper run",
16 "ctr": 0.05,
17 "cost": 2,
18 "industry_key": "label_demo",
19 "objective_key": "3"
20 }
21 ]
22};
23
24
25const run = await client.actor("steadyfetch/tiktok-ads-transcript-scraper").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