{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Downloader: YouTube, TikTok, Instagram, X",
    "description": "Bulk video downloader for YouTube, TikTok, Instagram, X, Facebook, Pinterest and 1,100+ sites. Save MP4, MP3 or images, up to 4K, via API.",
    "version": "0.1",
    "x-build-id": "HxoiWKK5gtHfxRe07"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/web.harvester~video-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-web.harvester-video-downloader",
        "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/web.harvester~video-downloader/runs": {
      "post": {
        "operationId": "runs-sync-web.harvester-video-downloader",
        "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/web.harvester~video-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-web.harvester-video-downloader",
        "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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Media URLs",
            "type": "array",
            "description": "Links to posts, videos, tracks or direct media files. Dedicated support for YouTube, X/Twitter, Instagram, TikTok, Facebook, Reddit, Bluesky, Pinterest, Tumblr, Snapchat, SoundCloud, Vimeo, Bilibili, Dailymotion, Loom, Newgrounds, OK.ru, Rutube, Streamable, Twitch clips and VK clips. 1,100+ sites in total (full list in the README), plus many image sites and any direct link to a media file.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "downloadMode": {
            "title": "Download mode",
            "enum": [
              "auto",
              "audio",
              "mute"
            ],
            "type": "string",
            "description": "What to save: the full video, only the sound, or the video without sound.",
            "default": "auto"
          },
          "videoQuality": {
            "title": "Video quality",
            "enum": [
              "max",
              "4320",
              "2160",
              "1440",
              "1080",
              "720",
              "480",
              "360",
              "240",
              "144"
            ],
            "type": "string",
            "description": "Target resolution, based on the shorter side of the video. If it isn't available, the closest one is used. 1080p is recommended: higher qualities make files several times larger, which costs much more proxy traffic (especially residential), time and storage.",
            "default": "1080"
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "best",
              "mp3",
              "ogg",
              "wav",
              "opus"
            ],
            "type": "string",
            "description": "File type for audio downloads. \"best\" keeps the original audio without re-encoding.",
            "default": "mp3"
          },
          "audioBitrate": {
            "title": "Audio bitrate (kbps)",
            "enum": [
              "320",
              "256",
              "128",
              "96",
              "64",
              "8"
            ],
            "type": "string",
            "description": "Audio quality in kbps. Only used when audio has to be re-encoded.",
            "default": "128"
          },
          "filenameStyle": {
            "title": "Filename style",
            "enum": [
              "classic",
              "basic",
              "pretty",
              "nerdy"
            ],
            "type": "string",
            "description": "How output files are named. Example for a YouTube video with title \"Me at the zoo\" by \"jawed\": classic = youtube_jNQXAC9IVRw_1920x1080_h264.mp4; basic = Me at the zoo - jawed (1080p, h264).mp4; pretty = Me at the zoo - jawed (1080p, h264, youtube).mp4; nerdy = Me at the zoo - jawed (1080p, h264, youtube, jNQXAC9IVRw).mp4.",
            "default": "basic"
          },
          "youtubeVideoCodec": {
            "title": "Preferred video codec",
            "enum": [
              "h264",
              "av1",
              "vp9"
            ],
            "type": "string",
            "description": "h264 works everywhere. av1 and vp9 give better quality for the file size. Applies to YouTube and most other video sites.",
            "default": "h264"
          },
          "youtubeVideoContainer": {
            "title": "Video container",
            "enum": [
              "auto",
              "mp4",
              "webm",
              "mkv"
            ],
            "type": "string",
            "description": "File type for videos. \"auto\" gives mp4 for h264 and webm for vp9 and av1. Applies to YouTube and most other video sites.",
            "default": "auto"
          },
          "youtubeDubLang": {
            "title": "Preferred dubbed audio language",
            "type": "string",
            "description": "Two-letter language code (for example en, es, de). Picks the dubbed audio track in that language when one exists. Leave empty for the original audio."
          },
          "youtubeBetterAudio": {
            "title": "Prefer higher-quality YouTube audio",
            "type": "boolean",
            "description": "Picks the highest-bitrate audio track whatever its format. The file may end up as mkv or webm.",
            "default": false
          },
          "youtubePoTokenServerUrl": {
            "title": "YouTube PO-token server URL",
            "type": "string",
            "description": "Address of a small helper server that generates YouTube proof-of-origin tokens. Use it when YouTube answers \"Sign in to confirm you're not a bot\""
          },
          "subtitleLang": {
            "title": "Subtitle language",
            "type": "string",
            "description": "Two-letter language code (for example en). Embeds subtitles in that language when the site offers them. Leave empty for none."
          },
          "convertGif": {
            "title": "Convert GIF videos to .gif",
            "type": "boolean",
            "description": "X and Bluesky \"GIFs\" are really short videos. Turn this on to save them as real .gif files.",
            "default": true
          },
          "allowH265": {
            "title": "Allow H.265 (TikTok)",
            "type": "boolean",
            "description": "Allow H.265 (HEVC) videos from TikTok. They are smaller but some players can't open them.",
            "default": false
          },
          "tiktokFullAudio": {
            "title": "TikTok original sound",
            "type": "boolean",
            "description": "In audio mode, save the original sound used in the TikTok instead of the video's soundtrack.",
            "default": false
          },
          "disableMetadata": {
            "title": "Disable metadata",
            "type": "boolean",
            "description": "Don't write title, artist and cover art into the files.",
            "default": false
          },
          "maxItemsPerUrl": {
            "title": "Max items per URL",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of items to download from one URL that holds several, such as a carousel, gallery or playlist.",
            "default": 50
          },
          "maxDurationSeconds": {
            "title": "Max media duration (seconds)",
            "minimum": 1,
            "type": "integer",
            "description": "Longer videos are skipped and reported as failed. Default 10800 = 3 hours.",
            "default": 10800
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "type": "integer",
            "description": "Larger files are skipped and reported as failed. For files over about 1 GB, raise the run's memory (disk space is 2× memory).",
            "default": 2048
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Required: the Actor does not run without a proxy. Apify Proxy (datacenter) is enough for many sites. Residential proxies are recommended for YouTube, Instagram, TikTok and Facebook.",
            "default": {
              "useApifyProxy": true
            }
          },
          "directDownload": {
            "title": "Download files without the proxy when possible",
            "type": "boolean",
            "description": "The proxy is still used to open the page and find the media. The file itself is downloaded directly, which is faster and uses much less proxy traffic. If a site refuses the direct download, the proxy is used instead. Turn this off to send everything through the proxy.",
            "default": true
          },
          "cookies": {
            "title": "Cookies",
            "type": "object",
            "description": "Optional. Log-in cookies for each service, keyed by service name: instagram, instagram_bearer, twitter, reddit, youtube, vimeo_bearer, facebook, tiktok. Normal keys take a browser cookie string, \"name=value; name2=value2\". instagram_bearer takes \"token=<token>\". vimeo_bearer takes \"access_token=<token>\". See the README for how to export cookies. Each service's cookies are only sent to that service."
          },
          "maxConcurrency": {
            "title": "Max parallel links",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Advanced. Leave unset to let the Actor choose. Number of links processed at the same time."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}