1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "lang_langId_3": 4,
12 "lang_langId_4": 4,
13 "lang_langId_5": 4,
14 "lang_countryId_5": 63,
15 "models_typeId_1": 1,
16 "models_langId_1": 4,
17 "models_countryFilterId_1": 63,
18 "models_typeId_2": 1,
19 "models_modelId_2": 5489,
20 "models_langId_2": 4,
21 "models_countryFilterId_2": 63,
22 "models_typeId_3": 1,
23 "models_vehicleId_3": 15659,
24 "models_langId_3": 4,
25 "models_countryFilterId_3": 63,
26 "vehicle_typeId_2": 1,
27 "vehicle_vehicleId_2": 15659,
28 "vehicle_langId_2": 4,
29 "vehicle_countryFilterId_2": 63,
30 "vehicle_typeId_3": 1,
31 "vehicle_modelId_3": 5489,
32 "vehicle_langId_3": 4,
33 "vehicle_countryFilterId_3": 63,
34 "vehicle_engId_4": 22436,
35 "vehicle_langId_4": 4,
36 "vehicle_typeId_5": 1,
37 "vehicle_modelId_5": 5489,
38 "vehicle_langId_5": 4,
39 "vehicle_countryFilterId_5": 63,
40 "vehicle_langId_6": 4,
41 "vehicle_countryFilterId_6": 63,
42 "vehicle_ltnNumber_6": "0588549",
43 "vehicle_langId_7": 4,
44 "vehicle_countryFilterId_7": 63,
45 "vehicle_ltnNumber_7": "0588549",
46 "vehicle_typeId_8": 1,
47 "vehicle_productId_8": 1,
48 "vehicle_vehicleId_8": 15659,
49 "vehicle_langId_8": 4,
50 "vehicle_countryFilterId_8": 63,
51 "parts_typeId_1": 1,
52 "parts_langId_1": 4,
53 "parts_typeId_2": 1,
54 "parts_vehicleId_2": 15659,
55 "parts_langId_2": 4,
56 "parts_typeId_3": 1,
57 "parts_vehicleId_3": 15659,
58 "parts_langId_3": 4,
59 "parts_typeId_4": 1,
60 "parts_vehicleId_4": 15659,
61 "parts_langId_4": 4,
62 "parts_typeId_5": 1,
63 "parts_langId_5": 4,
64 "parts_searchText_5": "VALVE",
65 "parts_langId_6": 4,
66 "parts_langId_8": 4,
67 "parts_langId_9": 4,
68 "parts_langId_10": 4,
69 "parts_typeId_11": 1,
70 "parts_langId_11": 4,
71 "parts_countryFilterId_11": 63,
72 "parts_typeId_12": 1,
73 "parts_langId_12": 4,
74 "parts_countryFilterId_12": 63,
75 "parts_langId_13": 4,
76 "parts_typeId_14": 1,
77 "parts_langId_14": 4,
78 "parts_countryFilterId_14": 63,
79 "parts_typeId_15": 1,
80 "parts_langId_15": 4,
81 "parts_countryFilterId_15": 63,
82 "parts_langId_16": 4,
83 "parts_langId_17": 4,
84 "parts_countryFilterId_17": 63,
85 "parts_typeId_18": 1,
86 "parts_vehicleId_18": 15659,
87 "parts_categoryId_18": 100260,
88 "parts_langId_18": 4,
89 "parts_typeId_19": 1,
90 "parts_vehicleId_19": 15659,
91 "parts_categoryId_19": 100260,
92 "parts_langId_19": 4,
93 "parts_typeId_20": 1,
94 "parts_langId_20": 4,
95 "parts_countryFilterId_20": 63,
96 "parts_typeId_21": 1,
97 "parts_langId_21": 4,
98 "parts_countryFilterId_21": 63,
99 "parts_typeId_22": 1,
100 "parts_langId_22": 4,
101 "parts_countryFilterId_22": 63,
102 "parts_langId_24": 4,
103 "parts_typeId_25": 1,
104 "parts_langId_25": 4,
105 "parts_countryFilterId_25": 63,
106 "parts_langId_26": 4,
107 "parts_langId_29": 4,
108 "parts_langId_30": 4,
109 "parts_langId_31": 4,
110 "parts_langId_32": 4,
111 "parts_langId_33": 4,
112 "parts_articleType_33": "IAMNumber",
113 "parts_typeId_34": 1,
114 "parts_vehicleId_34": 15659,
115 "parts_langId_34": 4,
116 "parts_searchParam_34": "filter",
117 "parts_langId_35": 4,
118 "parts_countryFilterId_35": 63,
119 "parts_typeId_36": 1,
120 "parts_langId_36": 4,
121 "parts_countryFilterId_36": 63,
122 "parts_vehicleId_36": 15659,
123 "parts_langId_38": 4,
124 "parts_countryFilterId_38": 63,
125 "parts_langId_39": 4,
126 "parts_langId_40": 4
127};
128
129
130const run = await client.actor("making-data-meaningful/suzuki-parts-catalog").call(input);
131
132
133console.log('Results from dataset');
134console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
135const { items } = await client.dataset(run.defaultDatasetId).listItems();
136items.forEach((item) => {
137 console.dir(item);
138});
139
140