1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "country": "US",
12 "enableListingSearch": true,
13 "searchKeywords": [
14 "carhartt detroit jacket",
15 "vintage 90s levis 501",
16 "patagonia fleece"
17 ],
18 "searchMaxResults": 10,
19 "searchFetchFullDetails": false,
20 "searchSort": "relevance",
21 "labelLuxuryBrands": false,
22 "enableListingDetails": false,
23 "listingIds": [],
24 "listingUrls": [],
25 "enableClosetListings": false,
26 "sellerIds": [],
27 "sellerMaxListings": 30,
28 "enableSellerProfile": false,
29 "enableSoldHistory": false,
30 "soldMaxItems": 30,
31 "enableScrapeByUrl": false,
32 "scrapeUrls": [],
33 "maxItems": 0,
34 "webhookFormat": "json",
35 "proxyConfiguration": {
36 "useApifyProxy": true,
37 "apifyProxyGroups": [
38 "RESIDENTIAL"
39 ],
40 "apifyProxyCountry": "US"
41 }
42};
43
44
45const run = await client.actor("b2b_leads/thredup-real-time-data-scraper").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55