1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "rawDocumentsText": [
12 "INVOICE #INV-2026-1042\nVendor: CloudScale Infrastructure Inc.\nBill To: Acme Analytics Corp.\nDate: 2026-12-01 | Due Date: 2026-12-31 | Currency: USD\n1. Dedicated Bare-Metal GPU Node (Qty: 2, Unit Price: 1250.00, Amount: 2500.00)\n2. Enterprise Object Storage 10TB (Qty: 3, Unit Price: 150.00, Amount: 450.00)\nSubtotal: 2950.00\nSales Tax (8.00%): 236.00\nTotal Due: 3186.00"
13 ]
14};
15
16
17const run = await client.actor("zenonnnnnn/math-verified-invoice-json").call(input);
18
19
20console.log('Results from dataset');
21console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
22const { items } = await client.dataset(run.defaultDatasetId).listItems();
23items.forEach((item) => {
24 console.dir(item);
25});
26
27