{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper Pro – Channels, Videos & Transcripts",
    "description": "Find YouTube channels by keyword with subscribers, total views, country, join date and public contact links, or scrape videos, Shorts, live streams, podcasts, courses, playlists and hashtags with full metadata and optional transcripts in text, SRT or WebVTT.",
    "version": "1.1",
    "x-build-id": "ZtExv0yOqdIqoYzZ4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dz_omar~Youtube-Scraper-Pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dz_omar-Youtube-Scraper-Pro",
        "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/dz_omar~Youtube-Scraper-Pro/runs": {
      "post": {
        "operationId": "runs-sync-dz_omar-Youtube-Scraper-Pro",
        "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/dz_omar~Youtube-Scraper-Pro/run-sync": {
      "post": {
        "operationId": "run-sync-dz_omar-Youtube-Scraper-Pro",
        "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": {
          "searchKeywords": {
            "title": "🔍 Keywords to search on YouTube",
            "maxItems": 500,
            "type": "array",
            "description": "One keyword per line, e.g. `coffee roasting`. Each keyword is searched on YouTube and returns the result type you pick below.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "resultsType": {
            "title": "🎯 Keyword results",
            "enum": [
              "channels",
              "videos",
              "both"
            ],
            "type": "string",
            "description": "👤 **Channel profiles** — one row per channel behind the results, with subscribers, total views, country, join date and public links.\n\n🎬 **Videos** — one row per video, with full metadata (and transcripts, if enabled).\n\n👤🎬 **Videos + their channels** — a video row plus a profile row for the channel that published it.",
            "default": "channels"
          },
          "channelsFrom": {
            "title": "🧭 Look for channels in",
            "enum": [
              "both",
              "videoResults",
              "channelSearch"
            ],
            "type": "string",
            "description": "Which YouTube result pages are read when collecting channel profiles. Reading both goes through more pages and finds more channels per keyword.",
            "default": "both"
          },
          "startUrls": {
            "title": "🔗 YouTube URLs, @handles or #hashtags",
            "type": "array",
            "description": "Any mix of:\n- 📺 Channel: `https://www.youtube.com/@handle`, `/channel/UC…`, or just `@handle` — add `/videos`, `/shorts`, `/streams`, `/playlists`, `/podcasts` or `/courses` to scrape one tab\n- 🎬 Video: `/watch?v=…`, `youtu.be/…`, `/live/…`, `/embed/…`\n- ⚡ Short: `/shorts/…`\n- 📃 Playlist: `/playlist?list=…`\n- #️⃣ Hashtag: `/hashtag/…` or just `#tag`\n- 🔍 Search page: any `/results?search_query=…` URL, including the filters you picked on YouTube",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "includeChannelProfile": {
            "title": "👤 Add a profile row for each channel",
            "type": "boolean",
            "description": "For every channel URL or @handle above, also save one channel profile row. Combine with **Max results per input** = 0 to collect profiles only, with no videos.",
            "default": false
          },
          "channelTabs": {
            "title": "🗂️ Channel tabs to scrape",
            "type": "array",
            "description": "Applies to plain channel URLs and @handles. A URL that already names a tab (`/@handle/shorts`) always scrapes just that tab.",
            "items": {
              "type": "string",
              "enum": [
                "Videos",
                "Shorts",
                "Live",
                "Podcasts",
                "Playlists",
                "Courses"
              ],
              "enumTitles": [
                "🎬 Videos",
                "⚡ Shorts",
                "🔴 Live",
                "🎙️ Podcasts",
                "📃 Playlists",
                "🎓 Courses"
              ]
            },
            "default": [
              "Videos"
            ]
          },
          "sortVideosBy": {
            "title": "↕️ Order channel videos by",
            "enum": [
              "Latest",
              "Popular",
              "Oldest"
            ],
            "type": "string",
            "description": "Which YouTube ordering to follow while reading a channel tab.",
            "default": "Latest"
          },
          "maxResults": {
            "title": "🔢 Max results per input",
            "minimum": 0,
            "type": "integer",
            "description": "Cap for each keyword, each URL and each channel tab on its own. Set 0 to skip videos entirely (useful with channel profiles). Leave empty to keep paging until YouTube runs out of results.",
            "default": 10
          },
          "maxTotalResults": {
            "title": "🧮 Max results for the whole run",
            "minimum": 1,
            "type": "integer",
            "description": "Hard stop for the run once this many rows have been saved, across every keyword and URL. Leave empty for no overall cap."
          },
          "includeTranscript": {
            "title": "📝 Add transcripts to video rows",
            "type": "boolean",
            "description": "Fetch each video's transcript. Channel profile rows are unaffected.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "🌍 Transcript language",
            "pattern": "^[A-Za-z]{2,3}(-[A-Za-z]{2,4})?$",
            "type": "string",
            "description": "2-letter language code (`en`, `es`, `fr`, `ar`, …). When the video has no transcript in that language, YouTube's translation is used if it offers one.",
            "default": "en"
          },
          "transcriptFormat": {
            "title": "📄 Transcript format",
            "enum": [
              "text",
              "srt",
              "vtt"
            ],
            "type": "string",
            "description": "📃 **Plain text** reads well and suits AI/NLP. 🎞️ **SRT** and 🌐 **WebVTT** are subtitle files for video players and HTML5 video. Timestamped segments are included either way.",
            "default": "text"
          },
          "onlyWithTranscript": {
            "title": "✅ Skip videos that have no transcript",
            "type": "boolean",
            "description": "Leave videos without a transcript out of the results instead of saving them with `hasTranscript: false`.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}