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 "searchSort": "relevance",
17 "searchCategory": "",
18 "searchCondition": "",
19 "searchLocation": "10001",
20 "searchRadius": "50",
21 "searchFetchFullDetails": False,
22 "enableListingDetails": False,
23 "listingIds": [],
24 "listingUrls": [],
25 "enableSellerListings": False,
26 "sellerIds": [],
27 "sellerMaxListings": 30,
28 "enableSellerProfile": False,
29 "enableSoldHistory": False,
30 "soldMaxItems": 30,
31 "enableScrapeByUrl": False,
32 "scrapeUrls": ["https://offerup.com/search?q=vintage%20carhartt"],
33 "webhookFormat": "json",
34 "proxyConfiguration": {
35 "useApifyProxy": True,
36 "apifyProxyGroups": ["RESIDENTIAL"],
37 "apifyProxyCountry": "US",
38 },
39}
40
41
42run = client.actor("b2b_leads/offerup-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