{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper Pro: Videos, Channels, Comments & Transcripts",
    "description": "Scrape YouTube videos, channels, playlists, shorts, and live streams. Each row ships engagement, transcripts, top comments with replies, chapters, most replayed heatmap, channel stats, related videos, and music credits. 16 regions. Pay per video.",
    "version": "0.1",
    "x-build-id": "eLijmjec12cnBFEdt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapemint~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapemint-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/scrapemint~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapemint-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/scrapemint~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapemint-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "YouTube search queries. Each term runs an independent search. Combine with sortBy, uploadDate, duration, and features filters below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Mix any of: video URL (/watch?v= or youtu.be/), channel URL (/@handle, /channel/UC..., /c/, /user/), playlist URL (/playlist?list=), shorts URL (/shorts/), hashtag URL (/hashtag/), or search results URL (/results?search_query=).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "videoIds": {
            "title": "Direct video IDs",
            "type": "array",
            "description": "11 character YouTube video IDs (e.g. dQw4w9WgXcQ). Fastest input mode. Skip the listing crawl and fetch each video directly.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "channelHandles": {
            "title": "Channel handles",
            "type": "array",
            "description": "Channel handles like @MrBeast or @veritasium. Pulls the channel's video catalog up to maxVideosPerChannel. Combine with dateFrom or dateTo to slice the catalog by upload date.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSearch": {
            "title": "Max videos per search term",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on regular videos returned per search. 0 means everything YouTube exposes (typically up to a few hundred).",
            "default": 50
          },
          "maxShortsPerSearch": {
            "title": "Max shorts per search term",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on shorts returned per search. 0 disables shorts in search results.",
            "default": 0
          },
          "maxStreamsPerSearch": {
            "title": "Max live streams per search term",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on live streams returned per search. 0 disables live results.",
            "default": 0
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on videos pulled per channel handle or channel URL. Older catalogs scroll deep, so this is the safest knob to control cost.",
            "default": 100
          },
          "maxVideosPerPlaylist": {
            "title": "Max videos per playlist",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on videos pulled per playlist URL.",
            "default": 200
          },
          "uploadDate": {
            "title": "Upload date filter",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Restrict search results by recency. Applies to searchTerms only.",
            "default": "any"
          },
          "duration": {
            "title": "Duration filter",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Restrict search results by length. Applies to searchTerms only.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort search results",
            "enum": [
              "relevance",
              "uploadDate",
              "viewCount",
              "rating"
            ],
            "type": "string",
            "description": "Sort order for searchTerms. Default is relevance.",
            "default": "relevance"
          },
          "features": {
            "title": "Feature filters",
            "type": "array",
            "description": "Restrict search to videos with these features. Multiple values stack. Applies to searchTerms only.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "fourK",
                "hd",
                "subtitles",
                "creativeCommons",
                "vr360",
                "hdr",
                "purchased"
              ],
              "enumTitles": [
                "Live now",
                "4K resolution",
                "HD resolution",
                "Has subtitles or CC",
                "Creative Commons license",
                "VR 360",
                "HDR",
                "Purchased"
              ]
            },
            "default": []
          },
          "dateFrom": {
            "title": "Date from (channel + playlist scraping)",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Drops videos uploaded before this date when crawling channels or playlists. Leave blank for no lower bound.",
            "default": ""
          },
          "dateTo": {
            "title": "Date to (channel + playlist scraping)",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD). Drops videos uploaded after this date when crawling channels or playlists. Leave blank for no upper bound.",
            "default": ""
          },
          "extractTranscript": {
            "title": "Download transcript",
            "type": "boolean",
            "description": "Pull the auto generated or human written transcript. Each segment carries start time, duration, and text. Useful for AI summarization, content audits, and SEO research.",
            "default": false
          },
          "transcriptLanguages": {
            "title": "Transcript languages",
            "type": "array",
            "description": "Preferred transcript language codes in priority order (e.g. en, es, de, ja, hi). The first available track is used. Leave default to take whatever YouTube serves first.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "extractTopComments": {
            "title": "Extract top comments",
            "type": "boolean",
            "description": "Pull the top comments thread. Each comment carries author, channel ID, text, like count, reply count, posted time, and pinned or hearted flag.",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on top level comments returned per video. Ignored if extractTopComments is off.",
            "default": 50
          },
          "extractCommentReplies": {
            "title": "Extract comment replies",
            "type": "boolean",
            "description": "Walk into each top level comment and pull the first batch of replies. Adds latency. Off by default.",
            "default": false
          },
          "extractChapters": {
            "title": "Extract chapters",
            "type": "boolean",
            "description": "Pull the chapter timeline if the creator added one (or YouTube auto generated one). Each chapter has title, start time, and thumbnail.",
            "default": true
          },
          "extractRelatedVideos": {
            "title": "Extract related videos",
            "type": "boolean",
            "description": "Pull the up next sidebar (video ID, title, channel, view count). Useful for content recommendation graphs.",
            "default": false
          },
          "extractChannelStats": {
            "title": "Enrich with channel stats",
            "type": "boolean",
            "description": "Resolve subscriber count, total video count, joined date, country, and links for every distinct channel encountered. One extra page hit per channel.",
            "default": true
          },
          "extractMusicAndCredits": {
            "title": "Extract music tracks and credits",
            "type": "boolean",
            "description": "Pull the music tracks panel (song title, artist, album, license) and the credit list (people, locations) if present.",
            "default": false
          },
          "extractMostReplayed": {
            "title": "Extract most replayed heatmap",
            "type": "boolean",
            "description": "Pull the most replayed segment markers (timestamp + intensity 0 to 1). Lets analysts find the highest engagement moments programmatically.",
            "default": false
          },
          "extractStreamUrls": {
            "title": "Extract direct stream URLs",
            "type": "boolean",
            "description": "Capture available video and audio stream URLs and bitrates from the player response. Some streams are signed and time bounded.",
            "default": false
          },
          "extractEndScreens": {
            "title": "Extract end screens and cards",
            "type": "boolean",
            "description": "Pull end screen elements and info cards. Useful for cross promotion analysis on creator networks.",
            "default": false
          },
          "region": {
            "title": "Region (gl)",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "IT",
              "ES",
              "NL",
              "SE",
              "PL",
              "TR",
              "BR",
              "MX",
              "JP",
              "KR",
              "IN",
              "ID"
            ],
            "type": "string",
            "description": "Two letter country code passed as gl. Affects which results YouTube returns and which currency monetary fields show.",
            "default": "US"
          },
          "language": {
            "title": "Interface language (hl)",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "ja",
              "ko",
              "zh",
              "hi",
              "ar",
              "ru",
              "tr",
              "nl",
              "pl",
              "sv"
            ],
            "type": "string",
            "description": "Two letter language code passed as hl. Affects which language YouTube renders metadata in.",
            "default": "en"
          },
          "dedupe": {
            "title": "Deduplicate across runs",
            "type": "boolean",
            "description": "Skip video IDs already pushed in previous runs. Turn off to refresh stale rows.",
            "default": true
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Number of pages processed in parallel. Three to five is safe. Higher values trigger consent walls and rate limits.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy. Datacenter is fine for YouTube at modest volume. Switch to residential if consent or age gates appear.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": []
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}