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 "vintage jeans"
15 ],
16 "searchMaxResults": 10,
17 "searchSort": "newest",
18 "searchOnSale": false,
19 "searchFetchFullDetails": false,
20 "enableListingDetails": false,
21 "listingSlugs": [],
22 "listingUrls": [],
23 "sellerUsernames": [
24 "jes626"
25 ],
26 "enableSellerProfile": false,
27 "enableScrapeByUrl": false,
28 "scrapeUrls": [
29 "https://www.depop.com/search/?q=vintage+levis"
30 ],
31 "scrapeMaxPages": 3,
32 "enableTrending": false,
33 "trendingCategory": "streetwear",
34 "trendingMaxItems": 30,
35 "extractSellerContacts": true,
36 "includeSoldHistory": true,
37 "includeShippingDetails": true,
38 "webhookFormat": "json",
39 "proxyConfiguration": {
40 "useApifyProxy": true,
41 "apifyProxyGroups": [
42 "RESIDENTIAL"
43 ],
44 "apifyProxyCountry": "US"
45 }
46};
47
48
49const run = await client.actor("b2b_leads/depop-real-time-data").call(input);
50
51
52console.log('Results from dataset');
53console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
54const { items } = await client.dataset(run.defaultDatasetId).listItems();
55items.forEach((item) => {
56 console.dir(item);
57});
58
59