1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "language": "en",
12 "keywords": [
13 {
14 "id": "001",
15 "text": "how to choose roof panels"
16 },
17 {
18 "id": "002",
19 "text": "best roof panels price"
20 },
21 {
22 "id": "003",
23 "text": "buy roof panels"
24 },
25 {
26 "id": "004",
27 "text": "Acme customer portal"
28 },
29 {
30 "id": "005",
31 "text": "roof panels"
32 },
33 {
34 "id": "006",
35 "text": "how to buy the best roof panels"
36 }
37 ],
38 "brandTerms": [
39 "Acme"
40 ]
41};
42
43
44const run = await client.actor("danielmichalek/search-intent-classifier").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54