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