{
  "openapi": "3.0.1",
  "info": {
    "title": "Merge Videos: Concatenate, Join & Combine Video Clips",
    "description": "Merge video clips from direct URLs into one MP4, in the order you list them. Re-encodes to a common size and frame rate, optional crossfade (0-2 s), loudness normalising and background music. Signed download link per merged video. Direct files only, no YouTube.",
    "version": "0.1",
    "x-build-id": "WuAq4bjNs9v2eJUr0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~video-concat-merger/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-video-concat-merger",
        "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/data-done-right~video-concat-merger/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-video-concat-merger",
        "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/data-done-right~video-concat-merger/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-video-concat-merger",
        "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": {
          "videoUrls": {
            "title": "Video URLs (in playing order)",
            "type": "array",
            "description": "Direct links to video files (mp4, mov, webm, mkv, avi), in the order they should play. Example: https://example.com/part1.mp4. Two or more. The same URL may appear twice. YouTube, Vimeo, TikTok and other streaming-site page links are rejected, with no charge. Files that robots.txt disallows are not fetched.",
            "items": {
              "type": "string"
            }
          },
          "merges": {
            "title": "Several merges in one run",
            "type": "array",
            "description": "Optional extra merged videos, each its own list: [{\"name\": \"promo\", \"videoUrls\": [\"https://example.com/a.mp4\", \"https://example.com/b.mp4\"], \"musicUrl\": \"https://example.com/track.mp3\", \"crossfadeSeconds\": 1}]. Only videoUrls is required per entry; name, musicUrl and crossfadeSeconds override the run-level settings for that merge. Each merge is one charged video. Runs in addition to 'Video URLs'."
          },
          "crossfadeSeconds": {
            "title": "Crossfade (seconds)",
            "minimum": 0,
            "maximum": 2,
            "type": "number",
            "description": "Length of the fade between clips, 0 to 2 seconds. 0 = hard cut. Example: 0.5. Every clip must be at least twice as long as the crossfade. The merged video is shorter than the sum of the clips by the crossfade times the number of joins.",
            "default": 0
          },
          "normalizeAudio": {
            "title": "Normalise loudness",
            "type": "boolean",
            "description": "Even out the volume of the joined audio to about -16 LUFS (single-pass EBU R128 loudnorm, approximate). Applied to the sound of the clips before background music is mixed in.",
            "default": false
          },
          "musicUrl": {
            "title": "Background music URL",
            "type": "string",
            "description": "Optional direct link to an audio file (mp3, wav, m4a, flac, ogg). Example: https://example.com/track.mp3. It is looped or cut to the length of the merged video and fades out over the last 2 seconds. Use music you have the rights to."
          },
          "musicVolume": {
            "title": "Music volume",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Volume of the background music relative to its original level, 0 to 1. Example: 0.25 sits quietly under speech.",
            "default": 0.25
          },
          "width": {
            "title": "Output width (px)",
            "minimum": 0,
            "maximum": 3840,
            "type": "integer",
            "description": "Width of the merged video in pixels. 0 = the size of the first clip. Every clip is scaled to this size. Example: 1280. With only a width, the height follows the first clip's aspect ratio. Maximum 3840.",
            "default": 0
          },
          "height": {
            "title": "Output height (px)",
            "minimum": 0,
            "maximum": 2160,
            "type": "integer",
            "description": "Height of the merged video in pixels. 0 = the size of the first clip. Example: 720. Maximum 2160.",
            "default": 0
          },
          "fit": {
            "title": "When clip shapes differ",
            "enum": [
              "pad",
              "crop"
            ],
            "type": "string",
            "description": "How a clip with a different aspect ratio is fitted into the output size.",
            "default": "pad"
          },
          "fps": {
            "title": "Output frame rate",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Frames per second of the merged video, 1 to 60. 0 = the frame rate of the first clip (25 if unknown). Example: 30. Clips with another rate are converted.",
            "default": 0
          },
          "crf": {
            "title": "Video quality (CRF)",
            "minimum": 16,
            "maximum": 35,
            "type": "integer",
            "description": "H.264 quality. Lower = better quality and bigger files: 18 is near-lossless, 23 is the default, 28 is small.",
            "default": 23
          },
          "audioBitrateKbps": {
            "title": "Audio bitrate (kbps)",
            "minimum": 64,
            "maximum": 320,
            "type": "integer",
            "description": "AAC bitrate of the merged audio. 128 is fine for speech, 192 to 320 for music.",
            "default": 192
          },
          "skipFailedInputs": {
            "title": "Skip inputs that fail",
            "type": "boolean",
            "description": "Off (default): if any input cannot be downloaded or read, the merge fails with a reason per input and costs nothing. On: the failed inputs are left out, the rest is merged and the row says which were skipped.",
            "default": false
          },
          "maxInputsPerVideo": {
            "title": "Max inputs per merged video",
            "minimum": 2,
            "maximum": 50,
            "type": "integer",
            "description": "A merge with more URLs than this fails without charge. Example: 20. Maximum 50.",
            "default": 20
          },
          "maxTotalMinutes": {
            "title": "Max total length (minutes)",
            "minimum": 0.1,
            "maximum": 60,
            "type": "number",
            "description": "Cap on the added-up length of the inputs of one merged video. Longer merges fail without charge. Example: 10 = ten minutes (maximum 60). Every clip is re-encoded, so long and high-resolution merges take time.",
            "default": 5
          },
          "maxMergesPerRun": {
            "title": "Max merged videos per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on merged videos in one run (and so on what you can be charged). Merges past the cap are listed as skipped.",
            "default": 20
          },
          "maxVideoSizeMb": {
            "title": "Max size per input (MB)",
            "minimum": 1,
            "maximum": 2048,
            "type": "integer",
            "description": "Input files above this size are rejected before the download finishes.",
            "default": 500
          },
          "maxTotalDownloadMb": {
            "title": "Max download per merged video (MB)",
            "minimum": 1,
            "maximum": 8192,
            "type": "integer",
            "description": "Cap on all files downloaded for one merged video (clips plus music), so a long list cannot fill the disk.",
            "default": 2048
          },
          "videoTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 7200,
            "type": "integer",
            "description": "Applies separately to each download.",
            "default": 600
          },
          "encodeTimeoutMinutes": {
            "title": "Encoding timeout (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Time allowed for joining one merged video after the downloads. A merge that takes longer fails without charge.",
            "default": 30
          },
          "outputStoreName": {
            "title": "Save merged videos in a named store",
            "type": "string",
            "description": "Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period. Example: my-merged-videos."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}