{
  "openapi": "3.0.1",
  "info": {
    "title": "Extract Audio from Video: MP3, WAV & FLAC in Bulk",
    "description": "Extract audio from video file URLs in bulk: MP3, WAV, FLAC or M4A with download links. Choose bitrate, sample rate, mono/stereo and an optional time range. Direct files only (mp4, mov, webm, mkv), no YouTube. Pay per audio minute.",
    "version": "0.1",
    "x-build-id": "hrla5bNauoef8GWFi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~extract-audio-from-video/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-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/data-done-right~extract-audio-from-video/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-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/data-done-right~extract-audio-from-video/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-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",
        "required": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct links to video files (mp4, mov, webm, mkv, avi, flv). Example: https://example.com/talk.mp4. One audio file is produced per link. YouTube, Vimeo, TikTok and other streaming-site page links are rejected, with no charge.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Audio format",
            "enum": [
              "mp3",
              "wav",
              "flac",
              "m4a"
            ],
            "type": "string",
            "description": "File type of the extracted audio. MP3 and M4A (AAC) are small lossy files; WAV is uncompressed PCM 16-bit; FLAC is lossless and about half the size of WAV. Audio that is already lossy in the video is not improved by choosing WAV or FLAC.",
            "default": "mp3"
          },
          "audioBitrateKbps": {
            "title": "Bitrate for MP3 and M4A (kbps)",
            "minimum": 32,
            "maximum": 320,
            "type": "integer",
            "description": "MP3 and M4A only; ignored for WAV and FLAC. 128 is fine for speech, 192 to 320 for music. Example: 192.",
            "default": 192
          },
          "sampleRateHz": {
            "title": "Sample rate (Hz)",
            "minimum": 0,
            "maximum": 192000,
            "type": "integer",
            "description": "Resample the audio, for example 16000 for speech-to-text or 44100 for music. 0 keeps the original rate. Minimum 8000 when set.",
            "default": 0
          },
          "channels": {
            "title": "Channels",
            "enum": [
              "original",
              "mono",
              "stereo"
            ],
            "type": "string",
            "description": "Keep the original channel layout, or mix down to mono (smaller files, common for transcription) or stereo.",
            "default": "original"
          },
          "startSeconds": {
            "title": "Start at (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Optional: begin the audio at this time in the video. Example: 30 skips the first 30 seconds. 0 = from the start.",
            "default": 0
          },
          "endSeconds": {
            "title": "End at (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Optional: stop the audio at this time in the video. Example: 120. 0 = until the end of the video. Must be after the start.",
            "default": 0
          },
          "maxVideosPerRun": {
            "title": "Max videos per run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on videos processed in one run. Links past the cap are listed as skipped and not charged.",
            "default": 100
          },
          "maxAudioMinutesPerRun": {
            "title": "Max audio minutes per run",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on the audio minutes you can be charged for in one run. A video that would go over it is skipped, free. Example: 600 = 10 hours of audio, at most $1.80.",
            "default": 600
          },
          "maxVideoSizeMb": {
            "title": "Max video file size (MB)",
            "minimum": 1,
            "maximum": 2048,
            "type": "integer",
            "description": "Source files above this size are rejected before the download finishes. Maximum 2048.",
            "default": 500
          },
          "maxDurationMinutes": {
            "title": "Max video duration (minutes)",
            "minimum": 0.1,
            "type": "number",
            "description": "Longer source videos are rejected without charge. Example: 240 = 4 hours.",
            "default": 240
          },
          "videoTimeoutSecs": {
            "title": "Timeout (seconds)",
            "minimum": 10,
            "maximum": 7200,
            "type": "integer",
            "description": "Applies separately to each download and to the audio extraction of each video.",
            "default": 600
          },
          "outputStoreName": {
            "title": "Save audio in a named store",
            "type": "string",
            "description": "Optional key-value store name. Named stores are kept until you delete them, while the store of a run expires after your plan retention period. Example: my-audio."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}