1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [
10 { "url": "https://www.bbc.co.uk/news/articles/cmp3gnd1e4gyo" },
11 { "url": "https://www.france24.com/en/europe/20261006-former-german-spy-chief-detained-over-suspected-treasonous-espionage" },
12 { "url": "https://www.dw.com/en/munich-up-against-at-least-six-competitors-for-2036-olympics/a-79566678" },
13 { "url": "https://www.nasa.gov/news-release/nasa-to-cover-northrop-grumman-crs-24-spacecraft-departure/" },
14 { "url": "https://www.gov.uk/government/speeches/economic-secretary-to-the-treasury-speech-for-uk-digital-assets-week" },
15 ],
16 "maxArticles": 5,
17}
18
19
20run = client.actor("jtpalms/news-article-extractor").call(run_input=run_input)
21
22
23print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
24for item in client.dataset(run.default_dataset_id).iterate_items():
25 print(item)
26
27