1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "imageFiles": [
12 "https://github.com/ParseForge/apify-assets/blob/65f2790e17ebc08b3c4ae5ca92cbb43a444c2ab1/watermark-image-api/original.avif?raw=true"
13 ],
14 "watermarkText": "",
15 "fontFamily": "inter",
16 "textColor": "#ffffff",
17 "textOpacity": 90,
18 "textScale": 50,
19 "letterSpacing": 0,
20 "backgroundOpacity": 35,
21 "logoFile": "https://raw.githubusercontent.com/ParseForge/apify-assets/3fb8b140a224231d5c4ffdf30fc22f78c581cf3f/watermark-image-api/react_logo.png",
22 "logoOpacity": 30,
23 "logoScale": 80,
24 "position": "center",
25 "offsetXPercent": 0,
26 "offsetYPercent": 0,
27 "outputFormat": "png"
28};
29
30
31const run = await client.actor("parseforge/watermark-image-api").call(input);
32
33
34console.log('Results from dataset');
35console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41