1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "snapshot",
12 "searches": [
13 {
14 "name": "Chanel Classic Flap",
15 "brand": "Chanel",
16 "model": "Classic Flap",
17 "categories": [
18 "bags"
19 ]
20 }
21 ],
22 "country": "FR",
23 "currency": "EUR",
24 "conditions": [
25 "new_with_tags",
26 "never_worn",
27 "very_good",
28 "good",
29 "fair"
30 ],
31 "authenticatedOnly": false,
32 "includeSold": true,
33 "mustExclude": [
34 "inspired",
35 "dupe"
36 ],
37 "maxItemsPerSearch": 30,
38 "maxSoldPerSearch": 20,
39 "dealThresholdPct": 20,
40 "dealBasis": "auto",
41 "minCompsForDeal": 5,
42 "priceDropThresholdPct": 5,
43 "buyerCustomsArea": "EU",
44 "includeItemDetails": false,
45 "proxyConfiguration": {
46 "useApifyProxy": true,
47 "apifyProxyGroups": [
48 "RESIDENTIAL"
49 ],
50 "apifyProxyCountry": "FR"
51 }
52};
53
54
55const run = await client.actor("kondasviktor/vestiaire-collective-monitor").call(input);
56
57
58console.log('Results from dataset');
59console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
60const { items } = await client.dataset(run.defaultDatasetId).listItems();
61items.forEach((item) => {
62 console.dir(item);
63});
64
65