1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "country": "US",
10 "enableListingSearch": True,
11 "searchKeywords": [
12 "carhartt detroit jacket",
13 "vintage 90s levis 501",
14 "patagonia fleece",
15 ],
16 "searchMaxResults": 10,
17 "searchSort": "relevance",
18 "searchCondition": "",
19 "searchOnSale": False,
20 "searchFetchFullDetails": False,
21 "enableListingDetails": False,
22 "listingIds": [],
23 "listingUrls": [],
24 "enableClosetListings": False,
25 "sellerUsernames": ["poshmark"],
26 "sellerMaxListings": 30,
27 "enableSellerProfile": False,
28 "enableSoldHistory": False,
29 "soldMaxItems": 30,
30 "enableScrapeByUrl": False,
31 "scrapeUrls": ["https://poshmark.com/search?query=vintage%20carhartt&type=listings"],
32 "webhookFormat": "json",
33 "proxyConfiguration": {
34 "useApifyProxy": True,
35 "apifyProxyGroups": ["RESIDENTIAL"],
36 "apifyProxyCountry": "US",
37 },
38}
39
40
41run = client.actor("b2b_leads/poshmark-real-time-data-scraper").call(run_input=run_input)
42
43
44print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
45for item in client.dataset(run.default_dataset_id).iterate_items():
46 print(item)
47
48