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 "carhartt detroit jacket",
14 "vintage 90s levis 501",
15 "patagonia fleece"
16 ],
17 "searchMaxResults": 10,
18 "searchSort": "relevance",
19 "searchFetchFullDetails": false,
20 "enableListingDetails": false,
21 "listingIds": [],
22 "listingUrls": [],
23 "enableClosetListings": false,
24 "sellerUsernames": [],
25 "sellerMaxListings": 30,
26 "enableSellerProfile": false,
27 "enableSoldHistory": false,
28 "enableScrapeByUrl": false,
29 "scrapeUrls": [
30 "https://www.vestiairecollective.com/search/?q=vintage%20carhartt"
31 ],
32 "webhookFormat": "json",
33 "country": "US",
34 "proxyConfiguration": {
35 "useApifyProxy": true,
36 "apifyProxyGroups": [
37 "RESIDENTIAL"
38 ],
39 "apifyProxyCountry": "US"
40 }
41};
42
43
44const run = await client.actor("b2b_leads/vestiaire-collective-real-time-data-scraper").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54