1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "enableListingSearch": true,
12 "searchKeywords": [
13 "gucci marmont",
14 "chanel flap bag",
15 "hermes scarf"
16 ],
17 "searchMaxResults": 10,
18 "searchFetchFullDetails": false,
19 "searchSort": "relevance",
20 "enableListingDetails": false,
21 "listingIds": [],
22 "listingUrls": [],
23 "enableClosetListings": false,
24 "sellerUsernames": [],
25 "sellerMaxListings": 30,
26 "enableSellerProfile": false,
27 "enableSoldHistory": false,
28 "soldMaxItems": 30,
29 "enableScrapeByUrl": false,
30 "scrapeUrls": [],
31 "maxItems": 0,
32 "webhookFormat": "json",
33 "proxyConfiguration": {
34 "useApifyProxy": true,
35 "apifyProxyGroups": [
36 "RESIDENTIAL"
37 ],
38 "apifyProxyCountry": "US"
39 }
40};
41
42
43const run = await client.actor("b2b_leads/therealreal-real-time-data-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