1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "searchUrls": [],
13 "searchQueries": [
14 "pokemon cards"
15 ],
16 "sellerUsernames": [],
17 "categories": [],
18 "vertical": "PRODUCT",
19 "buyingFormat": "",
20 "minPrice": 0,
21 "maxPrice": 0,
22 "shipsFrom": "",
23 "minSellerRating": "",
24 "premierShopOnly": false,
25 "gradedOnly": false,
26 "sortBy": "NEWEST",
27 "showStatus": "live",
28 "includeListings": true,
29 "includeLivestreams": true,
30 "includeSellers": false,
31 "includeReviews": false,
32 "maxReviews": 20,
33 "includeShows": false,
34 "maxShows": 10,
35 "includeShop": false,
36 "maxListings": 25,
37 "includeSellerEnrichment": false,
38 "maxSellerEnrichment": 20,
39 "includePriceStats": false,
40 "monitorMode": false,
41 "monitorName": "default",
42 "maxItems": 15,
43 "maxResultsPerQuery": 15,
44 "proxyConfiguration": {
45 "useApifyProxy": true,
46 "apifyProxyGroups": [
47 "RESIDENTIAL"
48 ]
49 }
50};
51
52
53const run = await client.actor("getascraper/whatnot-scraper").call(input);
54
55
56console.log('Results from dataset');
57console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
58const { items } = await client.dataset(run.defaultDatasetId).listItems();
59items.forEach((item) => {
60 console.dir(item);
61});
62
63