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 "resultType": "shows",
13 "queries": [
14 "charizard"
15 ],
16 "urls": [
17 "https://www.whatnot.com/tag/pokemon_cards",
18 "https://www.whatnot.com/user/spacenarwhalz",
19 "https://www.whatnot.com/search?query=charizard",
20 "https://www.whatnot.com/live/29169035-c0ed-494e-a5b6-bcb133286d4c",
21 "https://www.whatnot.com/listing/TGlzdGluZ05vZGU6MjQwNzY2NTg3NA==",
22 "https://www.whatnot.com/user/spacenarwhalz/shop",
23 "https://www.whatnot.com/user/spacenarwhalz/reviews",
24 "https://www.whatnot.com/en-GB/tag/pokemon_cards",
25 "https://www.whatnot.com/category/pokemon_cards",
26 "https://whatnot.com/tag/pokemon_cards"
27 ],
28 "sellers": [],
29 "categoryView": "list",
30 "leaderboardInterval": "CURRENT_WEEK",
31 "categories": [
32 "pokemon_cards"
33 ],
34 "proxy": {
35 "useApifyProxy": true
36 },
37 "incrementalMode": false,
38 "emitUnchanged": false,
39 "emitExpired": false,
40 "ignoreFieldsForChanges": []
41};
42
43
44const run = await client.actor("abotapi/whatnot-scraper").call(input);
45
46
47console.log('Results from dataset');
48console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54