1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "enableListingSearch": True,
10 "searchKeywords": [
11 "nike air jordan 1",
12 "yeezy boost 350",
13 "new balance 550",
14 ],
15 "searchMaxResults": 10,
16 "searchSort": "newest",
17 "searchFetchFullDetails": False,
18 "enableListingDetails": False,
19 "productIds": [],
20 "enableSellerListings": False,
21 "sellerUsernames": ["nike"],
22 "sellerMaxListings": 30,
23 "enableSellerProfile": False,
24 "enableSoldHistory": False,
25 "soldMaxItems": 30,
26 "enableScrapeByUrl": False,
27 "scrapeUrls": ["https://stockx.com/search?q=nike+air+jordan"],
28 "webhookFormat": "json",
29 "proxyConfiguration": {
30 "useApifyProxy": True,
31 "apifyProxyGroups": ["RESIDENTIAL"],
32 "apifyProxyCountry": "US",
33 },
34}
35
36
37run = client.actor("b2b_leads/stockx-real-time-data-scraper").call(run_input=run_input)
38
39
40print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
41for item in client.dataset(run.default_dataset_id).iterate_items():
42 print(item)
43
44