1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "KEYWORD_SEARCH",
12 "keywords": [
13 "iphone 15 pro max"
14 ],
15 "listingType": "SOLD",
16 "count": 50,
17 "ebaySite": "EBAY_US",
18 "daysToScrape": 30,
19 "sortOrder": "endedRecently",
20 "condition": "ANY",
21 "itemLocation": "DEFAULT",
22 "detailedSearch": false,
23 "includeProductPhotos": true,
24 "includeSellerReviewsFromSearch": false,
25 "profileUrls": [
26 {
27 "url": "https://www.ebay.com/usr/musicmagpie"
28 }
29 ],
30 "includeActiveListings": true,
31 "includeSoldListings": true,
32 "includeRecentFeedback": true,
33 "saveReviewRows": true,
34 "maxReviewRowsPerSeller": 25,
35 "sampleListings": 10,
36 "mustBeTopRated": false,
37 "mustHaveStore": false,
38 "mustBeBusinessSeller": false,
39 "maxConcurrency": 3,
40 "maxRetries": 2,
41 "rawOutput": false,
42 "proxy": {
43 "useApifyProxy": false
44 }
45};
46
47
48const run = await client.actor("trakk/ebay-seller-intelligence").call(input);
49
50
51console.log('Results from dataset');
52console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58