1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "single",
10 "tool": "fetch_web",
11 "fetchUrl": "https://example.com",
12 "extractSelectors": [{
13 "name": "title",
14 "css": "h1",
15 }],
16 "extractPatterns": [{
17 "name": "emails",
18 "regex": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}",
19 }],
20 "classifyLabels": [
21 "positive",
22 "negative",
23 "neutral",
24 ],
25 "extractStructuredSchema": {
26 "type": "object",
27 "properties": {
28 "title": { "type": "string" },
29 "price": { "type": "number" },
30 "description": { "type": "string" },
31 },
32 "required": ["title"],
33 },
34 "transformMapping": [{
35 "from": "title",
36 "to": "headline",
37 "op": "copy",
38 }],
39 "batchCalls": [{
40 "tool": "fetch_web",
41 "params": { "url": "https://example.com" },
42 }],
43}
44
45
46run = client.actor("tuguidragos/mcp-nexus-universal-ai-tool-bridge").call(run_input=run_input)
47
48
49print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
50for item in client.dataset(run["defaultDatasetId"]).iterate_items():
51 print(item)
52
53