1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "invoices": [
12 {
13 "invoice_id": "demo-receipt-001",
14 "raw_text": "ACME Cloud Services Inc.\n123 Innovation Way, Tech City\nINVOICE: INV-2026-9481\nDate: 2026-10-15\n\nDescription Qty Price Total\nCloud Compute Tier A 2 $40.00 $80.00\nManaged Storage 500GB 1 $25.00 $25.00\n\nSubtotal: $105.00\nTax (10%): $10.50\nTotal Due: $115.50\nPayment Method: VISA ending in 4242"
15 }
16 ]
17};
18
19
20const run = await client.actor("n4d.h1dr/invoice-receipt-json-normalizer").call(input);
21
22
23console.log('Results from dataset');
24console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
25const { items } = await client.dataset(run.defaultDatasetId).listItems();
26items.forEach((item) => {
27 console.dir(item);
28});
29
30