{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper — Videos, Shorts, Downloads, Comments & Leads",
    "description": "Collect YouTube videos, Shorts, channels, comments and replies, native subtitles, downloadable files, public emails and sponsor evidence. Simple input; no user cookies.",
    "version": "2.0",
    "x-build-id": "wx6qjg0PqkmSCthAY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trakk~youtube-channel-email-sponsor-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trakk-youtube-channel-email-sponsor-leads",
        "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/trakk~youtube-channel-email-sponsor-leads/runs": {
      "post": {
        "operationId": "runs-sync-trakk-youtube-channel-email-sponsor-leads",
        "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/trakk~youtube-channel-email-sponsor-leads/run-sync": {
      "post": {
        "operationId": "run-sync-trakk-youtube-channel-email-sponsor-leads",
        "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": {
          "mode": {
            "title": "🧭 What would you like to collect?",
            "enum": [
              "videos",
              "shorts",
              "live",
              "channels",
              "comments",
              "transcripts",
              "downloads",
              "leads"
            ],
            "type": "string",
            "description": "One dataset, one workflow. Video modes collect public metadata; downloads and native transcripts are separate operations.",
            "default": "videos"
          },
          "targets": {
            "title": "🔗 YouTube URLs, handles or search phrases",
            "maxItems": 1000,
            "type": "array",
            "description": "Video URLs/IDs, @handles, channel URLs/IDs, playlists, or search phrases. Comments, transcripts and downloads accept videos, channels and playlists. Leads accept channels/videos OR phrases in one run. One target per entry.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "📦 Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Global limit on unique saved records across all targets. In comments mode, replies count too. Duplicate and unavailable items do not use a saved-result slot.",
            "default": 20
          },
          "includeChannelDetails": {
            "title": "📺 Include full channel profile",
            "type": "boolean",
            "description": "Adds channel description, public links, country, joined date, audience totals and verification when available. Included in the result price. Used by video, Shorts, live, transcript and download results.",
            "default": true
          },
          "includeSubtitles": {
            "title": "📝 Add native subtitles to video results",
            "type": "boolean",
            "description": "Optional extra operation for videos, Shorts and live recordings. Adds native transcript text, timestamped segments and TXT/SRT/VTT links when YouTube exposes them. No AI-generated transcription.",
            "default": false
          },
          "subtitleLanguage": {
            "title": "🌍 Subtitle language",
            "type": "string",
            "description": "Language code such as en, es or pt-BR; use any to accept the original available track. Used for transcripts and optional subtitles.",
            "default": "en"
          },
          "maxCommentsPerVideo": {
            "title": "💬 Comments per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Comments mode only. Includes replies; maxResults still limits the total run.",
            "default": 100
          },
          "includeReplies": {
            "title": "↳ Include comment replies",
            "type": "boolean",
            "description": "Comments mode only. Follow available reply continuations and preserve parentCommentId.",
            "default": true
          },
          "sortComments": {
            "title": "↕️ Comment order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "Comments mode only; uses YouTube’s public sort menu.",
            "default": "top"
          },
          "downloadType": {
            "title": "📥 File type",
            "enum": [
              "video",
              "audio"
            ],
            "type": "string",
            "description": "Downloads mode only. Downloads public files to this run’s key-value store.",
            "default": "video"
          },
          "maxHeight": {
            "title": "🖼️ Maximum video height",
            "minimum": 144,
            "maximum": 2160,
            "type": "integer",
            "description": "Downloads mode only. Upper resolution bound; the source may expose fewer formats.",
            "default": 720
          },
          "maxFileSizeMb": {
            "title": "💾 Maximum file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Downloads mode only. A strict per-file safety limit. Transfer is also limited by the run spending ceiling.",
            "default": 50
          },
          "leadStrategy": {
            "title": "🤝 Creator discovery",
            "enum": [
              "auto",
              "similar"
            ],
            "type": "string",
            "description": "Creator leads mode only. All existing contact, sponsor, engagement and lead fields remain available.",
            "default": "auto"
          },
          "enrichmentDepth": {
            "title": "⚡ How much detail do you need?",
            "enum": [
              "fast",
              "balanced",
              "deep"
            ],
            "type": "string",
            "description": "Creator leads mode only. Fast reads recent evidence; Balanced adds contact research; Deep expands historical videos and sponsor evidence.",
            "default": "balanced"
          },
          "scrapeType": {
            "title": "🧭 How should we find creators?",
            "type": "string",
            "description": "Choose one discovery workflow. The relevant list below will be used as your starting point.",
            "default": "channelContacts"
          },
          "lookalikeQueriesPerSeed": {
            "title": "🧠 Topic searches per example",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many focused searches to derive from each example channel. More searches reach further from the seed. Leave empty to follow the selected depth."
          },
          "maxChannelsPerQuery": {
            "title": "📌 Candidates per keyword",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum channel candidates collected from each keyword or derived topic before deduplication. Leave empty to follow the selected depth."
          },
          "leadMemoryName": {
            "title": "🧠 Lead memory name",
            "type": "string",
            "description": "Give your search a name, for example my-fitness-outreach, and reuse it on every run that belongs to it. The Actor remembers which creators it has already delivered under that name and skips their video and website enrichment after resolving their channel identity, so you can keep adding keywords without paying twice for the same creator. Leave empty for a one-off run. Note that resurrecting an old run repeats its original input and ignores later edits to the task, so this is the way to extend a search with new keywords."
          },
          "region": {
            "title": "🌍 YouTube search region",
            "type": "string",
            "description": "Country used to localize search results and channel pages.",
            "default": "US"
          },
          "regionFilter": {
            "title": "🎯 How exact should the region be?",
            "type": "string",
            "description": "Localized discovery uses the selected YouTube market but keeps relevant channels from any country. Exclude other countries drops channels that publicly declare a different country and keeps those with no published country (about one in five creators). Strict country match keeps only channels that publicly declare the selected country. A stricter setting examines more creators per saved lead, so large runs take longer.",
            "default": "localized"
          },
          "contactFilter": {
            "title": "🎯 Which creators should be saved?",
            "type": "string",
            "description": "Keep every matching creator, or save only leads with a public contact method. \"Creators with an email\" keeps creators that published an address; while Validate email domains is on, an address whose domain cannot receive mail is rejected too. Rejected creators are replaced from the remaining search results.",
            "default": "contactableOnly"
          },
          "deduplicateEmails": {
            "title": "Keep one creator per primary email",
            "type": "boolean",
            "description": "On keeps the existing behavior: skip creators sharing a primary email already delivered. Off keeps different creator channels even if they share an agency mailbox. Each saved creator is a normal paid result.",
            "default": true
          },
          "minSubscribers": {
            "title": "📈 Minimum subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Creators below this subscriber count are excluded. Use 0 for no minimum.",
            "default": 0
          },
          "maxSubscribers": {
            "title": "📉 Maximum subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Creators above this subscriber count are excluded. Use 0 for no maximum.",
            "default": 0
          },
          "minAverageViews": {
            "title": "👀 Minimum average recent views",
            "minimum": 0,
            "type": "integer",
            "description": "Creators below this average across analyzed recent videos are excluded.",
            "default": 0
          },
          "activeWithinDays": {
            "title": "📅 Uploaded within the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Use 0 to keep creators regardless of their latest upload date.",
            "default": 0
          },
          "minSponsorReadinessScore": {
            "title": "🤝 Minimum Sponsor Readiness Score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep creators scoring at or above this value. Use 0 to disable the filter.",
            "default": 0
          },
          "recentVideosToScan": {
            "title": "🎬 Recent videos to analyze",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Used to discover contacts, calculate activity and views, and identify sponsor signals. Leave empty to follow the selected depth."
          },
          "videoEnrichmentTimeoutSecs": {
            "title": "⏱️ Video analysis budget per creator",
            "minimum": 5,
            "maximum": 90,
            "type": "integer",
            "description": "Maximum total seconds for recent video details and the pinned comment. Partial data is retained. Values above 30 apply on Deep only; lighter depths clamp to 30."
          },
          "scanPinnedComment": {
            "title": "📌 Scan the newest video's pinned comment (legacy)",
            "type": "boolean",
            "description": "Kept for saved tasks and API callers that send true/false. Use pinnedCommentScanning instead."
          },
          "pinnedCommentScanning": {
            "title": "📌 Scan the newest video's pinned comment",
            "type": "string",
            "description": "Creators often park the business address in a pinned comment. \"Follow the selected depth\" is the same as not setting it: Fast leaves it off, Balanced and Deep turn it on.",
            "default": "auto"
          },
          "scanWebsites": {
            "title": "🌐 Scan linked websites (legacy)",
            "type": "boolean",
            "description": "Kept for saved tasks and API callers that send true/false. Use websiteScanning instead."
          },
          "websiteScanning": {
            "title": "🌐 Scan linked websites",
            "type": "string",
            "description": "The business address is usually published on the creator's own site, not on YouTube. \"Follow the selected depth\" is the same as not setting it: Fast leaves it off, Balanced and Deep turn it on.",
            "default": "auto"
          },
          "followSocialProfiles": {
            "title": "📱 Scan public social and link-in-bio pages (legacy)",
            "type": "boolean",
            "description": "Kept for saved tasks and API callers that send true/false. Use socialProfileScanning instead."
          },
          "socialProfileScanning": {
            "title": "📱 Scan public social and link-in-bio pages",
            "type": "string",
            "description": "Linktree, Beacons and public profiles are the other place an address lives. \"Follow the selected depth\" is the same as not setting it: Fast leaves it off, Balanced and Deep turn it on.",
            "default": "auto"
          },
          "validateEmails": {
            "title": "✅ Validate email domains (legacy)",
            "type": "boolean",
            "description": "Kept for saved tasks and API callers that send true/false. Use emailValidation instead."
          },
          "emailValidation": {
            "title": "✅ Validate email domains",
            "type": "string",
            "description": "Checks the domain can receive mail. A domain check, not a mailbox check. \"Follow the selected depth\" is the same as not setting it: Fast leaves it off, Balanced and Deep turn it on.",
            "default": "auto"
          },
          "maxExternalLinks": {
            "title": "🔗 Linked destinations per creator",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum external websites or public profiles inspected for each creator. Leave empty to follow the selected depth."
          },
          "maxWebsitePages": {
            "title": "📄 Pages per linked website",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum relevant pages inspected on each linked website. Leave empty to follow the selected depth."
          },
          "websiteScanTimeoutSecs": {
            "title": "⏱️ Website scan budget per creator",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Maximum total seconds for linked websites and profiles. Contacts found before the deadline are retained. Values above 30 apply on Deep only; lighter depths clamp to 30."
          },
          "maxConcurrency": {
            "title": "⚡ Creators processed in parallel",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Leave empty and the Actor picks a width that suits the depth you chose — 16 for Deep, 10 for Balanced, 8 for Fast. Deep waits on far more lookups per creator, so it benefits most from running wide. Set a number only to override that, for example when a custom proxy is rate-limited."
          },
          "requestsPerMinute": {
            "title": "⏱️ Source requests per minute",
            "minimum": 60,
            "maximum": 3000,
            "type": "integer",
            "description": "How fast the Actor may read from YouTube. Leave empty to follow the selected depth — 1,200 for Balanced and Deep, 900 for Fast. Measured: the source answers 950/minute with the same retry rate it gives 550, and going above that adds nothing. Lower it only if you bring a rate-limited proxy of your own."
          },
          "maxRetries": {
            "title": "🔁 Maximum request attempts",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Attempts allowed for temporary connection errors and retryable responses. Leave empty to follow the selected depth."
          },
          "requestTimeoutSecs": {
            "title": "⌛ Request timeout in seconds",
            "minimum": 10,
            "maximum": 90,
            "type": "integer",
            "description": "Maximum total time allowed for an individual request. Leave empty to follow the selected depth."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Apify datacenter proxy is enabled by default to reduce expensive residential fallback traffic. You can disable or replace it.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}