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": "activity",
16 "url_markets": "https://polymarket.com/markets/politics",
17 "profile_id": "0x9f47f1fcb1701bf9eaf31236ad39875e5d60af93",
18 "profile_category": "positions",
19 "activity_only_recent": True,
20 "activity_refresh_rate": 5,
21 "event_page": "",
22 "event_feature_type": "price",
23 "holders_only": False,
24 "sorted_by": "createdAt",
25}
26
27
28run = client.actor("saswave/polymarket-scraper").call(run_input=run_input)
29
30
31print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
32for item in client.dataset(run["defaultDatasetId"]).iterate_items():
33 print(item)
34
35