{
  "openapi": "3.0.1",
  "info": {
    "title": "Extract Audio from Video – MP4 to MP3, WAV, FLAC in Bulk",
    "description": "Extract the audio track from your video files: MP4, MOV, WebM, MKV or AVI to MP3, M4A, WAV, FLAC or Opus. Choose bitrate, mono or stereo and sample rate, normalise loudness, and split long audio into chunks that fit the Whisper API's 25 MB limit. Bulk from URLs or a dataset. $3 per 1,000 minutes.",
    "version": "0.1",
    "x-build-id": "UfZVk7A7mDOXbpeEX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~extract-audio-from-video/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-extract-audio-from-video",
        "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/gazidev~extract-audio-from-video/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-extract-audio-from-video",
        "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/gazidev~extract-audio-from-video/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-extract-audio-from-video",
        "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": {
          "mediaUrls": {
            "title": "Video file URLs (direct links)",
            "type": "array",
            "description": "Direct links to video (or audio) FILES you own or may process: MP4, MOV, WebM, MKV, AVI, M4V, TS, or HLS `.m3u8` playlists (your CDN, S3/R2/GCS bucket, Dropbox direct link...). Pages of YouTube, Facebook, TikTok, Instagram, Vimeo etc. are refused for free: this Actor is not a downloader.",
            "default": [
              "https://download.samplelib.com/mp4/sample-10s.mp4"
            ],
            "items": {
              "type": "string"
            }
          },
          "bulkText": {
            "title": "Bulk list (paste text or CSV)",
            "type": "string",
            "description": "One URL per line, or a CSV with a `url` column."
          },
          "datasetId": {
            "title": "Read URLs from an Apify dataset",
            "type": "string",
            "description": "Chain after another Actor whose output has media file URLs."
          },
          "datasetField": {
            "title": "Dataset field with the URL",
            "type": "string",
            "description": "Field name in that dataset (string or list of strings).",
            "default": "url"
          },
          "uploadedFiles": {
            "title": "Upload files from your computer",
            "type": "array",
            "description": "Upload your own video files in the Console. This Actor runs with limited permissions, so ALSO select the key-value store you uploaded into in 'Key-value store with your uploads' below. If you upload files, the pre-filled demo link in `mediaUrls` is ignored automatically."
          },
          "uploadStore": {
            "title": "Key-value store with your uploads",
            "type": "string",
            "description": "Grants this run read access to that store only. If `uploadedFiles` points into it, only those files are processed; otherwise every media record in it is (up to 1,000; INPUT/JSON/text records are skipped)."
          },
          "audioFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "m4a",
              "wav",
              "flac",
              "opus",
              "ogg"
            ],
            "type": "string",
            "description": "Output format of every file.",
            "default": "mp3"
          },
          "preset": {
            "title": "Preset",
            "enum": [
              "original",
              "speech",
              "custom"
            ],
            "type": "string",
            "description": "`speech` makes small files for Whisper, Deepgram, AssemblyAI etc. (64 kbps mono MP3 = 0.48 MB per minute). `original` with M4A on an MP4 with AAC audio is a lossless stream copy and the fastest option.",
            "default": "original"
          },
          "bitrateKbps": {
            "title": "Bitrate (kbps)",
            "minimum": 32,
            "maximum": 320,
            "type": "integer",
            "description": "For MP3, M4A, Opus and OGG with presets `original` (when re-encoding) and `custom`. Opus is capped at 256.",
            "default": 192
          },
          "channels": {
            "title": "Channels",
            "enum": [
              "auto",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Preset `custom` only.",
            "default": "auto"
          },
          "sampleRate": {
            "title": "Sample rate (Hz)",
            "minimum": 0,
            "maximum": 96000,
            "type": "integer",
            "description": "Preset `custom` only, e.g. 16000, 22050, 44100, 48000. Empty = keep the source rate."
          },
          "normalizeAudio": {
            "title": "Normalise loudness (EBU R128, two-pass)",
            "type": "boolean",
            "description": "Two-pass `loudnorm` to -16 LUFS integrated, -1.5 dBTP. Adds the measured loudness (`sourceLufs`, `integratedLufs`) to each row. Charged as an extra `normalized-minute` per audio minute.",
            "default": false
          },
          "splitMinutes": {
            "title": "Split into chunks of N minutes",
            "minimum": 0,
            "maximum": 600,
            "type": "number",
            "description": "0 = one file. Every chunk is a separate file and row with `chunkStart`/`chunkEnd` in source time. Minimum chunk 30 s.",
            "default": 0
          },
          "splitMaxMb": {
            "title": "Split so every chunk stays under N MB",
            "minimum": 0,
            "maximum": 2000,
            "type": "number",
            "description": "0 = off. Use 24 for the OpenAI Whisper API (25 MB upload limit). The chunk length is computed from the bitrate; VBR formats get a safety margin. If both split options are set, the shorter chunk wins.",
            "default": 0
          },
          "startTime": {
            "title": "Start time",
            "type": "string",
            "description": "Optional: only extract from here, e.g. `90` or `00:01:30`."
          },
          "endTime": {
            "title": "End time",
            "type": "string",
            "description": "Optional, e.g. `00:45:00`."
          },
          "audioStreamIndex": {
            "title": "Audio track number (0-based)",
            "minimum": 0,
            "type": "integer",
            "description": "For files with several audio tracks (languages, commentary). Empty = the default track. Each row shows `audioStreams` (how many the file has)."
          },
          "maxFileSizeMb": {
            "title": "Max input file size (MB)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Larger files get a free error row. The file is downloaded to the run's disk: above ~1,000 MB give the run 2,048 MB+ memory.",
            "default": 2000
          },
          "maxDurationMinutes": {
            "title": "Max audio length (minutes)",
            "minimum": 1,
            "maximum": 1200,
            "type": "integer",
            "description": "Longer files get a free error row unless you trim them.",
            "default": 300
          },
          "maxConcurrency": {
            "title": "Files in parallel",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "2 is right for 1,024 MB memory.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}