1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "type": "url",
14 "data": "https://example.com",
15 "fileName": "homepage"
16 },
17 {
18 "type": "wifi",
19 "ssid": "Guest-WiFi",
20 "password": "welcome2024",
21 "security": "WPA"
22 },
23 {
24 "type": "vcard",
25 "name": "Jane Doe",
26 "phone": "+33612345678",
27 "email": "jane@example.com",
28 "organization": "Example Inc."
29 },
30 {
31 "type": "ean13",
32 "data": "5901234123457"
33 },
34 {
35 "type": "code128",
36 "data": "SKU-000123"
37 },
38 {
39 "type": "datamatrix",
40 "data": "LOT 2026-10 / SN 4815162342"
41 }
42 ],
43 "format": "png",
44 "foregroundColor": "#000000",
45 "backgroundColor": "#ffffff"
46};
47
48
49const run = await client.actor("actose/qr-barcode-generator").call(input);
50
51
52console.log('Results from dataset');
53console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
54const { items } = await client.dataset(run.defaultDatasetId).listItems();
55items.forEach((item) => {
56 console.dir(item);
57});
58
59