1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "rows": [
10 {
11 "name": "France",
12 "capital": "Paris",
13 "population": 68200000,
14 "area_km2": 551695,
15 "currency": {
16 "code": "EUR",
17 "name": "Euro",
18 },
19 "tags": [
20 "EU",
21 "G7",
22 ],
23 "checkedAt": "2026-11-20",
24 },
25 {
26 "name": "Japan",
27 "capital": "Tokyo",
28 "population": 123800000,
29 "area_km2": 377975,
30 "currency": {
31 "code": "JPY",
32 "name": "Yen",
33 },
34 "tags": ["G7"],
35 "checkedAt": "2026-11-20",
36 },
37 {
38 "name": "Brazil",
39 "capital": "Brasilia",
40 "population": 216400000,
41 "area_km2": 8515767,
42 "currency": {
43 "code": "BRL",
44 "name": "Real",
45 },
46 "tags": ["BRICS"],
47 "checkedAt": "2026-11-20",
48 },
49 {
50 "name": "Canada",
51 "capital": "Ottawa",
52 "population": 40100000,
53 "area_km2": 9984670,
54 "currency": {
55 "code": "CAD",
56 "name": "Canadian dollar",
57 },
58 "tags": ["G7"],
59 "checkedAt": "2026-11-20",
60 },
61 {
62 "name": "Tunisia",
63 "capital": "Tunis",
64 "population": 12500000,
65 "area_km2": 163610,
66 "currency": {
67 "code": "TND",
68 "name": "Tunisian dinar",
69 },
70 "tags": ["Africa"],
71 "checkedAt": "2026-11-20",
72 },
73 ],
74 "rowsCsv": "",
75 "fileName": "dataset",
76 "nestedFields": "flatten",
77 "rowsPerFile": 250000,
78 "maxRows": 1000000,
79 "s3Bucket": "",
80 "s3Region": "us-east-1",
81 "s3KeyPrefix": "",
82 "s3Endpoint": "",
83 "gcsBucket": "",
84 "gcsKeyPrefix": "",
85}
86
87
88run = client.actor("that_red_bird/dataset-to-parquet").call(run_input=run_input)
89
90
91print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
92for item in client.dataset(run.default_dataset_id).iterate_items():
93 print(item)
94
95