{
  "openapi": "3.0.1",
  "info": {
    "title": "Universal Video Downloader and Converter",
    "description": "Download videos from 1000s of sites or your own URLs, then convert, compress, trim, resize, extract audio (MP3/M4A), grab thumbnails, or make GIFs — all in one run. Fast, reliable media processing with flexible output. Perfect for content creators, archivers, and automation workflows.",
    "version": "1.0",
    "x-build-id": "gXCgRemqskOLNyZ55"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hgservices~video-downloader-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hgservices-video-downloader-converter",
        "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/hgservices~video-downloader-converter/runs": {
      "post": {
        "operationId": "runs-sync-hgservices-video-downloader-converter",
        "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/hgservices~video-downloader-converter/run-sync": {
      "post": {
        "operationId": "run-sync-hgservices-video-downloader-converter",
        "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": {
          "startUrls": {
            "title": "Source URLs",
            "type": "array",
            "description": "One or more URLs to download. Each can be a page on YouTube, Vimeo, TikTok, X/Twitter, Facebook, Instagram, SoundCloud, an RSS podcast episode, or any of the 1000+ sites yt-dlp supports — or a direct public link to a media file (mp4, mkv, webm, mov, mp3, m4a, …). Every URL is downloaded and processed with the same settings below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "videoQuality": {
            "title": "Download quality",
            "enum": [
              "best",
              "2160p",
              "1440p",
              "1080p",
              "720p",
              "480p",
              "360p"
            ],
            "type": "string",
            "description": "Maximum video resolution to download from a platform (it picks the best stream at or below this). Use a lower value to download faster and smaller. Applies to platform pages; direct file URLs are downloaded as-is (use Resize to downscale those).",
            "default": "best"
          },
          "format": {
            "title": "Output format",
            "enum": [
              "original",
              "mp4",
              "mkv",
              "webm",
              "mov",
              "avi"
            ],
            "type": "string",
            "description": "Container/format of the saved video. 'Original' keeps exactly what the source provides (no re-encoding — fastest and lossless). Any other value converts the file: it is remuxed losslessly when the codecs already fit the new container, otherwise re-encoded. Re-encoding to MP4/MOV/MKV uses H.264 + AAC, WebM uses VP9 + Opus.",
            "default": "original"
          },
          "resize": {
            "title": "Resize / scale",
            "enum": [
              "none",
              "1440p",
              "1080p",
              "720p",
              "480p",
              "360p",
              "240p"
            ],
            "type": "string",
            "description": "Re-encode the video down to this height (width is auto-scaled to keep the aspect ratio). Works on any source, including direct file URLs. Leave as 'No resize' to keep the original dimensions. Note: resizing forces a re-encode and counts as one processed output.",
            "default": "none"
          },
          "compress": {
            "title": "Compress",
            "enum": [
              "none",
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "Reduce file size by re-encoding at a higher compression level (H.264 CRF). Higher compression = smaller file, lower quality. Leave off to keep quality.",
            "default": "none"
          },
          "trimStart": {
            "title": "Trim start",
            "type": "string",
            "description": "Start time of the clip to keep, as seconds (e.g. 12) or HH:MM:SS (e.g. 00:01:30). Applies to the video and extracted-audio outputs. Leave empty to start at the beginning.",
            "default": ""
          },
          "trimEnd": {
            "title": "Trim end",
            "type": "string",
            "description": "End time of the clip to keep, as seconds or HH:MM:SS. Must be greater than Trim start. Leave empty to run to the end.",
            "default": ""
          },
          "extractAudio": {
            "title": "Extract audio",
            "type": "boolean",
            "description": "Also save an audio-only file extracted from the video.",
            "default": false
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "m4a",
              "aac",
              "opus",
              "ogg",
              "wav",
              "flac"
            ],
            "type": "string",
            "description": "Format for the extracted audio (only used when 'Extract audio' is on).",
            "default": "mp3"
          },
          "thumbnail": {
            "title": "Grab thumbnail",
            "type": "boolean",
            "description": "Also save a single still frame from the video as a JPEG.",
            "default": false
          },
          "thumbnailTime": {
            "title": "Thumbnail timestamp",
            "type": "string",
            "description": "When to grab the thumbnail, as seconds or HH:MM:SS. Leave empty to use the middle of the video.",
            "default": ""
          },
          "gif": {
            "title": "Make GIF",
            "type": "boolean",
            "description": "Also create a looping GIF from a segment of the video.",
            "default": false
          },
          "gifStart": {
            "title": "GIF start",
            "type": "string",
            "description": "Start time of the GIF segment, as seconds or HH:MM:SS (only used when 'Make GIF' is on).",
            "default": "00:00:00"
          },
          "gifDuration": {
            "title": "GIF duration (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Length of the GIF in seconds.",
            "default": 3
          },
          "gifFps": {
            "title": "GIF frame rate",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Frames per second for the GIF. Lower = smaller file.",
            "default": 12
          },
          "gifWidth": {
            "title": "GIF width (px)",
            "minimum": 64,
            "maximum": 1280,
            "type": "integer",
            "description": "Width of the GIF in pixels; height is auto-scaled to keep the aspect ratio.",
            "default": 480
          },
          "maxDurationMinutes": {
            "title": "Max source duration (minutes)",
            "minimum": 0,
            "maximum": 1440,
            "type": "integer",
            "description": "Skip any source longer than this many minutes, before it is downloaded (no charge for skipped sources). Protects you from accidentally processing a marathon livestream. Set to 0 for no limit.",
            "default": 180
          },
          "maxFileSizeMb": {
            "title": "Max direct-download size (MB)",
            "minimum": 1,
            "maximum": 6144,
            "type": "integer",
            "description": "Hard cap on the size of a single direct file URL download. Sources over this are rejected before/while streaming. Does not apply to platform downloads.",
            "default": 2048
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy. Off by default — most public media URLs and platforms download fine and faster without a proxy. Direct file URLs are always fetched directly first and only fall back to this proxy if the direct attempt fails. Enable it (e.g. the RESIDENTIAL group) only when a source is geo-restricted or blocks server IPs. YouTube and TikTok are handled by dedicated downloader Actors and ignore this setting.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}