1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "items": [
10 {
11 "name": "Example site A",
12 "site": {
13 "region": "West Midlands",
14 "lat": 52.4862,
15 "lon": -1.8904,
16 },
17 "start": "2026-11-02",
18 "tags": [
19 "solar",
20 "battery",
21 ],
22 "capacityMw": 12.5,
23 "live": True,
24 "url": "https://example.com/a",
25 },
26 {
27 "name": "Example site B, phase 2",
28 "site": {
29 "region": "East of England",
30 "lat": 52.2053,
31 "lon": 0.1218,
32 },
33 "start": "2027-01-15",
34 "tags": ["wind"],
35 "capacityMw": 40,
36 "live": False,
37 "url": "https://example.com/b",
38 },
39 {
40 "name": "=Example site C",
41 "site": {
42 "region": "London",
43 "lat": 51.5072,
44 "lon": -0.1276,
45 },
46 "start": "2026-12-01T09:30:00Z",
47 "tags": [],
48 "capacityMw": None,
49 "live": True,
50 "url": "https://example.com/c",
51 },
52 ],
53 "targets": [
54 "excel-uk-csv",
55 "sql-postgres",
56 "dataverse",
57 "ics",
58 "geojson",
59 "xlsx",
60 ],
61 "tableName": "sites",
62 "icsMapping": {
63 "summary": "name",
64 "start": "start",
65 "location": "site.region",
66 },
67 "geoMapping": {
68 "lat": "site.lat",
69 "lon": "site.lon",
70 "name": "name",
71 },
72}
73
74
75run = client.actor("landlordtools/dataset-format-converter").call(run_input=run_input)
76
77
78print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
79for item in client.dataset(run.default_dataset_id).iterate_items():
80 print(item)
81
82