{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Sponsorship Intelligence — Sponsor-Ready Creators",
    "description": "Scores YouTube creators for sponsor-readiness, attaches verified business contacts, detects sponsor history. No charge for records that fail your quality gate. Watchlist mode tracks creator momentum over time.",
    "version": "1.0",
    "x-build-id": "h2oBtvFbcjVKzToyx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~youtube-sponsorship-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-youtube-sponsorship-intelligence",
        "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/ryanclinton~youtube-sponsorship-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-youtube-sponsorship-intelligence",
        "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/ryanclinton~youtube-sponsorship-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-youtube-sponsorship-intelligence",
        "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": "Mode",
            "enum": [
              "channels",
              "videos",
              "watchlist",
              "discover"
            ],
            "type": "string",
            "description": "channels = enrich named creators (primary). videos = drill into a specific video. watchlist = scheduled recurring monitoring on a named creator set. discover = v1.1 stub (returns 'activates in v1.1' record).",
            "default": "channels"
          },
          "channels": {
            "title": "Channels (handles / URLs / channelIds)",
            "type": "array",
            "description": "List of channel handles (@mkbhd), full channel URLs, or channelIds. Mode=channels and mode=watchlist consume this.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "videos": {
            "title": "Video URLs",
            "type": "array",
            "description": "List of YouTube video URLs (https://www.youtube.com/watch?v=...). Only used when mode=videos.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxRecentVideosPerChannel": {
            "title": "Max recent videos per channel",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "How many recent videos to fetch per channel for cadence + sponsorship detection + topic clustering. Higher = richer intelligence but slower run.",
            "default": 30
          },
          "includeCommentsSample": {
            "title": "Sample comments (off by default)",
            "type": "boolean",
            "description": "Sample comments per video for audience language detection. OFF by default — reduces per-channel request load by ~70% and lowers anti-bot risk.",
            "default": false
          },
          "commentsSamplePerVideo": {
            "title": "Comments sampled per video",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Comments to sample per video when includeCommentsSample is on.",
            "default": 100
          },
          "includeTranscripts": {
            "title": "Sample transcripts",
            "type": "boolean",
            "description": "Sample transcripts for the top-engagement videos. Required for sponsorship-timestamp detection. ON by default.",
            "default": true
          },
          "transcriptSamplePerChannel": {
            "title": "Transcripts sampled per channel",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many videos per channel to fetch transcripts for. Higher = better sponsorship detection but slower run.",
            "default": 5
          },
          "enrichChannel": {
            "title": "Enrich channel context on video mode",
            "type": "boolean",
            "description": "When mode=videos, also pull the channel record for each video's parent channel.",
            "default": true
          },
          "profile": {
            "title": "Profile (JOB-named bundle)",
            "enum": [
              "agency-sponsorship-prospecting",
              "competitor-monitoring",
              "niche-discovery",
              "b2b-creator-outreach",
              "raw"
            ],
            "type": "string",
            "description": "Mode bundle. Resolves persona + goal + scoring weights + decision profile defaults.",
            "default": "agency-sponsorship-prospecting"
          },
          "persona": {
            "title": "Persona",
            "enum": [
              "agency",
              "sponsorship-team",
              "b2b-sales",
              "competitive-analyst",
              "generic"
            ],
            "type": "string",
            "description": "Who consumes the output. Shapes escalation routing.",
            "default": "sponsorship-team"
          },
          "goal": {
            "title": "Goal",
            "enum": [
              "sponsorship-fit",
              "new-creator-discovery",
              "competitor-tracking",
              "lead-gen",
              "generic"
            ],
            "type": "string",
            "description": "What the run is for. Tightens scoring weights.",
            "default": "sponsorship-fit"
          },
          "systemMode": {
            "title": "System mode (recurring monitoring)",
            "type": "boolean",
            "description": "One-flag stateful service. Auto-enables watchlist + delta + cohort + batchInsights when on.",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist name (named KV store)",
            "type": "string",
            "description": "When set, opens a named KV store, computes temporalSignals + narrativeDelta + stateTransition cross-run. The recurring-revenue centrepiece.",
            "default": ""
          },
          "referenceRunId": {
            "title": "Reference run ID (diff mode)",
            "type": "string",
            "description": "When set, diffs against this specific prior run instead of the watchlist's most-recent run.",
            "default": ""
          },
          "deltaMode": {
            "title": "Delta mode",
            "type": "boolean",
            "description": "Only emit records with changeFlags != [UNCHANGED]. Auto-on when systemMode is on.",
            "default": false
          },
          "decisionProfileStrictness": {
            "title": "Decision strictness",
            "enum": [
              "high",
              "balanced",
              "aggressive"
            ],
            "type": "string",
            "description": "How strict the readiness gate is. Tightens sponsorshipReadiness tier thresholds.",
            "default": "balanced"
          },
          "minSubscribers": {
            "title": "Quality gate: minimum subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Channels below this subscriber count emit as recordType:skipped with NO PPE charge. This is the trust mechanism.",
            "default": 0
          },
          "minScore": {
            "title": "Quality gate: minimum priorityScore",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Channels with priorityScore below this emit as recordType:skipped with NO PPE charge.",
            "default": 0
          },
          "requireBusinessEmail": {
            "title": "Quality gate: require business email",
            "type": "boolean",
            "description": "Channels without a validated business email emit as recordType:skipped with NO PPE charge.",
            "default": false
          },
          "requireValidatedEmail": {
            "title": "Quality gate: require MX-validated email",
            "type": "boolean",
            "description": "Channels whose business email fails MX validation emit as recordType:skipped with NO PPE charge.",
            "default": false
          },
          "allowSensitiveThemes": {
            "title": "Allow sensitive-theme detection",
            "type": "boolean",
            "description": "Opt-in. When on, populates detectedSensitiveThemes[] with evidence snippets. Off by default.",
            "default": false
          },
          "scorecardTemplate": {
            "title": "Scorecard template",
            "enum": [
              "agency-sponsorship-v1",
              "b2b-creator-saas",
              "pr-outreach",
              "influencer-discovery",
              "custom"
            ],
            "type": "string",
            "description": "Preset scoring weights bundle. Use 'custom' to bypass.",
            "default": "agency-sponsorship-v1"
          },
          "outputProfile": {
            "title": "Output profile (controls which blocks appear)",
            "enum": [
              "minimal",
              "sales",
              "ops",
              "research",
              "llm"
            ],
            "type": "string",
            "description": "sales = 10-field agency-ready record (default). ops = adds agentContract + decisionTrace. research = adds full evidence + provenanceGraph. llm = ops-equivalent. minimal = substrate only.",
            "default": "sales"
          },
          "explainabilityLevel": {
            "title": "Explainability level",
            "enum": [
              "none",
              "compact",
              "full"
            ],
            "type": "string",
            "description": "How much score-derivation detail to include.",
            "default": "compact"
          },
          "enableEconomics": {
            "title": "Enable economics layer",
            "type": "boolean",
            "description": "v1 stubs this. When false, expectedValue + allocationDecision + constraints emit defaults. Reserved for v2.",
            "default": false
          },
          "sdrCostPerTouch": {
            "title": "SDR cost per touch (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Used by the savings block + economics layer when enabled.",
            "default": 3
          },
          "maxOutreachPerRun": {
            "title": "Max outreach budget — channels per run",
            "minimum": 0,
            "type": "integer",
            "description": "Greedy ROI-first allocation cap. 0 = no cap.",
            "default": 0
          },
          "budgetUsd": {
            "title": "Max outreach budget — USD per run",
            "minimum": 0,
            "type": "number",
            "description": "Greedy ROI-first allocation cap in dollars. 0 = no cap.",
            "default": 0
          },
          "outcomeDatasetId": {
            "title": "Outcome dataset ID (calibration)",
            "type": "string",
            "description": "Optional. Apify dataset ID of your prior outreach outcomes (channelId, sentAt, repliedAt, outcome). Calibrates priorityScore against your own reply rates.",
            "default": ""
          },
          "outcomeJoinKey": {
            "title": "Outcome dataset join key",
            "type": "string",
            "description": "Field in outcomeDataset to join on. Default channelId.",
            "default": "channelId"
          },
          "enableIcpInsights": {
            "title": "Surface ICP-vs-top-performer drift",
            "type": "boolean",
            "description": "Adds icpInsights block to the summary record.",
            "default": true
          },
          "enableDedup": {
            "title": "Dedup channels sharing a canonical website",
            "type": "boolean",
            "description": "Off by default. When on, channels resolving to the same external domain collapse to a single record.",
            "default": false
          },
          "circuitBreakerThreshold": {
            "title": "Circuit breaker threshold (consecutive failures)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Halts the run when the most recent N channel completions are all failures. Works the same way in single-channel and parallel runs.",
            "default": 3
          },
          "channelConcurrency": {
            "title": "Channels processed in parallel",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many channels to enrich at the same time. Higher = faster runs on large cohorts (a 50-channel run at concurrency=4 finishes ~4x faster than sequential). Drop to 1 if you hit aggressive bot-blocking. Residential proxy required.",
            "default": 4
          },
          "freshnessDecayAfterDays": {
            "title": "Freshness decay starts after (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Channels not refetched in this window get a freshness penalty.",
            "default": 30
          },
          "freshnessMaxPenalty": {
            "title": "Freshness max penalty (priorityScore points)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum priorityScore points the freshness block can deduct.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is required for YouTube — datacenter IPs are blocked aggressively. Default uses RESIDENTIAL group with US/UK rotation.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}