Skip to main content
The Decodo Video downloader (target: youtube_video) can be used to download and save specified Youtube videos into the s3 compatible storage.
To get access, please Contact our sales team

youtube_video

  • The youtube_video target only supports asynchronous and batch integrations.
  • Batch youtube_video requests are limited to 100 video per request.
  • Downloading is supported for videos of 12 hours or less.
  • The download time is limited to 10 hour.

Delivery to S3

You can download videos straight into your S3 bucket by providing a number of arguments through the upload_url parameter. In the steps below, we will upload a sample video into a new bucket.
If you have the option, we recommend creating a new bucket for video downloads. That said, the following steps will also work on an existing bucket.
In order to start downloading videos:
  1. Create a new S3 bucket with default setup and permissions.
  2. Create a new IAM user.
  3. Attach the PutObject permission for your bucket on the IAM user:
    1. Add an inline policy:
    2. Under Service, select S3.
    3. Under Actions:
      1. The following permissions need to be added to the bucket:
        • GetBucketLocation
      2. The following permissions need to be added to the folder of the bucket:
        • PutObject
        • PutObjectAcl
    4. Under Resources, select Specific, click on Add ARN, add your bucket name and your video folder name:
    5. Your final policy statement should look like this:
  4. Generate an access key and secret for that user.
    1. When asked for a use case, select Other.
    The access key sent to Scraper API cannot include any non URI-escaped characters that may conflict with the upload_url parameter, such as / or @. If your key generated by AWS includes such characters, please regenerate your key.
  5. Call Scraper API with the following sample parameters:
Things to note:
  • access_key and access_secret are generated from step 4.
  • us-west-2 is used as a sample region, your AWS region may be different.
  • A /video-folder must be provided.

S3-compatible Providers

Below are a number of S3-compatible providers that will also work with this target out of the box:
Scraper API does not currently support:
  • Showing download progress (completed/remaining percent)
  • Indicating when uploading to upload_url fails (invalid credentials, bucket not found, etc.)
Requests are still charged even if the upload to upload_url fails - we recommend testing with small videos first.

Sample Request

A successfully queued job will return a response similar to this:

Accessing geo-restricted videos

Scraper API attempts to automatically pick the best location from where to download geo-restricted videos. However, YouTube videos do not expose information about what geolocation a given video is restricted to, therefore, Scraper API may fail after a fixed number of attempts. Manually retrying the scraping request may be required.

Monitoring progress

The status of a queued video download can be checked throughhttps://scraper-api.decodo.com/v3/task/{task_id}/results endpoint (you can find id in the body of the response after the task has been created):
  • HTTP status code 204 indicates that the download is still processing.
  • HTTP status code 200 indicates that the download has finished and an attempt to upload to your storage direction has been made. If video was not uploaded status_code in the response will provide reasoning, there requests are billed for the traffic that was used attempting to fetch a video:
Traffic is billed as the total data moved to complete a download: the video file itself, plus a small amount of unavoidable transfer data needed to retrieve it. This extra data varies by video, depending on how the source platform delivers it, so total traffic is always slightly higher than the final file size in your storage.

Support

Need help or just want to say hello? Our support is available 24/7.
You can also reach us anytime via email at support@decodo.com.

Feedback

Can’t find what you’re looking for? Request an article!
Have feedback? Share your thoughts on how we can improve.