1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "max_results": 5,
10 "activity_filteramount": "1",
11 "proxyConfiguration": {
12 "useApifyProxy": True,
13 "apifyProxyGroups": ["RESIDENTIAL"],
14 },
15 "select_feature": "leaderboard",
16 "url_markets": "https://polymarket.com/markets/politics",
17 "profile_id": "0x9f47f1fcb1701bf9eaf31236ad39875e5d60af93",
18 "profile_category": "positions",
19 "activity_page": True,
20 "activity_only_recent": False,
21 "activity_refresh_rate": 5,
22 "leaderboard_page": True,
23 "leaderboard_rangedate": "30d",
24 "leaderboard_section": "volume&profit",
25 "event_page": "",
26 "event_feature_type": "price",
27 "holders_only": False,
28 "sorted_by": "createdAt",
29}
30
31
32run = client.actor("saswave/polymarket-scraper").call(run_input=run_input)
33
34
35print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
36for item in client.dataset(run["defaultDatasetId"]).iterate_items():
37 print(item)
38
39