{
  "openapi": "3.0.1",
  "info": {
    "title": "MCP Nexus Universal AI Tool Bridge",
    "description": "Connect AI agents to real data. MCP Nexus runs tools that fetch, extract, summarize, classify and crawl web content with caching, multi LLM support, HMAC webhooks, circuit breakers and full observability in a stateless production ready Apify actor.",
    "version": "2.1",
    "x-build-id": "hJY8quwwSXjnHS7zX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tuguidragos~mcp-nexus-universal-ai-tool-bridge/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tuguidragos-mcp-nexus-universal-ai-tool-bridge",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/tuguidragos~mcp-nexus-universal-ai-tool-bridge/runs": {
      "post": {
        "operationId": "runs-sync-tuguidragos-mcp-nexus-universal-ai-tool-bridge",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/tuguidragos~mcp-nexus-universal-ai-tool-bridge/run-sync": {
      "post": {
        "operationId": "run-sync-tuguidragos-mcp-nexus-universal-ai-tool-bridge",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Execution mode",
            "enum": [
              "single",
              "batch"
            ],
            "type": "string",
            "description": "Run one tool or multiple tools in sequence",
            "default": "single"
          },
          "correlationId": {
            "title": "Tracking ID (optional)",
            "type": "string",
            "description": "Custom ID for tracking this run"
          },
          "tool": {
            "title": "Tool to run",
            "enum": [
              "fetch_web",
              "extract",
              "summarize",
              "classify",
              "transform",
              "crawl_lite",
              "extract_structured",
              "search_web",
              "diff_text"
            ],
            "type": "string",
            "description": "Select which tool you want to execute"
          },
          "fetchUrl": {
            "title": "URL to fetch",
            "type": "string",
            "description": "The webpage URL you want to fetch"
          },
          "fetchHeaders": {
            "title": "Custom headers (optional)",
            "type": "object",
            "description": "HTTP headers as key-value pairs"
          },
          "fetchTimeout": {
            "title": "Request timeout (ms)",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Maximum time to wait for response",
            "default": 15000
          },
          "fetchMaxBytes": {
            "title": "Max download size (bytes)",
            "minimum": 1024,
            "maximum": 52428800,
            "type": "integer",
            "description": "Stop download if exceeds this size",
            "default": 5242880
          },
          "fetchRespectRobots": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Check robots.txt before fetching",
            "default": true
          },
          "fetchStripBoilerplate": {
            "title": "Remove boilerplate content",
            "type": "boolean",
            "description": "Extract main content only (using Readability)",
            "default": true
          },
          "extractSource": {
            "title": "Extract source type",
            "enum": [
              "text",
              "html",
              "url"
            ],
            "type": "string",
            "description": "Where to read content from",
            "default": "url"
          },
          "extractInput": {
            "title": "Extract input",
            "type": "string",
            "description": "Text, HTML, or URL to extract from"
          },
          "extractSelectors": {
            "title": "Selectors",
            "type": "array",
            "description": "List of selectors to pull values from the page"
          },
          "extractPatterns": {
            "title": "Regex patterns",
            "type": "array",
            "description": "List of regex patterns to capture values"
          },
          "summarizeText": {
            "title": "Text to summarize",
            "type": "string",
            "description": "The text content you want to summarize (or use URL to fetch)"
          },
          "summarizeStyle": {
            "title": "Summary style",
            "enum": [
              "concise",
              "detailed",
              "bullet_points",
              "executive"
            ],
            "type": "string",
            "description": "The style of summary to generate",
            "default": "concise"
          },
          "summarizeLanguage": {
            "title": "Output language",
            "type": "string",
            "description": "Language for the summary (default: same as input)"
          },
          "summarizeMaxTokens": {
            "title": "Max tokens for summary",
            "minimum": 100,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound for tokens the model can generate",
            "default": 4000
          },
          "classifyText": {
            "title": "Text to classify",
            "type": "string",
            "description": "The text content you want to classify (or use URL to fetch)"
          },
          "classifyLabels": {
            "title": "Classification labels",
            "type": "array",
            "description": "List of possible classification labels",
            "items": {
              "type": "string"
            }
          },
          "classifyMaxTokens": {
            "title": "Max tokens for classification",
            "minimum": 100,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound for tokens the model can generate",
            "default": 4000
          },
          "extractStructuredSource": {
            "title": "Source type",
            "enum": [
              "text",
              "html",
              "url"
            ],
            "type": "string",
            "description": "Use raw text, HTML, or fetch from URL",
            "default": "url"
          },
          "extractStructuredInput": {
            "title": "Input content",
            "type": "string",
            "description": "Text, HTML, or URL to extract structured data from"
          },
          "extractStructuredSchema": {
            "title": "JSON Schema",
            "type": "object",
            "description": "JSON Schema defining the structure of data to extract"
          },
          "extractStructuredModel": {
            "title": "Override model",
            "type": "string",
            "description": "Optional model override for this call"
          },
          "extractStructuredMaxTokens": {
            "title": "Max tokens for extraction",
            "minimum": 100,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound for tokens the model can generate",
            "default": 4000
          },
          "transformInput": {
            "title": "Input data",
            "type": "object",
            "description": "JSON data to transform"
          },
          "transformMapping": {
            "title": "Mapping rules",
            "type": "array",
            "description": "Array of mapping rules (from/to/op/value)"
          },
          "diffTextA": {
            "title": "First text",
            "type": "string",
            "description": "First text for comparison"
          },
          "diffTextB": {
            "title": "Second text",
            "type": "string",
            "description": "Second text for comparison"
          },
          "diffSemantic": {
            "title": "Semantic diff",
            "type": "boolean",
            "description": "Use sentence-level diff (true) or character-level (false)",
            "default": true
          },
          "crawlStartUrl": {
            "title": "Start URL",
            "type": "string",
            "description": "URL to start crawling from"
          },
          "crawlAdditionalStartUrls": {
            "title": "Additional start URLs",
            "type": "array",
            "description": "Optional extra start URLs",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "crawlMaxDepth": {
            "title": "Maximum depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many links deep to crawl",
            "default": 2
          },
          "crawlMaxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of pages to crawl",
            "default": 50
          },
          "crawlSameDomain": {
            "title": "Stay on same domain",
            "type": "boolean",
            "description": "Only crawl pages on the same domain as start URLs",
            "default": true
          },
          "crawlDelayMs": {
            "title": "Delay between pages (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum delay between page fetches",
            "default": 300
          },
          "crawlIncludePatterns": {
            "title": "Include URL patterns",
            "type": "array",
            "description": "Only crawl URLs matching these patterns (regex or glob)",
            "items": {
              "type": "string"
            }
          },
          "crawlExcludePatterns": {
            "title": "Exclude URL patterns",
            "type": "array",
            "description": "Skip URLs matching these patterns (regex or glob)",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text query sent to Brave Search or SerpAPI"
          },
          "searchSitemapUrl": {
            "title": "Sitemap URL",
            "type": "string",
            "description": "Sitemap XML used for URL discovery"
          },
          "searchRssUrl": {
            "title": "RSS/Atom URL",
            "type": "string",
            "description": "RSS or Atom feed to parse for URLs"
          },
          "searchMaxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of URLs to return (1-50)",
            "default": 20
          },
          "searchProvider": {
            "title": "Search provider",
            "enum": [
              "brave",
              "serpapi"
            ],
            "type": "string",
            "description": "Web search API used for the query",
            "default": "brave"
          },
          "searchApiKeySecret": {
            "title": "Search API key secret",
            "type": "string",
            "description": "Secret name containing the API key for the selected provider"
          },
          "batchDag": {
            "title": "Enable dependencies between tools",
            "type": "boolean",
            "description": "Allow tools to use results from previous tools",
            "default": false
          },
          "batchCalls": {
            "title": "Tool calls configuration",
            "type": "array",
            "description": "List of tools to execute (JSON format)"
          },
          "batchConcurrency": {
            "title": "Number of parallel tools",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many tools can run at the same time",
            "default": 2
          },
          "llmEnabled": {
            "title": "Enable AI features",
            "type": "boolean",
            "description": "Required for summarize, classify, and extract_structured tools",
            "default": false
          },
          "llmProvider": {
            "title": "AI Provider",
            "enum": [
              "openai",
              "anthropic",
              "azure"
            ],
            "type": "string",
            "description": "Choose your AI service provider",
            "default": "openai"
          },
          "llmApiKey": {
            "title": "API Key",
            "type": "string",
            "description": "Your AI provider API key (stored securely)"
          },
          "llmModel": {
            "title": "Model name",
            "type": "string",
            "description": "AI model to use",
            "default": "gpt-4o-mini"
          },
          "llmMaxTokens": {
            "title": "Max tokens per request",
            "minimum": 100,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum tokens to use in each AI call",
            "default": 4000
          },
          "cacheEnabled": {
            "title": "Enable HTTP caching",
            "type": "boolean",
            "description": "Cache responses to avoid duplicate fetches",
            "default": true
          },
          "cacheTtl": {
            "title": "Cache time (seconds)",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "How long to keep cached data",
            "default": 3600
          },
          "dedupeEnabled": {
            "title": "Enable deduplication",
            "type": "boolean",
            "description": "Skip already processed URLs or content",
            "default": false
          },
          "dedupeStrategy": {
            "title": "Detection method",
            "enum": [
              "url",
              "content",
              "hybrid"
            ],
            "type": "string",
            "description": "How to identify duplicates",
            "default": "url"
          },
          "dedupeTtl": {
            "title": "Remember for (seconds)",
            "minimum": 3600,
            "maximum": 604800,
            "type": "integer",
            "description": "How long to remember seen items",
            "default": 86400
          },
          "renderMode": {
            "title": "Browser rendering",
            "enum": [
              "none",
              "minimal",
              "full"
            ],
            "type": "string",
            "description": "Use real browser for JavaScript-heavy pages",
            "default": "none"
          },
          "storeHtml": {
            "title": "Save HTML content",
            "type": "boolean",
            "description": "Store full HTML in key-value store",
            "default": false
          },
          "storeScreenshot": {
            "title": "Save screenshots",
            "type": "boolean",
            "description": "Capture and store page screenshots (requires rendering)",
            "default": false
          },
          "storeText": {
            "title": "Save extracted text",
            "type": "boolean",
            "description": "Store cleaned text content",
            "default": false
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select proxies to be used by your crawler."
          },
          "securityAllowlist": {
            "title": "Allowed domains",
            "type": "array",
            "description": "Only fetch from these domains (leave empty for all)",
            "items": {
              "type": "string"
            }
          },
          "securityDenylist": {
            "title": "Blocked domains",
            "type": "array",
            "description": "Never fetch from these domains",
            "items": {
              "type": "string"
            }
          },
          "securityIgnoreRobots": {
            "title": "Ignore robots.txt for domains",
            "type": "array",
            "description": "Skip robots.txt check for specific domains",
            "items": {
              "type": "string"
            }
          },
          "securityRedactLogs": {
            "title": "Redact sensitive data from logs",
            "type": "boolean",
            "description": "Remove API keys and secrets from log output",
            "default": true
          },
          "budgetMaxDuration": {
            "title": "Max run time (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Stop execution after this time",
            "default": 60
          },
          "budgetMaxCalls": {
            "title": "Max tool calls",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of tool executions"
          },
          "budgetMaxPages": {
            "title": "Max pages to fetch",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit for crawling operations"
          },
          "budgetMaxBytes": {
            "title": "Max download (bytes)",
            "minimum": 1048576,
            "maximum": 104857600,
            "type": "integer",
            "description": "Stop after downloading this much data",
            "default": 5242880
          },
          "budgetMaxTokens": {
            "title": "Max AI tokens total",
            "minimum": 1000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Combined token limit for all AI calls",
            "default": 20000
          },
          "webhookEnabled": {
            "title": "Enable webhook notifications",
            "type": "boolean",
            "description": "Send results to a webhook URL",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST endpoint for results"
          },
          "webhookSecret": {
            "title": "Webhook secret",
            "type": "string",
            "description": "Secret for HMAC signature verification"
          },
          "webhookBatching": {
            "title": "Enable batching",
            "type": "boolean",
            "description": "Group multiple updates in batch mode",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}