{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper: Channel, Playlist & Community Data Insights",
    "description": "🎬 YouTube Scraper (youtube-scraper) extracts public video, channel & playlist data—titles, views, likes, tags, thumbnails, publish dates, transcripts & top comments. 🔍 Ideal for SEO, content research, trend tracking & competitor analysis. ⚙️ Fast CSV/JSON exports. 🚀",
    "version": "0.1",
    "x-build-id": "WuKmMxoCFswHrrEnA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-youtube-scraper",
        "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/simpleapi~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-youtube-scraper",
        "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/simpleapi~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-youtube-scraper",
        "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": {
          "targetUrls": {
            "title": "🔗 Channels, Playlists & Video URLs",
            "type": "array",
            "description": "Paste one or more YouTube CHANNEL URLs (https://www.youtube.com/@handle, /channel/UC..., /c/name, /user/name), PLAYLIST URLs (https://www.youtube.com/playlist?list=...), or direct VIDEO/Shorts URLs. Channel and playlist links are automatically expanded (this is the actor's core feature); a plain video/Shorts link is scraped on its own. Accepts the base actor's original 'startUrls' key too.",
            "items": {
              "type": "string"
            }
          },
          "maxChannelVideos": {
            "title": "📺 Max videos per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "When a target is a channel, fetch up to this many long-form videos from its Videos tab (newest first). Use 0 to skip the Videos tab entirely."
          },
          "maxChannelShorts": {
            "title": "🎬 Max Shorts per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "When a target is a channel, also fetch up to this many Shorts from its Shorts tab. Use 0 (default) to skip Shorts and keep the run focused on long-form videos."
          },
          "includeChannelAbout": {
            "title": "ℹ️ Include channel About-tab info",
            "type": "boolean",
            "description": "Enrich every video/Short from a channel with its About-tab data (subscriber & lifetime-view totals, joined date, country, verified badge, banner image, external/social links) and emit one extra 'channelProfile' summary row per channel."
          },
          "maxPlaylistVideos": {
            "title": "📃 Max videos per playlist",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "When a target is a playlist, expand up to this many member videos in their original playlist order (each row gets a 'playlistPosition'). Use 0 for unlimited (expand the whole playlist)."
          },
          "includeCommunityPosts": {
            "title": "🗳️ Include Community tab posts",
            "type": "boolean",
            "description": "For every channel target, additionally scrape its Community tab (text posts, image posts, polls) as separate 'communityPost' rows linked to the channel via 'parentId'. Off by default since it costs an extra request per channel."
          },
          "maxCommunityPostsPerChannel": {
            "title": "💬 Max Community posts per channel",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Cap how many Community-tab posts to collect per channel when 'Include Community tab posts' is on."
          },
          "searchQueries": {
            "title": "🔍 Keyword search queries",
            "type": "array",
            "description": "Enter one or more YouTube search keywords (for example \"Crawlee\", \"fitness workout\") as an alternative to Channel/Playlist URLs above. The actor runs a full scrape for each term. Accepts the base actor's original 'searchTerms' key too.",
            "items": {
              "type": "string"
            }
          },
          "videosPerQuery": {
            "title": "🎞️ Long-form videos per search query",
            "minimum": 0,
            "maximum": 9999,
            "type": "integer",
            "description": "How many regular (non-Shorts, non-live) videos to collect per keyword search. Use 0 to skip long-form videos for keyword search. Accepts the base actor's 'maxVideos' key too."
          },
          "shortsPerQuery": {
            "title": "📱 Shorts per search query",
            "minimum": 0,
            "maximum": 9999,
            "type": "integer",
            "description": "How many YouTube Shorts to collect per keyword search. Use 0 to exclude Shorts. Accepts the base actor's 'maxShorts' key too."
          },
          "streamsPerQuery": {
            "title": "📡 Live streams per search query",
            "minimum": 0,
            "maximum": 9999,
            "type": "integer",
            "description": "How many live/upcoming streams to collect per keyword search. Use 0 to ignore live content. Accepts the base actor's 'maxStreams' key too."
          },
          "fetchTranscripts": {
            "title": "💬 Fetch transcripts / subtitles",
            "type": "boolean",
            "description": "Download subtitles/transcripts when available for every scraped video (search results, direct videos, and channel/playlist-discovered videos). Accepts the base actor's 'downloadSubtitles' key too."
          },
          "storeTranscriptsInKvs": {
            "title": "🗄️ Save transcripts to key-value store",
            "type": "boolean",
            "description": "Store every downloaded transcript in the default key-value store under its own key ('transcript-VIDEO_ID'). Accepts the base actor's 'saveSubtitlesToKvs' key too."
          },
          "transcriptLanguage": {
            "title": "🌐 Transcript language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "pt",
              "it",
              "ru",
              "ja",
              "ko",
              "zh",
              "ar",
              "hi",
              "bn",
              "tr",
              "pl",
              "nl",
              "sv",
              "id",
              "th",
              "vi"
            ],
            "type": "string",
            "description": "Preferred transcript/subtitle language. Accepts the base actor's 'subtitlesLanguage' key too."
          },
          "preferAutoCaptions": {
            "title": "⚙️ Prefer auto-generated captions",
            "type": "boolean",
            "description": "Prefer auto-generated captions over manually uploaded ones to increase language coverage. Accepts the base actor's 'preferAutoGenerated' key too."
          },
          "transcriptFormat": {
            "title": "📄 Transcript format",
            "enum": [
              "srt",
              "text",
              "timestamp"
            ],
            "type": "string",
            "description": "Output shape for transcripts: SRT, plain text, or timestamped JSON. Accepts the base actor's 'subtitlesFormat' key too."
          },
          "resultsSortOrder": {
            "title": "🧮 Keyword search sort order",
            "enum": [
              "",
              "relevance",
              "date",
              "viewCount",
              "rating"
            ],
            "type": "string",
            "description": "Sort keyword-search results by relevance, upload date, view count, or rating. Accepts the base actor's 'sortingOrder' key too."
          },
          "uploadDateFilter": {
            "title": "🕒 Upload date filter",
            "enum": [
              "",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Keep only results uploaded within this window (last hour/today/week/month/year). Accepts the base actor's 'dateFilter' key too."
          },
          "contentTypeFilter": {
            "title": "📂 Content type filter (keyword search)",
            "enum": [
              "",
              "video",
              "channel",
              "playlist",
              "movie"
            ],
            "type": "string",
            "description": "Restrict keyword-search results to a content type. Accepts the base actor's 'videoTypeFilter' key too."
          },
          "videoLengthFilter": {
            "title": "⏱️ Video length filter",
            "enum": [
              "",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Keep only short (<4 min), medium (4-20 min), or long (>20 min) videos. Accepts the base actor's 'lengthFilter' key too."
          },
          "videoIsHD": {
            "title": "📺 HD",
            "type": "boolean",
            "description": "Only include HD videos (720p or higher). Accepts the base actor's original 'isHD' key too."
          },
          "videoHasCC": {
            "title": "📝 Subtitles / CC",
            "type": "boolean",
            "description": "Only include videos with at least one proper closed-caption track. Accepts the base actor's original 'hasCC' key too."
          },
          "videoIsCreativeCommons": {
            "title": "⚖️ Creative Commons",
            "type": "boolean",
            "description": "Only include videos marked Creative Commons licensed. Accepts the base actor's original 'isCreativeCommons' key too."
          },
          "videoIs3D": {
            "title": "🕶️ 3D",
            "type": "boolean",
            "description": "Only include stereoscopic 3D videos. Accepts the base actor's original 'is3D' key too."
          },
          "videoIsLive": {
            "title": "📺 Live only",
            "type": "boolean",
            "description": "Restrict to live or live-style content. Accepts the base actor's original 'isLive' key too."
          },
          "videoIsPurchased": {
            "title": "💳 Purchased content",
            "type": "boolean",
            "description": "Best-effort filter for purchased/paid content (rarely exposed by YouTube). Accepts the base actor's original 'isPurchased' key too."
          },
          "videoIs4K": {
            "title": "🖥️ 4K only",
            "type": "boolean",
            "description": "Only include videos offering a 2160p (4K) stream. Accepts the base actor's original 'is4K' key too."
          },
          "videoIs360": {
            "title": "🌐 360° video",
            "type": "boolean",
            "description": "Only include immersive 360° videos. Accepts the base actor's original 'is360' key too."
          },
          "videoHasLocation": {
            "title": "📍 With location",
            "type": "boolean",
            "description": "Only include videos with explicit location metadata. Accepts the base actor's original 'hasLocation' key too."
          },
          "videoIsHDR": {
            "title": "🌈 HDR only",
            "type": "boolean",
            "description": "Only include High Dynamic Range (HDR) videos. Accepts the base actor's original 'isHDR' key too."
          },
          "videoIsVR180": {
            "title": "🥽 VR180 only",
            "type": "boolean",
            "description": "Only include VR180 content. Accepts the base actor's original 'isVR180' key too."
          },
          "publishedAfterDate": {
            "title": "📆 Published after (date)",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^$",
            "type": "string",
            "description": "Only include videos published after this absolute date (YYYY-MM-DD). Leave empty to include all dates. Accepts the base actor's 'publishedAfter' key too."
          },
          "finalSortField": {
            "title": "📊 Final dataset sort field",
            "enum": [
              "",
              "date",
              "viewCount",
              "likes"
            ],
            "type": "string",
            "description": "After scraping everything (search + channel/playlist expansion), sort the final dataset by date, view count, or likes. Accepts the base actor's 'sortBy' key too."
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy configuration & anti-blocking",
            "type": "object",
            "description": "Starting proxy setup. By default the actor uses no proxy and, if YouTube blocks traffic (channel/playlist/community browse calls included), automatically escalates to Apify datacenter then residential proxy, locking onto residential for the rest of the run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}