1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "max_results": 5,
12 "activity_filteramount": "1",
13 "proxyConfiguration": {
14 "useApifyProxy": true,
15 "apifyProxyGroups": [
16 "RESIDENTIAL"
17 ]
18 },
19 "select_feature": "activity",
20 "url_markets": "https://polymarket.com/markets/politics",
21 "profile_id": "0x9f47f1fcb1701bf9eaf31236ad39875e5d60af93",
22 "profile_category": "positions",
23 "activity_only_recent": true,
24 "activity_refresh_rate": 5,
25 "event_page": "",
26 "event_feature_type": "price",
27 "holders_only": false,
28 "sorted_by": "createdAt"
29};
30
31
32const run = await client.actor("saswave/polymarket-scraper").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42