{
  "openapi": "3.0.1",
  "info": {
    "title": "Workflow Orchestrator",
    "description": "Chain 11,000+ Apify Actors into automated workflows. Pre-built templates for price comparison, lead generation, SEO analysis. 5x faster with parallel execution, auto-retry on failures. Perfect for AI agents.",
    "version": "3.0",
    "x-build-id": "eTZdV6c4bAB811foR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/the.beast~workflow-orchestrator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-the.beast-workflow-orchestrator",
        "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/the.beast~workflow-orchestrator/runs": {
      "post": {
        "operationId": "runs-sync-the.beast-workflow-orchestrator",
        "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/the.beast~workflow-orchestrator/run-sync": {
      "post": {
        "operationId": "run-sync-the.beast-workflow-orchestrator",
        "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",
        "properties": {
          "prompt": {
            "title": "What do you want to do?",
            "type": "string",
            "description": "Describe your task in plain English. AI will figure out which Actors to use and execute automatically. Example: 'Find 20 AI startups in Austin and extract their contact emails'"
          },
          "openaiApiKey": {
            "title": "AI API Key (OpenRouter)",
            "type": "string",
            "description": "Your OpenRouter API key for AI-powered features. Get one free at openrouter.ai. Supports GPT-4, Claude, Llama, and more."
          },
          "apifyApiToken": {
            "title": "Apify API Token",
            "type": "string",
            "description": "REQUIRED to execute workflows. Your Apify API token to call other Actors. Find it at: console.apify.com/account#/integrations"
          },
          "template": {
            "title": "Or use a template",
            "enum": [
              "",
              "ecommerce-price-comparison",
              "lead-generation-pipeline",
              "real-estate-market-analysis",
              "social-media-monitoring",
              "news-aggregation",
              "seo-competitor-analysis",
              "job-market-research",
              "review-sentiment-analysis"
            ],
            "type": "string",
            "description": "Use a pre-built workflow template instead of AI decomposition.",
            "default": ""
          },
          "workflow": {
            "title": "Or define custom workflow",
            "type": "object",
            "description": "Advanced: Define your own multi-step workflow with specific Actors and configurations."
          },
          "maxBudget": {
            "title": "Max Budget ($)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Maximum amount to spend on this workflow. AI will optimize to stay within budget.",
            "default": 5
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "llm-optimized",
              "markdown",
              "json",
              "raw"
            ],
            "type": "string",
            "description": "How to format the results. 'llm-optimized' is best for AI agents.",
            "default": "llm-optimized"
          },
          "maxConcurrency": {
            "title": "Parallel Execution",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Run up to 10 steps simultaneously. Higher = faster workflows.",
            "default": 3
          },
          "timeout": {
            "title": "Timeout (seconds)",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "Maximum workflow duration. Default: 1 hour.",
            "default": 3600
          },
          "enableRetry": {
            "title": "Auto-Retry on Failure",
            "type": "boolean",
            "description": "Automatically retry failed steps up to 3 times.",
            "default": true
          },
          "dryRun": {
            "title": "Dry Run (Preview Only)",
            "type": "boolean",
            "description": "Show what would be executed without actually running. Great for testing prompts.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}