1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "single",
12 "tool": "fetch_web",
13 "fetchUrl": "https://example.com",
14 "classifyLabels": [
15 "positive",
16 "negative",
17 "neutral"
18 ],
19 "extractStructuredSchema": {
20 "type": "object",
21 "properties": {
22 "title": {
23 "type": "string"
24 },
25 "price": {
26 "type": "number"
27 },
28 "description": {
29 "type": "string"
30 }
31 },
32 "required": [
33 "title"
34 ]
35 },
36 "batchCalls": [
37 {
38 "tool": "fetch_web",
39 "params": {
40 "url": "https://example.com"
41 }
42 }
43 ]
44};
45
46
47const run = await client.actor("tuguidragos/mcp-nexus-universal-ai-tool-bridge").call(input);
48
49
50console.log('Results from dataset');
51console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57