{
  "tool_id": "ad_spend_roas_calculator",
  "slug": "ad-spend-roas-calculator",
  "path": "/ad-spend-roas-calculator/",
  "mode": "url_api",
  "api_usage": "GET https://aibizhub.io/api/ad-spend-roas-calculator/?<params>",
  "sample_input": {
    "tool": "ad_spend_roas_calculator",
    "ad_spend": 5000,
    "revenue_generated": 20000,
    "product_cost": 20,
    "target_profit_margin_percent": 20
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": { "type": "string" },
      "ad_spend": { "type": "number", "description": "Total ad spend in dollars" },
      "revenue_generated": { "type": "number", "description": "Revenue generated from ads in dollars (alternative to conversions + AOV)" },
      "conversions": { "type": "number", "description": "Number of conversions (use with average_order_value)" },
      "average_order_value": { "type": "number", "description": "Average order value in dollars (use with conversions)" },
      "product_cost": { "type": "number", "description": "Product cost / COGS per unit in dollars" },
      "target_profit_margin_percent": { "type": "number", "description": "Target profit margin as a percentage (0-99)" }
    },
    "required": ["tool", "ad_spend", "product_cost"]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "revenue": { "type": "number", "description": "Total revenue in dollars" },
      "actualRoas": { "type": "number", "description": "Actual Return on Ad Spend (revenue / ad spend)" },
      "breakEvenRoas": { "type": "number", "description": "Minimum ROAS to cover COGS" },
      "profitAfterAdSpend": { "type": "number", "description": "Profit after COGS and ad spend in dollars" },
      "profitMarginPercent": { "type": "number", "description": "Net profit margin as a percentage" },
      "targetCpa": { "type": ["number", "null"], "description": "Target cost per acquisition for desired margin in dollars" },
      "roasHealth": { "type": "string", "enum": ["Excellent", "Good", "Caution", "Danger"] },
      "guidance": { "type": "string", "description": "Actionable ROAS optimization guidance" },
      "cogs": { "type": "number", "description": "Total cost of goods sold in dollars" },
      "grossProfit": { "type": "number", "description": "Gross profit before ad spend in dollars" }
    }
  }
}
