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 "searchQueries": [
13 "pokemon cards",
14 "jordan 1"
15 ],
16 "searchUrls": [
17 {
18 "url": "https://www.whatnot.com/search?query=pokemon&searchVertical=PRODUCT"
19 }
20 ],
21 "sellerUsernames": [],
22 "categories": [
23 "Trading Card Games",
24 "Sneakers & Streetwear"
25 ],
26 "vertical": "PRODUCT",
27 "buyingFormat": "",
28 "minPrice": 0,
29 "maxPrice": 0,
30 "sortBy": "NEWEST",
31 "showStatus": "live",
32 "includeListings": true,
33 "includeLivestreams": true,
34 "includeSellers": false,
35 "includeReviews": true,
36 "maxReviews": 50,
37 "includeSubcategories": true,
38 "includeSellerEnrichment": false,
39 "maxSellerEnrichment": 20,
40 "maxItems": 100,
41 "maxResultsPerQuery": 100,
42 "maxConcurrency": 5,
43 "debugLogging": false,
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