{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Data Scraper",
    "description": "Extract rich public YouTube video and channel metadata, including descriptions, engagement labels, chapters, thumbnails, captions, availability signals, and bounded related-video cards when exposed.",
    "version": "1.1",
    "x-build-id": "v6tkyrKOGWPZGsbST"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/googleapi~youtube-video-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-googleapi-youtube-video-data-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/googleapi~youtube-video-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-googleapi-youtube-video-data-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/googleapi~youtube-video-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-googleapi-youtube-video-data-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": {
          "sourceMode": {
            "title": "Source mode",
            "enum": [
              "public_watch",
              "youtube_data_api"
            ],
            "type": "string",
            "description": "Default public_watch preserves the original public player/watch-page scraper unchanged (including its access-boundary behavior, which is not retried). youtube_data_api is a separate, default-off adapter backed by the YouTube Data API videos.list (parts snippet, statistics, contentDetails); it requires the protected APIFY_SECRET_YOUTUBE_DATA_API_KEY environment secret (plain YOUTUBE_DATA_API_KEY fallback) and emits zero rows with zero API requests when that credential is absent. The key is never an input field and is never written to the dataset, logs, diagnostics, or Key-Value Store. apify 3.7.2 has no Actor.getSecret().",
            "default": "public_watch"
          },
          "videoUrls": {
            "title": "Video URLs or IDs",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Public HTTPS YouTube watch, Shorts, embed, live, or youtu.be URLs, or 11-character video IDs.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "urls": {
            "title": "Video URL aliases",
            "maxItems": 100,
            "type": "array",
            "description": "Compatibility alias for videoUrls.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "url": {
            "title": "Single video URL or ID",
            "type": "string",
            "description": "One public HTTPS YouTube video URL or 11-character video ID."
          },
          "startUrls": {
            "title": "Start URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Public YouTube video URLs or YouTube search-result URLs. Other hosts and page types are ignored and logged.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "YouTube URL",
                  "type": "string",
                  "description": "A public YouTube video page or search-result page.",
                  "minLength": 1
                }
              },
              "required": [
                "url"
              ],
              "additionalProperties": false
            }
          },
          "query": {
            "title": "Search query",
            "maxLength": 200,
            "type": "string",
            "description": "Fetch one public YouTube search page, then enrich exposed video IDs from their public watch pages."
          },
          "queries": {
            "title": "Search query aliases",
            "maxItems": 20,
            "type": "array",
            "description": "Compatibility alias for running several bounded public search pages.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "maxItems": {
            "title": "Maximum video records",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Global maximum number of valid public video records to emit across all inputs.",
            "default": 10
          },
          "page": {
            "title": "Starting search page",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Fixed at page 1. YouTube continuation pagination is not supported; each query reads its first public search-results page only.",
            "default": 1
          },
          "maxPages": {
            "title": "Maximum search pages per query",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Fixed at one page per query. The Actor does not synthesize continuation tokens or claim multi-page search coverage.",
            "default": 1
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Respectful delay before each public search or watch-page request.",
            "default": 250
          },
          "maxRequestRetries": {
            "title": "Transient request retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum retries after a network failure. Access boundaries are not bypassed.",
            "default": 1
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum wait for one public HTML response.",
            "default": 30
          },
          "maxResponseBytes": {
            "title": "Maximum response size (bytes)",
            "minimum": 100000,
            "maximum": 5000000,
            "type": "integer",
            "description": "Responses larger than this limit are stopped rather than truncated into misleading partial JSON.",
            "default": 5000000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration for public YouTube search-result and watch-page requests. When enabled, each request uses a generated proxy route; proxy use does not bypass access controls.",
            "additionalProperties": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}