1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "pdfUrl": "https://steelindustries.s3.ap-southeast-1.amazonaws.com/price-lists/SteelIndustriesMay2025Catalogue.pdf",
12 "options": {
13 "pages": [
14 13
15 ],
16 "decimalSeparator": ".",
17 "columns": [
18 {
19 "name": "sku",
20 "start": 0.105
21 },
22 {
23 "name": "description",
24 "start": 0.175
25 },
26 {
27 "name": "length_available",
28 "start": 0.35
29 },
30 {
31 "name": "lengths_per_sling",
32 "start": 0.465
33 },
34 {
35 "name": "cut_category",
36 "start": 0.545
37 },
38 {
39 "name": "kina_per_tonne",
40 "start": 0.6
41 },
42 {
43 "name": "price",
44 "start": 0.685
45 },
46 {
47 "name": "kg_per_metre",
48 "start": 0.77
49 },
50 {
51 "name": "metres_per_tonne",
52 "start": 0.85
53 }
54 ]
55 }
56};
57
58
59const run = await client.actor("excited_idea_uwl/catalogtrace-pdf-rows").call(input);
60
61
62console.log('Results from dataset');
63console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
64const { items } = await client.dataset(run.defaultDatasetId).listItems();
65items.forEach((item) => {
66 console.dir(item);
67});
68
69