1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "locations": [
10 "London",
11 "New York",
12 "Tokyo",
13 {
14 "latitude": 48.8566,
15 "longitude": 2.3522,
16 },
17 ],
18 "forecastDays": 7,
19 "includeHourly": False,
20 "includeHistory": False,
21 "units": "metric",
22 "delayBetweenRequests": 500,
23}
24
25
26run = client.actor("second_coming/weather-data-extractor").call(run_input=run_input)
27
28
29print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
30for item in client.dataset(run["defaultDatasetId"]).iterate_items():
31 print(item)
32
33