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