1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keywordGroups": [
12 {
13 "name": "가습기",
14 "keywords": [
15 "가습기"
16 ]
17 },
18 {
19 "name": "공기청정기",
20 "keywords": [
21 "공기청정기"
22 ]
23 },
24 {
25 "name": "전기요",
26 "keywords": [
27 "전기요",
28 "전기매트"
29 ]
30 }
31 ],
32 "shoppingCategories": [
33 {
34 "name": "Digital & appliances",
35 "id": "50000003"
36 },
37 {
38 "name": "Cosmetics & beauty",
39 "id": "50000002"
40 }
41 ]
42};
43
44
45const run = await client.actor("koreadata-lab/naver-shopping-insight-search-trends").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55