1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "searchTerms": [
13 "chanel bag"
14 ],
15 "brands": [],
16 "categories": [],
17 "occasions": [],
18 "shop": "",
19 "tier": "any",
20 "availability": "any",
21 "sort": "recommended",
22 "urls": [
23 "https://joinswitch.com/product/chanel-matelasse-chain-flap-bag-1731355475",
24 "https://joinswitch.com/collections?search=chanel",
25 "https://joinswitch.com/collections/designer/hermes/handbags"
26 ],
27 "fetchDetails": true,
28 "maxItems": 20,
29 "proxy": {
30 "useApifyProxy": true
31 },
32 "incrementalMode": false,
33 "emitUnchanged": false,
34 "emitExpired": false,
35 "ignoreFieldsForChanges": []
36};
37
38
39const run = await client.actor("abotapi/joinswitch-rental-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49