1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "invoice": {
12 "invoice_number": "INV-2026-0042",
13 "vendor_name": "Acme Cloud Components Ltd.",
14 "vendor_tax_id": "DE123456789",
15 "issue_date": "2026-11-28",
16 "due_date": "2026-12-28",
17 "currency": "USD",
18 "tax_rate": 0.0825,
19 "line_items": [
20 {
21 "description": "Dedicated Compute Node",
22 "quantity": 3,
23 "unit_price": 19.99,
24 "line_total": 59.97
25 },
26 {
27 "description": "Data Transfer Tier",
28 "quantity": 2,
29 "unit_price": 0.15,
30 "line_total": 0.3
31 }
32 ],
33 "subtotal": 60.27,
34 "tax_amount": 4.97,
35 "total": 65.24
36 }
37};
38
39
40const run = await client.actor("snowy_divide_r1t/structured-invoice-line-validator").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50