{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Intelligence AI v1",
    "description": "Analyze Reddit with AI-powered sentiment analysis, viral prediction, crisis detection & brand monitoring. MCP automation integrates Linear, Slack, Notion, Airtable & Sheets for auto-workflows. Works in free demo mode or with Reddit API for real-time data.",
    "version": "0.0",
    "x-build-id": "26WzvEhZQyrFNs3w2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/actor_researcher.48~reddit-intelligence-ai-v1/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-actor_researcher.48-reddit-intelligence-ai-v1",
        "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/actor_researcher.48~reddit-intelligence-ai-v1/runs": {
      "post": {
        "operationId": "runs-sync-actor_researcher.48-reddit-intelligence-ai-v1",
        "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/actor_researcher.48~reddit-intelligence-ai-v1/run-sync": {
      "post": {
        "operationId": "run-sync-actor_researcher.48-reddit-intelligence-ai-v1",
        "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": {
          "subreddits": {
            "title": "Subreddits",
            "maxItems": 10,
            "type": "array",
            "description": "Subreddits to analyze (without r/ prefix, max 10)",
            "default": [
              "artificial"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "Max Posts",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum posts to collect (1-1000)",
            "default": 100
          },
          "includeComments": {
            "title": "Include Comments",
            "type": "boolean",
            "description": "Fetch and analyze comments",
            "default": true
          },
          "redditClientId": {
            "title": "Reddit Client ID (Optional)",
            "type": "string",
            "description": "For 100+ posts/subreddit. Get from: https://www.reddit.com/prefs/apps"
          },
          "redditClientSecret": {
            "title": "Reddit Client Secret (Optional)",
            "type": "string",
            "description": "Your Reddit app secret"
          },
          "redditUsername": {
            "title": "Reddit Username (Optional)",
            "type": "string",
            "description": "Your Reddit username"
          },
          "redditPassword": {
            "title": "Reddit Password (Optional)",
            "type": "string",
            "description": "Your Reddit password"
          },
          "detectControversy": {
            "title": "Detect Controversial Posts",
            "type": "boolean",
            "description": "Find posts with conflicting sentiment",
            "default": true
          },
          "detectBotsEnabled": {
            "title": "Detect Bots",
            "type": "boolean",
            "description": "Identify suspicious bot accounts",
            "default": true
          },
          "enableCrisisDetection": {
            "title": "Crisis Detection",
            "type": "boolean",
            "description": "🚨 Alert on negative sentiment spikes",
            "default": true
          },
          "calculateROIEnabled": {
            "title": "ROI Calculator",
            "type": "boolean",
            "description": "💰 Estimate marketing value",
            "default": true
          },
          "extractUserPersonas": {
            "title": "User Personas",
            "type": "boolean",
            "description": "👥 Identify user types",
            "default": true
          },
          "analyzeInfluenceNetwork": {
            "title": "Influence Network",
            "type": "boolean",
            "description": "🌐 Map key influencers",
            "default": true
          },
          "brandKeywords": {
            "title": "Brand Keywords (Optional)",
            "type": "array",
            "description": "Track mentions of specific brands/products",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "aiProvider": {
            "title": "AI Provider",
            "enum": [
              "none",
              "openai",
              "anthropic",
              "grok"
            ],
            "type": "string",
            "description": "Enhanced insights with AI (optional)",
            "default": "none"
          },
          "openaiApiKey": {
            "title": "OpenAI API Key (Optional)",
            "type": "string",
            "description": "Your OpenAI API key"
          },
          "anthropicApiKey": {
            "title": "Anthropic API Key (Optional)",
            "type": "string",
            "description": "Your Claude API key"
          },
          "grokApiKey": {
            "title": "Grok API Key (Optional)",
            "type": "string",
            "description": "Your Grok API key"
          },
          "mode": {
            "title": "Operation Mode",
            "enum": [
              "analysis",
              "support_intelligence",
              "crisis_detector",
              "content_miner",
              "brand_guardian"
            ],
            "type": "string",
            "description": "Analysis or automation workflow",
            "default": "analysis"
          },
          "linearApiKey": {
            "title": "Linear API Key (Optional)",
            "type": "string",
            "description": "Auto-create support tickets. Get from: https://linear.app/settings/api"
          },
          "slackWebhookUrl": {
            "title": "Slack Webhook URL (Optional)",
            "type": "string",
            "description": "Send alerts to Slack. Get from: https://api.slack.com/messaging/webhooks"
          },
          "notionApiKey": {
            "title": "Notion API Key (Optional)",
            "type": "string",
            "description": "Create knowledge base pages. Get from: https://www.notion.so/my-integrations"
          },
          "notionDatabaseId": {
            "title": "Notion Database ID (Optional)",
            "type": "string",
            "description": "Your target Notion database",
            "default": ""
          },
          "airtableApiKey": {
            "title": "Airtable API Key (Optional)",
            "type": "string",
            "description": "Track data in Airtable. Get from: https://airtable.com/create/tokens"
          },
          "airtableBaseId": {
            "title": "Airtable Base ID (Optional)",
            "type": "string",
            "description": "Your Airtable base",
            "default": ""
          },
          "sortBy": {
            "title": "Sort Posts By",
            "enum": [
              "hot",
              "new",
              "top",
              "rising"
            ],
            "type": "string",
            "description": "Post sorting method",
            "default": "hot"
          },
          "timeFilter": {
            "title": "Time Filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Time range for posts",
            "default": "week"
          },
          "includeNSFW": {
            "title": "Include NSFW Content",
            "type": "boolean",
            "description": "Include NSFW posts",
            "default": false
          },
          "minPostScore": {
            "title": "Minimum Post Score",
            "minimum": 0,
            "type": "integer",
            "description": "Filter posts below this score",
            "default": 0
          },
          "webhookUrl": {
            "title": "Webhook URL (Optional)",
            "type": "string",
            "description": "Send alerts to Discord/Slack webhook",
            "default": ""
          },
          "notifyOnKeywords": {
            "title": "Keyword Alerts (Optional)",
            "type": "array",
            "description": "Get webhook alerts when these keywords appear",
            "default": [],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}