
YouTube Video Downloader
Pricing
Pay per event

YouTube Video Downloader
Use YouTube Video Downloader to download YouTube videos in MP4, MP3, avi, and other formats directly to your cloud storage service. Just add a YouTube video URL and get the converted video in a few seconds.
4.6 (4)
Pricing
Pay per event
13
Total users
501
Monthly users
237
Runs succeeded
60%
Issues response
34 days
Last modified
3 days ago
Actor Fails on Certain Videos with Bot Detection and Postprocessing Errors
Open
When attempting to download audio from certain YouTube videos, the actor run fails. The failure mode appears to be twofold:
Primary Failure: The underlying yt-dlp process is blocked by YouTube's anti-bot measures, even when using the default Apify proxy pool. The actor log shows the error ERROR: [youtube] ... Sign in to confirm you’re not a bot.
Secondary Failure: On some runs, when requesting the flac format, the actor successfully downloads the video but fails during the conversion step with a Postprocessing: Error opening output files: Invalid argument error.
In both failure cases, the actor run ultimately finishes, but the output dataset is empty, making it difficult to programmatically determine the cause of failure without manually inspecting the logs.
Steps to Reproduce:
Configure an actor run with the following input. Use the video URL: https://www.youtube.com/watch?v=CdQFrz31j2s Execute the actor via an API call. Input JSON: Generated json { "videos": [ { "url": "https://www.youtube.com/watch?v=CdQFrz31j2s" } ], "preferredFormat": "mp3", "preferredQuality": "480p", "googleCloudBucketName": "your-gcs-bucket-name", "googleCloudServiceKey": "{...your_service_key_json...}" } Json
Expected Behavior: The actor should successfully download the audio track of the video, convert it to MP3, and upload the resulting file to the specified Google Cloud Storage bucket. The actor's output dataset should contain a record with the filename of the uploaded object.
Actual Behavior: The actor run fails after multiple retries. The final curl request to my function receives an error because the actor's output dataset is empty. The actor's log contains the "Sign in to confirm you're not a bot" error.
Relevant Log Snippets: Generated code [apify.youtube-video-downloader runId:4Bx3uKTNOcdfykNQI] -> 2025-06-25T08:30:06.995Z ERROR: [youtube] CdQFrz31j2s: Sign in to confirm you’re not a bot. Use --cookies-from-browser or --cookies for the authentication...
Generated code [apify.youtube-video-downloader runId:Rv9rZM2w3MPzGmJ4m] -> 2025-06-25T08:42:01.401Z INFO ERROR: Postprocessing: Error opening output files: Invalid argument Use code with caution.
Actor Run IDs for Reference: The following run IDs demonstrate the failures described: Rv9rZM2w3MPzGmJ4m 4Bx3uKTNOcdfykNQI 9ge0Cx3hCyW8zv565
Environment: The actor is being called programmatically from a Google Cloud Function (Python 3.11 runtime).
The call is made using the apify-client (v1.11.0) for Python. Please let me know if any further information is required to diagnose this issue. Thank you.