1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "slugs": [
10 "bitcoin",
11 "ethereum",
12 "https://coinmarketcap.com/currencies/solana/",
13 ],
14 "mode": "market",
15 "newsPerCoin": 10,
16 "convert": "USD",
17 "sortBy": "market_cap",
18 "sortType": "desc",
19 "cryptoType": "all",
20 "includeCoinDetail": False,
21 "maxItems": 100,
22 "includeHistory": False,
23 "historyDays": 30,
24}
25
26
27run = client.actor("publicmoney/coinmarketcap-scraper").call(run_input=run_input)
28
29
30print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
31for item in client.dataset(run.default_dataset_id).iterate_items():
32 print(item)
33
34