{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper Pro: Videos & Channels",
    "description": "Fast YouTube scraper for videos, channels, search, playlists, comments, and transcripts. Exact limits, restart recovery, no API key.",
    "version": "0.4",
    "x-build-id": "LFWipmq0Pg4D7XSih"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smart_albatross~youtube-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smart_albatross-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/smart_albatross~youtube-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-smart_albatross-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/smart_albatross~youtube-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-smart_albatross-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": {
          "startUrls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Video, Shorts, live, channel, @handle, playlist, hashtag, or search-result URLs. URLs and search queries can be combined in one run.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Terms to search on YouTube. Each query has its own result limit and error isolation.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "searchResultTypes": {
            "title": "Search result types",
            "type": "array",
            "description": "Kinds of items to return for search queries.",
            "items": {
              "type": "string",
              "enum": [
                "video",
                "short",
                "channel",
                "playlist"
              ],
              "enumTitles": [
                "Videos and live streams",
                "Shorts",
                "Channels",
                "Playlists"
              ]
            },
            "default": [
              "video",
              "short"
            ]
          },
          "maxResultsPerSource": {
            "title": "Maximum results per URL or query",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard limit across every record emitted by one input URL or query, including metadata, comments, notices, and errors.",
            "default": 50
          },
          "maxTotalResults": {
            "title": "Maximum total results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Run-wide hard cap across every source and record type. Prevents accidental unbounded jobs.",
            "default": 1000
          },
          "channelSections": {
            "title": "Channel sections",
            "type": "array",
            "description": "Content tabs to scrape for channel URLs.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "live"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos",
              "shorts",
              "live"
            ]
          },
          "includeChannelRecord": {
            "title": "Include channel metadata record",
            "type": "boolean",
            "description": "Emit a separate channel record before videos from a channel URL.",
            "default": true
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Fetch comments for direct video URLs. Search/channel expansion does not fetch comments unless enrichExpandedVideos is enabled.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Maximum comments per video",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard comment limit for each enriched video.",
            "default": 20
          },
          "commentsSortBy": {
            "title": "Comment order",
            "enum": [
              "TOP_COMMENTS",
              "NEWEST_FIRST"
            ],
            "type": "string",
            "description": "Sort comments by YouTube's top ranking or newest first.",
            "default": "TOP_COMMENTS"
          },
          "includeTranscript": {
            "title": "Include transcript",
            "type": "boolean",
            "description": "Fetch the available YouTube transcript for direct videos and place timestamped segments on the video record.",
            "default": false
          },
          "enrichExpandedVideos": {
            "title": "Enrich search/channel/playlist videos",
            "type": "boolean",
            "description": "Open every expanded video to collect full details and optional comments/transcripts. Slower but richer.",
            "default": false
          },
          "searchSort": {
            "title": "Search sorting",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "Ordering applied to search queries.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "all",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube upload-date filter for search queries.",
            "default": "all"
          },
          "duration": {
            "title": "Video duration",
            "enum": [
              "all",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "YouTube duration filter for search queries.",
            "default": "all"
          },
          "language": {
            "title": "Language",
            "pattern": "^[a-zA-Z]{2,3}([_-][a-zA-Z]{2})?$",
            "type": "string",
            "description": "YouTube interface language used for localized text, e.g. en, es, de, hi.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "pattern": "^[a-zA-Z]{2}$",
            "type": "string",
            "description": "Two-letter region code used for localized results, e.g. US, IN, GB.",
            "default": "US"
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel top-level sources. Lower this when using fragile proxies or large enrichments.",
            "default": 4
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries transient network and YouTube 429/5xx failures with exponential backoff and jitter.",
            "default": 3
          },
          "maxSources": {
            "title": "Maximum URLs and queries in one run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Combined safety limit for start URLs and search queries. Large jobs can be split into multiple Actor runs.",
            "default": 200
          },
          "maxPagesPerSource": {
            "title": "Maximum YouTube pages per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Bounds search, channel, playlist, hashtag, and comment pagination for each URL or query. Prevents repeated continuation pages from running indefinitely.",
            "default": 100
          },
          "maxRequestsPerSource": {
            "title": "Maximum HTTP attempts per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Counts YouTube requests and retries for each URL or query, including enrichment and transcript requests.",
            "default": 500
          },
          "requestTimeoutMs": {
            "title": "HTTP request timeout (milliseconds)",
            "minimum": 1000,
            "maximum": 120000,
            "type": "integer",
            "description": "Timeout for each YouTube HTTP attempt. A timed-out request can be retried up to the configured retry limit.",
            "default": 20000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify or custom proxy. Leave disabled for the cheapest HTTP-first path; enable when your traffic is throttled."
          },
          "debug": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Log parser diagnostics. Inputs, cookies, tokens, and full proxy URLs are never logged.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}