1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "propertyScope": "demo-property-opaque",
10 "exportScope": "daily-purchase-and-paid-order-exports",
11 "purchaseValueBasis": "merchandise net of discounts; excludes tax and shipping",
12 "orderValueBasis": "merchandise net of discounts; excludes tax and shipping",
13 "tolerance": "0.01",
14 "window": {
15 "start": "2026-09-30T00:00:00Z",
16 "end": "2026-10-01T00:00:00Z",
17 "timezone": "Z",
18 },
19 "purchaseCoverage": "complete",
20 "orderCoverage": "complete",
21 "purchases": { "rows": [
22 {
23 "rowId": "00001",
24 "transactionId": "00001",
25 "timestamp": "2026-09-30T12:00:00Z",
26 "currency": "USD",
27 "value": "10.000000",
28 },
29 {
30 "rowId": "00002",
31 "transactionId": "00002",
32 "timestamp": "2026-09-30T12:00:00Z",
33 "currency": "USD",
34 "value": "15.20",
35 },
36 {
37 "rowId": "event-only",
38 "transactionId": "event-only",
39 "timestamp": "2026-09-30T12:00:00Z",
40 "currency": "USD",
41 "value": "4.00",
42 },
43 {
44 "rowId": "duplicate",
45 "transactionId": "duplicate",
46 "timestamp": "2026-09-30T12:00:00Z",
47 "currency": "USD",
48 "value": "12.00",
49 },
50 {
51 "rowId": "duplicate",
52 "transactionId": "duplicate",
53 "timestamp": "2026-09-30T12:00:00Z",
54 "currency": "USD",
55 "value": "12.00",
56 },
57 {
58 "rowId": "currency",
59 "transactionId": "currency",
60 "timestamp": "2026-09-30T12:00:00Z",
61 "currency": "EUR",
62 "value": "9.00",
63 },
64 {
65 "rowId": "missing-id-row",
66 "transactionId": None,
67 "timestamp": "2026-09-30T12:00:00Z",
68 "currency": "USD",
69 "value": "8.00",
70 },
71 {
72 "rowId": "old",
73 "transactionId": "old",
74 "timestamp": "2026-09-29T12:00:00Z",
75 "currency": "USD",
76 "value": "6.00",
77 },
78 ] },
79 "orders": { "rows": [
80 {
81 "rowId": "00001",
82 "transactionId": "00001",
83 "timestamp": "2026-09-30T12:00:00Z",
84 "currency": "USD",
85 "value": "10.01",
86 },
87 {
88 "rowId": "00002",
89 "transactionId": "00002",
90 "timestamp": "2026-09-30T12:00:00Z",
91 "currency": "USD",
92 "value": "15.00",
93 },
94 {
95 "rowId": "order-only",
96 "transactionId": "order-only",
97 "timestamp": "2026-09-30T12:00:00Z",
98 "currency": "USD",
99 "value": "2.00",
100 },
101 {
102 "rowId": "duplicate",
103 "transactionId": "duplicate",
104 "timestamp": "2026-09-30T12:00:00Z",
105 "currency": "USD",
106 "value": "12.00",
107 },
108 {
109 "rowId": "currency",
110 "transactionId": "currency",
111 "timestamp": "2026-09-30T12:00:00Z",
112 "currency": "USD",
113 "value": "9.00",
114 },
115 ] },
116}
117
118
119run = client.actor("h_murdock/ga4-order-reconciliation").call(run_input=run_input)
120
121
122print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
123for item in client.dataset(run.default_dataset_id).iterate_items():
124 print(item)
125
126