# Ayrshare Post To YouTube

Blocks for uploading videos to YouTube using the Ayrshare social media management API.

## Post To You Tube

### What it is

Post to YouTube using Ayrshare

### How it works

This block uses Ayrshare's API to upload videos to YouTube. It handles video uploads with extensive metadata including titles, descriptions, tags, custom thumbnails, playlist assignment, category selection, and visibility controls (public, private, unlisted).

The block supports YouTube Shorts (up to 3 minutes), geographic targeting to allow or block specific countries, subtitle files (SRT/SBV format), synthetic/AI content disclosure, kids content labeling, and subscriber notification controls. Videos can be scheduled for specific publish times.

### Inputs

| Input                       | Description                                                                                   | Type                                | Required |
| --------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------- | -------- |
| post                        | Video description (max 5,000 chars, empty string allowed). Cannot contain < or > characters.  | str                                 | Yes      |
| media\_urls                 | Required video URL. YouTube only supports 1 video per post.                                   | List\[str]                          | No       |
| is\_video                   | Whether the media is a video                                                                  | bool                                | No       |
| schedule\_date              | UTC datetime for scheduling (YYYY-MM-DDThh:mm:ssZ)                                            | str (date-time)                     | No       |
| disable\_comments           | Whether to disable comments                                                                   | bool                                | No       |
| shorten\_links              | Whether to shorten links                                                                      | bool                                | No       |
| unsplash                    | Unsplash image configuration                                                                  | str                                 | No       |
| requires\_approval          | Whether to enable approval workflow                                                           | bool                                | No       |
| random\_post                | Whether to generate random post text                                                          | bool                                | No       |
| random\_media\_url          | Whether to generate random media                                                              | bool                                | No       |
| notes                       | Additional notes for the post                                                                 | str                                 | No       |
| title                       | Video title (max 100 chars, required). Cannot contain < or > characters.                      | str                                 | Yes      |
| visibility                  | Video visibility: 'private' (default), 'public' , or 'unlisted'                               | "private" \| "public" \| "unlisted" | No       |
| thumbnail                   | Thumbnail URL (JPEG/PNG under 2MB, must end in .png/.jpg/.jpeg). Requires phone verification. | str                                 | No       |
| playlist\_id                | Playlist ID to add video (user must own playlist)                                             | str                                 | No       |
| tags                        | Video tags (min 2 chars each, max 500 chars total)                                            | List\[str]                          | No       |
| made\_for\_kids             | Self-declared kids content                                                                    | bool                                | No       |
| is\_shorts                  | Post as YouTube Short (max 3 minutes, adds #shorts)                                           | bool                                | No       |
| notify\_subscribers         | Send notification to subscribers                                                              | bool                                | No       |
| category\_id                | Video category ID (e.g., 24 = Entertainment)                                                  | int                                 | No       |
| contains\_synthetic\_media  | Disclose realistic AI/synthetic content                                                       | bool                                | No       |
| publish\_at                 | UTC publish time (YouTube controlled, format: 2022-10-08T21:18:36Z)                           | str                                 | No       |
| targeting\_block\_countries | Country codes to block from viewing (e.g., \['US', 'CA'])                                     | List\[str]                          | No       |
| targeting\_allow\_countries | Country codes to allow viewing (e.g., \['GB', 'AU'])                                          | List\[str]                          | No       |
| subtitle\_url               | URL to SRT or SBV subtitle file (must be HTTPS and end in .srt/.sbv, under 100MB)             | str                                 | No       |
| subtitle\_language          | Language code for subtitles (default: 'en')                                                   | str                                 | No       |
| subtitle\_name              | Name of caption track (max 150 chars, default: 'English')                                     | str                                 | No       |

### Outputs

| Output       | Description                           | Type         |
| ------------ | ------------------------------------- | ------------ |
| error        | Error message if the operation failed | str          |
| post\_result | The result of the post                | PostResponse |
| post         | The result of the post                | PostIds      |

### Possible use case

**Video Publishing Pipeline**: Automate video uploads with thumbnails, descriptions, and playlist organization for content creators.

**YouTube Shorts Automation**: Publish short-form vertical videos to YouTube Shorts with proper metadata and hashtags.

**Multi-Region Content**: Upload videos with geographic restrictions for region-specific content licensing or compliance.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://agpt.co/docs/integrations/block-integrations/post_to_youtube.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
