1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "data": [
12 {
13 "type": "text",
14 "content": "Hello World!"
15 },
16 {
17 "type": "url",
18 "content": "https://apify.com"
19 },
20 {
21 "type": "email",
22 "email": "contact@apify.com",
23 "subject": "Hello",
24 "body": "I love your platform!"
25 },
26 {
27 "type": "phone",
28 "phone": "+1-555-010-9999"
29 },
30 {
31 "type": "sms",
32 "phone": "+1-555-010-9999",
33 "message": "Check out this link!"
34 },
35 {
36 "type": "wifi",
37 "ssid": "Guest_Network",
38 "password": "guestpassword",
39 "encryption": "WPA"
40 },
41 {
42 "type": "geo",
43 "lat": 50.08804,
44 "lng": 14.42076
45 },
46 {
47 "type": "vcard",
48 "firstName": "Jane",
49 "lastName": "Doe",
50 "email": "jane.doe@example.com",
51 "phone": "+1234567890",
52 "org": "Tech Corp",
53 "title": "Developer",
54 "website": "https://example.com"
55 },
56 {
57 "type": "event",
58 "content": "BEGIN:VEVENT\nSUMMARY:Team Meeting\nDTSTART:20250101T090000Z\nDTEND:20250101T100000Z\nLOCATION:Office\nEND:VEVENT"
59 },
60 {
61 "type": "custom",
62 "custom": "Raw data content here"
63 }
64 ]
65};
66
67
68const run = await client.actor("yasaslive/bulk-qr-generator").call(input);
69
70
71console.log('Results from dataset');
72console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
73const { items } = await client.dataset(run.defaultDatasetId).listItems();
74items.forEach((item) => {
75 console.dir(item);
76});
77
78