1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "maxItems": 20,
10 "years": [
11 2026,
12 2025,
13 2024,
14 2023,
15 2022,
16 2021,
17 2020,
18 2019,
19 2018,
20 2017,
21 ],
22 "startUrls": [{ "url": "https://www.cftc.gov/LawRegulation/Enforcement/EnforcementActions/index.htm?year=2025" }],
23 "fromDate": "2024-01-01",
24 "includeDetails": True,
25 "includeOrderLinks": True,
26}
27
28
29run = client.actor("automation-lab/cftc-enforcement-actions-scraper").call(run_input=run_input)
30
31
32print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
33for item in client.dataset(run["defaultDatasetId"]).iterate_items():
34 print(item)
35
36