{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Uploader - Auto-Publish From Any URL",
    "description": "Publish to your own YouTube channel without opening Studio. Give it a public video URL and it uploads with your title, description, tags, category, custom thumbnail, privacy and a scheduled publish time, then returns the video ID and watch URL. $0.05 per upload plus a start fee.",
    "version": "0.1",
    "x-build-id": "5UIyuak9hQG2JNcl0"
  },
  "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": "Only used by method=browser (the API method connects directly). Apify datacenter addresses are used by default. Metered groups (RESIDENTIAL, GOOGLE_SERP) are not offered here and are swapped for datacenter — an upload pushes the whole video file through the proxy, which those groups bill per gigabyte. If you need a residential exit for a logged-in Google session, put your own proxy servers in 'Proxy URLs' and they will be used exactly as given.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "BUYPROXIES94952"
              ]
            }
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}