{
  "openapi": "3.0.1",
  "info": {
    "title": "Social Media Content Outlier Finder",
    "description": "Find unusually successful organic content across Instagram, TikTok, YouTube, Reddit, and LinkedIn by comparing each piece against creator- or community-specific median baselines.",
    "version": "1.0",
    "x-build-id": "tz55lXmHe8Atpfgly"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rigelbytes~social-media-content-outlier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rigelbytes-social-media-content-outlier",
        "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/rigelbytes~social-media-content-outlier/runs": {
      "post": {
        "operationId": "runs-sync-rigelbytes-social-media-content-outlier",
        "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/rigelbytes~social-media-content-outlier/run-sync": {
      "post": {
        "operationId": "run-sync-rigelbytes-social-media-content-outlier",
        "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": {
          "urls": {
            "title": "Mixed URLs (auto-detect platform)",
            "type": "array",
            "description": "Optional mixed list of Instagram / TikTok / YouTube / Reddit / LinkedIn URLs. Domains and @handles are auto-routed into the platform sections below. Prefer platform-specific URL fields when you want clearer control.",
            "items": {
              "type": "string"
            }
          },
          "enableYouTube": {
            "title": "Enable YouTube",
            "type": "boolean",
            "description": "Master switch for YouTube. Uses rigelbytes/youtube-channel-scraper for videos and Shorts, then scores outliers vs channel baselines.",
            "default": true
          },
          "youtubeUrls": {
            "title": "YouTube Channel URLs",
            "type": "array",
            "description": "YouTube channel URLs (@handle, /channel/, /c/, or /user/). Merged with any YouTube links from Mixed URLs.",
            "items": {
              "type": "string"
            }
          },
          "enableYouTubeTranscripts": {
            "title": "Enable YouTube Transcript Export",
            "type": "boolean",
            "description": "Fetch transcripts for YouTube outliers only via rigelbytes/youtube-transcript-export (extra cost).",
            "default": false
          },
          "enableYouTubeComments": {
            "title": "Enable YouTube Comment Scraper",
            "type": "boolean",
            "description": "Enrich YouTube outliers via rigelbytes/youtube-comment-scraper (extra cost).",
            "default": false
          },
          "youtubeMaxComments": {
            "title": "Max YouTube Comments (per run budget)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Comment budget when YouTube Comment Scraper is enabled. Keep low for cheap test runs.",
            "default": 20
          },
          "enableInstagram": {
            "title": "Enable Instagram",
            "type": "boolean",
            "description": "Master switch for Instagram analysis. Off by default to keep Apify health checks cheap.",
            "default": false
          },
          "instagramUrls": {
            "title": "Instagram Profile URLs",
            "type": "array",
            "description": "Public Instagram profile URLs. Merged with any Instagram links from Mixed URLs.",
            "items": {
              "type": "string"
            }
          },
          "enableInstagramReels": {
            "title": "Enable Instagram Reel Scraper",
            "type": "boolean",
            "description": "Fetch reels via rigelbytes/instagram-reel-scraper (best for view-based outliers).",
            "default": true
          },
          "enableInstagramPosts": {
            "title": "Enable Instagram Post Scraper",
            "type": "boolean",
            "description": "Fetch feed posts via rigelbytes/instagram-post-scraper.",
            "default": true
          },
          "enableInstagramAnalytics": {
            "title": "Enable Instagram Analytics / Profile Followers",
            "type": "boolean",
            "description": "Fetch follower counts via rigelbytes/instagram-analytics-tool (falls back to engagement tool).",
            "default": true
          },
          "enableInstagramComments": {
            "title": "Enable Instagram Comment Scraper",
            "type": "boolean",
            "description": "Enrich Instagram outliers via rigelbytes/instagram-comment-scraper (extra cost).",
            "default": false
          },
          "instagramMaxComments": {
            "title": "Max Instagram Comments (per post)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Max comments per outlier post when Instagram Comment Scraper is enabled.",
            "default": 20
          },
          "enableTikTok": {
            "title": "Enable TikTok",
            "type": "boolean",
            "description": "Master switch for TikTok analysis via rigelbytes/tiktok-profile-scraper. Off by default for cheap health checks.",
            "default": false
          },
          "tiktokUrls": {
            "title": "TikTok Profile URLs",
            "type": "array",
            "description": "TikTok profile URLs or @handles. Merged with any TikTok links from Mixed URLs.",
            "items": {
              "type": "string"
            }
          },
          "enableTikTokComments": {
            "title": "Enable TikTok Comment Scraper",
            "type": "boolean",
            "description": "Enrich TikTok outliers via rigelbytes/tiktok-comment-scraper (extra cost).",
            "default": false
          },
          "tiktokMaxComments": {
            "title": "Max TikTok Comments (per video)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Max comments per outlier video when TikTok Comment Scraper is enabled.",
            "default": 20
          },
          "enableReddit": {
            "title": "Enable Reddit",
            "type": "boolean",
            "description": "Master switch for Reddit community analysis via rigelbytes/reddit-scraper. Off by default for cheap health checks.",
            "default": false
          },
          "redditUrls": {
            "title": "Reddit Community URLs",
            "type": "array",
            "description": "Subreddit URLs (e.g. https://www.reddit.com/r/marketing). Merged with any Reddit links from Mixed URLs.",
            "items": {
              "type": "string"
            }
          },
          "redditSortBy": {
            "title": "Reddit Sort",
            "enum": [
              "hot",
              "new",
              "top",
              "rising",
              "controversial"
            ],
            "type": "string",
            "description": "How to sort Reddit community posts before scoring.",
            "default": "hot"
          },
          "enableRedditComments": {
            "title": "Enable Reddit Comment Scraper",
            "type": "boolean",
            "description": "Enrich Reddit outliers via rigelbytes/reddit-comment-scraper (extra cost).",
            "default": false
          },
          "redditMaxComments": {
            "title": "Max Reddit Comments (per post)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Max comments per outlier thread when Reddit Comment Scraper is enabled.",
            "default": 20
          },
          "enableRedditProfiles": {
            "title": "Enable Reddit Profile Scraper",
            "type": "boolean",
            "description": "Enrich winning Reddit authors via rigelbytes/reddit-profile-scraper (extra cost).",
            "default": false
          },
          "enableLinkedIn": {
            "title": "Enable LinkedIn",
            "type": "boolean",
            "description": "LinkedIn module interface. V1 emits warnings only — underlying scrapers lack numeric per-post engagement for outlier scoring.",
            "default": false
          },
          "linkedinUrls": {
            "title": "LinkedIn Profile / Company URLs",
            "type": "array",
            "description": "LinkedIn profile or company URLs. Merged with any LinkedIn links from Mixed URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "contentLimitPerSource": {
            "title": "Content Limit Per Source",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum recent content items to fetch per creator/community. Keep low for cheap test runs.",
            "default": 15
          },
          "maxItems": {
            "title": "Max Output Items",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on dataset rows pushed (0 = unlimited). Prefill keeps health-check runs bounded.",
            "default": 50
          },
          "minimumBaselineItems": {
            "title": "Minimum Baseline Items",
            "minimum": 3,
            "maximum": 100,
            "type": "integer",
            "description": "Minimum mature items preferred before outlier scores are considered reliable.",
            "default": 8
          },
          "minimumOutlierScore": {
            "title": "Minimum Outlier Score",
            "minimum": 1,
            "type": "number",
            "description": "Composite outlier score threshold (e.g. 2.0 ≈ 2x baseline).",
            "default": 2
          },
          "includeAllContent": {
            "title": "Include All Content",
            "type": "boolean",
            "description": "If true, push all analyzed content (not only outliers).",
            "default": false
          },
          "aiAnalysis": {
            "title": "AI Creative Analysis",
            "type": "boolean",
            "description": "Run structured creative analysis on qualifying outliers only. Outlier math never depends on AI. With the built-in LLM (default), you get richer topic/hook/angle insights. If no LLM key is available, a fast heuristic analyzer still fills the same fields (see analysisMethod on each row). Heuristic = rule-based from caption/title; LLM = deeper creative read of caption/transcript.",
            "default": false
          },
          "openaiApiKey": {
            "title": "Your LLM API Key (optional)",
            "type": "string",
            "description": "Optional. Leave empty to use the Actor's built-in LLM for AI Creative Analysis (recommended). If you paste your own key, that key is used instead and billed to your account. Never required for scoring."
          },
          "topOutliersPerSource": {
            "title": "Top Outliers Per Source",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum outliers to keep/enrich per creator or community.",
            "default": 5
          },
          "matureContentHours": {
            "title": "Mature Content Age (hours)",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "Content younger than this is marked isMature=false and preferably excluded from baselines.",
            "default": 24
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Passed through to each child Rigel Bytes Actor. Platforms run in parallel; each child run resolves/rotates its own residential proxy sessions.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}