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 "item_id": "03D906051",
14 "maker": "VAG",
15 "description": "Ignition coil",
16 "origin_price": 0
17 },
18 {
19 "item_id": "620939134R",
20 "maker": "Renault",
21 "description": "Rear bumper absorber",
22 "origin_price": 0
23 },
24 {
25 "item_id": "3D0941295",
26 "maker": "VAG",
27 "description": "Headlight range control",
28 "origin_price": 0
29 },
30 {
31 "item_id": "263203C100",
32 "maker": "Hyundai",
33 "description": "Oil filter",
34 "origin_price": 0
35 },
36 {
37 "item_id": "HU514X",
38 "maker": "MANN",
39 "description": "Oil filter",
40 "origin_price": 0
41 },
42 {
43 "item_id": "WL7322",
44 "maker": "WIX",
45 "description": "Oil filter",
46 "origin_price": 0
47 },
48 {
49 "item_id": "172896",
50 "maker": "FEBI",
51 "description": "Oil filter",
52 "origin_price": 0
53 },
54 {
55 "item_id": "04152YZZA1",
56 "maker": "Toyota",
57 "description": "Oil filter",
58 "origin_price": 0
59 }
60 ],
61 "proxyConfiguration": {
62 "useApifyProxy": true,
63 "apifyProxyGroups": [
64 "RESIDENTIAL"
65 ]
66 }
67};
68
69
70const run = await client.actor("climond/avtopro-es-pt-competitor-price-checker").call(input);
71
72
73console.log('Results from dataset');
74console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
75const { items } = await client.dataset(run.defaultDatasetId).listItems();
76items.forEach((item) => {
77 console.dir(item);
78});
79
80