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 "cookies": "",
43 "maxConcurrency": 5,
44 "debugLogging": false,
45 "proxyConfiguration": {
46 "useApifyProxy": true,
47 "apifyProxyGroups": [
48 "RESIDENTIAL"
49 ]
50 }
51};
52
53
54const run = await client.actor("getascraper/whatnot-scraper").call(input);
55
56
57console.log('Results from dataset');
58console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64