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