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 "tote bag"
14 ],
15 "availability": "available",
16 "listingInputs": [
17 "https://poshmark.com/brand/Madewell",
18 "https://poshmark.com/brand/Madewell-Women",
19 "https://poshmark.com/search?query=tote%20bag&type=listings",
20 "https://poshmark.com/search?query=tote&department=Women&availability=sold_out",
21 "https://poshmark.com/category/Women-Bags",
22 "https://poshmark.com/category/Women",
23 "https://poshmark.com/category/Women-Dresses-Mini?condition=nwt",
24 "https://poshmark.com/closet/poshmark",
25 "https://poshmark.com/brand/Madewell?availability=sold_out&sort_by=added_desc",
26 "https://poshmark.com/brand/Madewell?max_id=2",
27 "https://poshmark.com/listing/Madewell-Cattail-Tiered-Midi-Dress-Red-6acbfd13b552236b28cafa0b",
28 "https://poshmark.com/listing/6acbfd13b552236b28cafa0b"
29 ],
30 "urls": [
31 "https://poshmark.com/brand/Madewell",
32 "https://poshmark.com/brand/Madewell-Women",
33 "https://poshmark.com/search?query=tote%20bag&type=listings",
34 "https://poshmark.com/search?query=tote&department=Women&availability=sold_out",
35 "https://poshmark.com/category/Women-Bags",
36 "https://poshmark.com/category/Women",
37 "https://poshmark.com/category/Women-Dresses-Mini?condition=nwt",
38 "https://poshmark.com/closet/poshmark",
39 "https://poshmark.com/brand/Madewell?availability=sold_out&sort_by=added_desc",
40 "https://poshmark.com/brand/Madewell?max_id=2",
41 "https://poshmark.com/listing/Madewell-Cattail-Tiered-Midi-Dress-Red-6acbfd13b552236b28cafa0b",
42 "https://poshmark.com/listing/6acbfd13b552236b28cafa0b"
43 ],
44 "maxItems": 20,
45 "proxyConfiguration": {
46 "useApifyProxy": true
47 },
48 "incrementalMode": false,
49 "emitUnchanged": false,
50 "emitExpired": false,
51 "ignoreFieldsForChanges": [],
52 "maxNotifyListings": 50
53};
54
55
56const run = await client.actor("abotapi/poshmark-scraper").call(input);
57
58
59console.log('Results from dataset');
60console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
61const { items } = await client.dataset(run.defaultDatasetId).listItems();
62items.forEach((item) => {
63 console.dir(item);
64});
65
66