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 "categories": [
13 "women/handbags"
14 ],
15 "designers": [],
16 "urls": [
17 "https://www.therealreal.com/shop/women/handbags",
18 "https://www.therealreal.com/designers/chanel/women/handbags"
19 ],
20 "availableOnly": false,
21 "onSaleOnly": false,
22 "vintageOnly": false,
23 "editorsPickOnly": false,
24 "withTagsOnly": false,
25 "fetchDetails": false,
26 "incrementalMode": false,
27 "emitUnchanged": false,
28 "emitExpired": false,
29 "proxy": {
30 "useApifyProxy": true
31 }
32};
33
34
35const run = await client.actor("abotapi/therealreal-scraper").call(input);
36
37
38console.log('Results from dataset');
39console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45