1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [
10 "https://www.nytimes.com/live/2025/03/21/world/heathrow-airport-power-outage-fire",
11 "https://www.theguardian.com/world/2025/mar/25/swedish-shoppers-boycott-supermarkets-food-prices-rise",
12 "https://www.bbc.com/news/world-europe-60506682",
13 ],
14 "extractorEngine": "newspaper4k",
15 "useHeaderGenerator": True,
16 "headerGeneratorOptions": {},
17 "customHeaders": {},
18 "proxyConfiguration": {
19 "useApifyProxy": True,
20 "apifyProxyGroups": ["RESIDENTIAL"],
21 },
22}
23
24
25run = client.actor("web.harvester/ultimate-articles-extractor").call(run_input=run_input)
26
27
28print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
29for item in client.dataset(run["defaultDatasetId"]).iterate_items():
30 print(item)
31
32