1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "id": "sample-1",
14 "platform": "instagram",
15 "text": "Where can I buy this?"
16 },
17 {
18 "id": "sample-2",
19 "platform": "tiktok",
20 "text": "Do you ship to Canada?"
21 },
22 {
23 "id": "sample-3",
24 "platform": "youtube",
25 "text": "Mine broke after a week."
26 },
27 {
28 "id": "sample-4",
29 "platform": "threads",
30 "text": "Great video!"
31 }
32 ]
33};
34
35
36const run = await client.actor("rorirooo/social-comment-buyer-signal-filter").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46