{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Uploader",
    "description": "Upload a video to your YouTube channel from a URL — set title, description, tags, privacy, schedule, and a custom thumbnail. Connects to your own channel via OAuth (your login is never shipped to the cloud). Use it as the publish step of any automated video pipeline, or for scheduled uploads.",
    "version": "0.1",
    "x-build-id": "Dbxhs5tdr0E0YxmtV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~youtube-video-uploader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-youtube-video-uploader",
        "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/dami_studio~youtube-video-uploader/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-youtube-video-uploader",
        "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/dami_studio~youtube-video-uploader/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-youtube-video-uploader",
        "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": {
          "method": {
            "title": "Upload method",
            "enum": [
              "browser",
              "api"
            ],
            "type": "string",
            "description": "api = official Data API with OAuth (default, reliable; needs clientId/secret/refreshToken). browser = automate YouTube Studio with exported login cookies (works locally; cloud runs face Google's session anti-fraud).",
            "default": "api"
          },
          "demoMode": {
            "title": "Demo / sample mode (no real upload)",
            "type": "boolean",
            "description": "Return one clearly-labeled SAMPLE row instead of uploading — a free preview of the output shape, no credentials needed. The Actor also falls back to this automatically when no credentials are supplied. Uncheck (and add credentials) to upload for real.",
            "default": false
          },
          "videoUrl": {
            "title": "Video URL",
            "type": "string",
            "description": "Public direct URL to the video file to upload (.mp4/.mov). You host it (S3/CDN/Apify KV)."
          },
          "title": {
            "title": "Video title",
            "type": "string",
            "description": "YouTube title (max 100 chars)."
          },
          "description": {
            "title": "Description",
            "type": "string",
            "description": "Video description (hashtags appended automatically)."
          },
          "tags": {
            "title": "Tags",
            "type": "array",
            "description": "Up to 30 video tags (used by the API method).",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags appended to the end of the description (e.g. shorts, reddit).",
            "items": {
              "type": "string"
            }
          },
          "privacyStatus": {
            "title": "Privacy / visibility",
            "enum": [
              "public",
              "unlisted",
              "private"
            ],
            "type": "string",
            "description": "public, unlisted, or private.",
            "default": "private"
          },
          "cookies": {
            "title": "YouTube session (cookies) — browser method",
            "type": "string",
            "description": "Your exported YouTube login session: a cookies array OR a Playwright storageState ({cookies,origins}) as JSON. Export with a 'Cookie-Editor'/'Get cookies.txt' extension (for .youtube.com AND .google.com), or `npx playwright codegen --save-storage`. Kept secret."
          },
          "channelId": {
            "title": "Channel ID (optional, browser method)",
            "type": "string",
            "description": "Target channel ID (UC...) if your account has multiple channels."
          },
          "thumbnailUrl": {
            "title": "Custom thumbnail URL",
            "type": "string",
            "description": "Optional public URL to a thumbnail image."
          },
          "madeForKids": {
            "title": "Made for kids",
            "type": "boolean",
            "description": "Declare the video as made for kids (COPPA).",
            "default": false
          },
          "publishAt": {
            "title": "Publish at (schedule, API method)",
            "type": "string",
            "description": "ISO datetime to auto-publish (API method + privacy=private)."
          },
          "categoryId": {
            "title": "Category ID (API method)",
            "type": "string",
            "description": "YouTube category ID. 22 = People & Blogs, 24 = Entertainment, 23 = Comedy, 27 = Education.",
            "default": "22"
          },
          "proxyConfiguration": {
            "title": "Proxy (browser method)",
            "type": "object",
            "description": "RESIDENTIAL strongly recommended for a logged-in Google session (matches your usual country).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "clientId": {
            "title": "Google OAuth Client ID (API method)",
            "type": "string",
            "description": "Only for method=api. From Google Cloud Console."
          },
          "clientSecret": {
            "title": "Google OAuth Client Secret (API method)",
            "type": "string",
            "description": "Only for method=api."
          },
          "refreshToken": {
            "title": "Google OAuth Refresh Token (API method)",
            "type": "string",
            "description": "Only for method=api. Refresh token with the youtube.upload scope."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}