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/shop/jewelry",
19 "https://www.therealreal.com/shop/women/handbags/crossbody-bags",
20 "https://www.therealreal.com/designers/chanel/women/handbags",
21 "https://www.therealreal.com/designers/chanel",
22 "https://www.therealreal.com/shop/women/handbags?page=2",
23 "https://www.therealreal.com/shop/women/handbags?price_from=100&price_to=2000",
24 "https://www.therealreal.com/products/women/handbags/bucket-bags/celine-canvas-plein-soleil-wyo9d",
25 "https://www.therealreal.com/shop?keywords=chanel"
26 ],
27 "availableOnly": false,
28 "onSaleOnly": false,
29 "vintageOnly": false,
30 "editorsPickOnly": false,
31 "withTagsOnly": false,
32 "fetchDetails": false,
33 "proxy": {
34 "useApifyProxy": true
35 },
36 "incrementalMode": false,
37 "emitUnchanged": false,
38 "emitExpired": false,
39 "ignoreFieldsForChanges": []
40};
41
42
43const run = await client.actor("abotapi/therealreal-scraper").call(input);
44
45
46console.log('Results from dataset');
47console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53