1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "enableKeywordSearch": true,
12 "keywords": "wireless earbuds",
13 "maxSellersPerKeyword": 10,
14 "enableCategoryRankings": false,
15 "category": "",
16 "maxSellersPerCategory": 10,
17 "enableListingUrls": false,
18 "maxSellersPerListing": 10,
19 "enableSellerList": false,
20 "enableProductLinks": false,
21 "maxOffersPerProduct": 10,
22 "country": "US",
23 "maxDepth": 10,
24 "concurrency": 8,
25 "retries": 4,
26 "enableLeadDetails": true,
27 "includeEmailsFromWebsites": false,
28 "proxyConfiguration": {
29 "useApifyProxy": true,
30 "apifyProxyGroups": [
31 "RESIDENTIAL"
32 ],
33 "apifyProxyCountry": "US"
34 }
35};
36
37
38const run = await client.actor("b2b_leads/amazon-sellers-real-time-data-scraper").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48