# YouTube Clip & Shorts Maker: Cut Long Videos into Shorts (`ttechx/youtube-clip-maker`) Actor

Cut MP4 clips from YouTube videos by start and end time, in the original shape or vertical 9:16 (crop or blurred background) for Shorts, Reels and TikTok, at 720p or 1080p. Up to 100 clips per run. Pay per second of clip; failed clips are free.

- **URL**: https://apify.com/ttechx/youtube-clip-maker.md
- **Developed by:** [TTech](https://apify.com/ttechx) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 3 monthly users, 91.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 clip seconds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Clip & Shorts Maker: Cut Long Videos into Shorts

Give a YouTube link with a start and end time, and get back an MP4 clip of just that part.
Clips come in the video's own shape or vertical **9:16** for YouTube Shorts, Instagram Reels and
TikTok, at **720p or 1080p**, with sound (H.264/AAC, plays everywhere).

Built for YouTube automation: turn long videos, podcasts and streams into short clips from
**n8n, Make, Zapier** or your own code. Send up to 100 clips per run, from as many videos as
you like, and get one download link per clip.

### What it does

- Cuts each clip **frame-accurately** at the times you give, to the millisecond if you want.
- Makes vertical **9:16** clips two ways:
  - `crop`: the middle of the frame fills the screen (best for talking heads).
  - `blur`: the whole frame, centered on a blurred copy of itself (nothing is cut off).
- Fetches only the part of the video around each clip, not the whole video, so a clip from a
  3-hour podcast is usually about as quick as one from a 5-minute video.
- Saves every clip in the run's key-value store and gives you a direct link to it.
- Busy or failed calls are retried automatically. A clip that still fails is reported with
  the reason and is **not charged**.
- No proxies or YouTube accounts needed: nothing to set up.

### Input

| Field | Description |
|---|---|
| `clips` | Required. A list of clips, each `{"video", "start", "end"}` or `{"video", "start", "duration"}`. `video` is a YouTube URL (`watch?v=`, `youtu.be/`, Shorts, embed or live links) or an 11-character video id. Times are seconds (`50`, `83.25`) or `HH:MM:SS[.mmm]` (`00:01:23.250`; `MM:SS` works too). Each clip at most 180 seconds; up to 100 clips per run. |
| `resolution` | `720` (default) or `1080`: the short side of the clip. |
| `aspect` | `original` (default) or `9:16` (720x1280 or 1080x1920). |
| `fit` | For `9:16` only: `crop` (default) or `blur`. |

`resolution`, `aspect` and `fit` apply to every clip of the run. For clips in different
shapes, start one run per shape.

Two clips from one video, in the original shape:

```json
{
    "clips": [
        { "video": "https://www.youtube.com/watch?v=Ap8jTCMK3c4", "start": "00:00:50", "end": "00:01:20" },
        { "video": "https://www.youtube.com/watch?v=Ap8jTCMK3c4", "start": 300, "duration": 45 }
    ]
}
```

A vertical 1080p Short with the whole frame on a blurred background:

```json
{
    "clips": [
        { "video": "https://youtu.be/Ap8jTCMK3c4", "start": "00:02:58", "end": "00:03:43" }
    ],
    "resolution": "1080",
    "aspect": "9:16",
    "fit": "blur"
}
```

A clip that ends past the end of the video is cut short at the end. Repeats of the same clip
(same video, start and end) are made once.

### Output

One dataset item per clip:

```json
{
    "videoId": "Ap8jTCMK3c4",
    "videoUrl": "https://www.youtube.com/watch?v=Ap8jTCMK3c4",
    "start": "00:00:50",
    "end": "00:01:20",
    "duration": 30.0,
    "resolution": "720p",
    "aspect": "original",
    "fit": null,
    "status": "OK",
    "clipUrl": "https://api.apify.com/v2/key-value-stores/.../records/Ap8jTCMK3c4_00-00-50_00-01-20_720p.mp4",
    "clipKey": "Ap8jTCMK3c4_00-00-50_00-01-20_720p.mp4",
    "width": 1280,
    "height": 720,
    "sizeBytes": 14085112,
    "error": null
}
```

- `clipUrl` downloads the MP4. The file is in the run's key-value store under `clipKey`
  (`<videoId>_<start>_<end>_<resolution>p.mp4`, with `_9x16` added for vertical clips), and
  stays there as long as Apify keeps the run's storage on your plan.
- `start`, `end` and `duration` describe the clip you got (`end` is cut at the end of the
  video when your clip went past it).
- `resolution` is the size you actually got, by the shorter side. In the original shape it can
  be below what you asked for when the video itself is smaller.
- `fit` is `null` unless the clip is 9:16.
- A clip that could not be made has `"status": "fail"`, `clipUrl: null` and the reason in
  `error`, for example a private video or a start time past the end of the video. Other clips
  of the run are not affected.

**In n8n, Make or Zapier:** run the Actor with the Apify integration, read the run's dataset
items, and pass each `clipUrl` on to your upload or editing step.

### Pricing

You pay per second of clip delivered. Each clip's length is rounded up to the next whole second.
Failed clips are free.

| | Per second | Per minute | Per 1,000 seconds | Per 10,000 seconds |
|---|---|---|---|---|
| 720p | $0.0008 | $0.048 | $0.80 | $8 |
| 1080p | $0.0015 | $0.09 | $1.50 | $15 |

For example, a 30-second 720p clip costs $0.024, and a 60-second vertical 1080p Short $0.09.
There is also a start fee of $0.005 per run (per GB of memory, with a minimum of one, so $0.005
at the default 1024 MB). You pay for the size you actually
get: a clip is charged as 1080p when it came out at 1080p (a delivered short side of 1000 px or
more), so a 1080p request on a video that only goes up to 720p is charged as 720p.

The Actor respects your run's maximum charge setting: it only starts clips that fit in what is
left of it, stops there, and keeps every clip delivered so far. If Apify moves a run to another
server, the run continues where it was: clips already delivered are not made or charged again.

Each clip is charged once it is made, just before it is saved to the run's storage and listed in
the dataset. In the rare case that a charged clip still cannot be saved after several tries, the
run's status message says so: resurrect the run, and it saves the clip without charging again.

The run keeps its progress in `CLIP_STATE` in its key-value store. Do not edit it: a run whose
saved state was changed cannot be resumed.

### Limits

- Each clip at most 180 seconds; up to 100 clips per run.
- Live streams that are still live are not supported. Private, deleted and age-restricted
  videos fail with an error (free).
- **Apify Free plan:** 600 billable clip seconds (10 minutes of 720p clips) per calendar
  month, where each second of a 1080p clip counts as two. Seconds of clips that fail are given back. Paid Apify plans have no
  monthly limit. When the allowance is used up, the clips that do not fit fail with a message
  saying so, free.
- For very large runs, raise the run timeout. The Actor stops cleanly before the timeout and
  keeps everything delivered so far.

### Your responsibility

Only clip videos you have the rights to use: your own, or content you are licensed or
otherwise allowed to repurpose. This Actor is a tool for cutting video; it does not grant any
rights to the videos you clip. You are responsible for how you use the clips and for following
YouTube's Terms of Service and the copyright of the people who made the videos.

### Support

Questions, problems or feature requests: message us on Telegram at
[@ttech_support_official](https://t.me/ttech_support_official), or open an issue in the Issues tab. Include the run's ID.

# Actor input Schema

## `clips` (type: `array`):

One object per clip: video (a YouTube URL or 11-character id), start, and end or duration. Times as seconds (50, 83.25) or HH:MM:SS\[.mmm] (00:01:23.250). Each clip at most 180 seconds; up to 100 clips per run.

## `resolution` (type: `string`):

Short side of the clip: 720 (1280x720, or 720x1280 vertical) or 1080. A video smaller than this keeps its own size in the original shape.

## `aspect` (type: `string`):

The video's own shape, or vertical 9:16 for Shorts, Reels and TikTok.

## `fit` (type: `string`):

Crop: the middle of the frame fills the screen. Blur: the whole frame, on a blurred copy of itself. Ignored for the original shape.

## Actor input object example

```json
{
  "clips": [
    {
      "video": "https://www.youtube.com/watch?v=Ap8jTCMK3c4",
      "start": "00:00:50",
      "end": "00:01:20"
    }
  ],
  "resolution": "720",
  "aspect": "original",
  "fit": "crop"
}
```

# Actor output Schema

## `clips` (type: `string`):

One item per clip: status, MP4 link, size and error, if any.

## `files` (type: `string`):

The clips, keyed by video id, start, end and resolution, such as Ap8jTCMK3c4_00-00-50_00-01-20_720p.mp4.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "clips": [
        {
            "video": "https://www.youtube.com/watch?v=Ap8jTCMK3c4",
            "start": "00:00:50",
            "end": "00:01:20"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ttechx/youtube-clip-maker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "clips": [{
            "video": "https://www.youtube.com/watch?v=Ap8jTCMK3c4",
            "start": "00:00:50",
            "end": "00:01:20",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("ttechx/youtube-clip-maker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "clips": [
    {
      "video": "https://www.youtube.com/watch?v=Ap8jTCMK3c4",
      "start": "00:00:50",
      "end": "00:01:20"
    }
  ]
}' |
apify call ttechx/youtube-clip-maker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ttechx/youtube-clip-maker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HrUlaulwT0xRaUkQw/builds/HNoho6qQ7Y1ILA0Uv/openapi.json
