1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "maxResults": 50,
10 "sort": "top-news",
11 "timeSpan": "today",
12 "includeSummaries": True,
13 "agents": False,
14 "analysisAndCommentary": False,
15 "enterpriseAdoption": False,
16 "fundingAndMAndA": False,
17 "governanceAndPolicy": False,
18 "infrastructureAndCompute": False,
19 "models": False,
20 "products": False,
21 "research": False,
22 "safety": False,
23 "tools": False,
24}
25
26
27run = client.actor("coding-doctor-omar/newscrusher-ai-news-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