1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "bundle": {
9 "schemaVersion": 1,
10 "actorUrl": "https://apify.com/example/demo",
11 "declaredBuild": "demo-1",
12 "contract": {
13 "fields": [
14 {
15 "path": "id",
16 "type": "string",
17 "required": True,
18 "unique": True,
19 },
20 {
21 "path": "views",
22 "type": "number",
23 "required": True,
24 },
25 {
26 "path": "observedAt",
27 "type": "string",
28 "required": True,
29 "timestamp": True,
30 },
31 ],
32 "maxItems": 20,
33 },
34 "sample": [
35 {
36 "id": "fictional-1",
37 "views": 12,
38 "observedAt": "2026-10-01T09:00:00Z",
39 },
40 {
41 "id": "fictional-1",
42 "views": "14",
43 "observedAt": "not-a-date",
44 },
45 ],
46 } }
47
48
49run = client.actor("automatron/check-charlie-output-qa").call(run_input=run_input)
50
51
52print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
53for item in client.dataset(run.default_dataset_id).iterate_items():
54 print(item)
55
56