Google Drive is the best file hosting and storage platform available online. Google may limit downloading large files due to a number of reasons, but today in this guide I will tell you a few methods to download very large Google Drive files faster using Google Drive API, CURL, Wget, and OAuth method.
If you can’t download large files from Google Drive, then the methods below will come in very handy. Let us look at the best possible options to download large Drive files, choose the method that you feel can do the job for you.
Method 1. Download Large Files Using Google Drive API
This method works for media and application files, like videos, music, zip, images, exe, APK, dmg, and more. The method does not work for Document files.
How to Create Google Drive Direct Download Link for Large Files?
- Generate Google Drive API Key from this Detailed Guide.
- Get the public sharing URL.
- Paste the Sharing URL and just copy the FileID and save it somewhere safe.
https://drive.google.com/file/fileid/view?=sharing
- Open Chrome and enter the following Google APIs URL.
https://www.googleapis.com/drive/v3/files/FileID?alt=media&key=APIKey
- Paste the file id copied in the FileID section and API key in the APIKey section.
- Hit Enter and the file will start downloading without any warning page.
With the simple method above you can create a direct download link for your Google Drive file to download the large file without virus warning.
Method 2. Download Large Files Using CURL Command
Here is a quick method to download the files directly using Terminal or Putty. This method will work for both small and large files.
Get the public sharing link for the file that you wish to download;
https://drive.google.com/file/d/1yDhqEkXZPdq9Ln_XXXX_oUdNta0YUU/view
The highlighted yellow part in the above URL is the File ID of the file on Google Drive. We will use this File ID in the download process.
- Login to your Linux Machine using Putty on Windows or Mac Terminal.
- cd into some directory or folder where you want the file to be downloaded.
- Now enter the below commands one by one to download the file from Google Drive.
Command 1. Replace the FILE_ID with the actual ID of the file. You can find the ID in the google drive download link.
curl -c /tmp/cookies "https://drive.google.com/uc?export=download&id=FILE_ID" > /tmp/intermezzo.html
Command 2. Replace the FILE_NAME with any name you want; For example examplefiles.zip.
curl -L -b /tmp/cookies "https://drive.google.com$(cat /tmp/intermezzo.html | grep -Po 'uc-download-link" [^>]* href="\K[^"]*' | sed 's/\&/\&/g')" > FILE_NAME
Make sure to replace the FILE_ID in the first command with the actual ID of the file like shown above, and replace the FILE_NAME in the second command with the name of the file (You can use any name, for example, serverfiles.zip).
Method 3. Download Large GDrive Files with Wget in Terminal
This is a PC terminal WGet command that can help you download large files fast. We will need the google drive shareable link. Example of what a google drive shareable link:
https://drive.google.com/file/d/1u1Erp5k78dg_-EfUme2v4KTJhzM9S_74/view?usp=sharing
- Identify the FILEID in the link above.
FILEID = 1u1Erp5k78dg_-EfUme2v4KTJhzM9S_74
- Identify the FILENAME in the link above.
FILENAME = Install__Google_Drive_MacBook.zip
Replace FILEID and FILENAME in the command below:
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt
After replacing the FILEID
and FILENAME
, the command will look like this:
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1u1Erp5k78dg_-EfUme2v4KTJhzM9S_74
' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1u1Erp5k78dg_-EfUme2v4KTJhzM9S_74
" -OInstall__Google_Drive_MacBook.zip
&& rm -rf /tmp/cookies.txt
Method 4. Download GDrive Files Using Google Developer OAuth
Here are step-by-step instructions to download a media file from Google Drive using the command line API. This method is best suited for all types of files except docs.
Get the file ID
- Go to your Google Drive in your browser.
- Right-click (or control-click) the file you want to download and click “Get shareable link”. The link looks like this: https://drive.google.com/file/d/XXXXX/view?usp=sharing.
- Make note of the file ID “XXXXX”.
Get an OAuth token
- Go to OAuth 2.0 Playground
- In the box, look for “Drive API v3”,
- And select
https://www.googleapis.com/auth/drive.readonly
- Click “Authorize APIs”.
- Then click on “Exchange authorization code for tokens”.
- Copy the “Access token”.
Download the file from the command line:
If using OS X or Linux, open the “Terminal” program and enter the following command.
curl -H "Authorization: Bearer AccessToken" https://www.googleapis.com/drive/v3/files/FildeID?alt=media -o FileName
If using Windows, open the “PowerShell” program and enter the following command.
Invoke-RestMethod -Uri https://www.googleapis.com/drive/v3/files/XXXXX?alt=media -Method Get -Headers @{"Authorization"="Bearer YYYYY"} -OutFile ZZZZZ
Press Enter and let the download begin.
Method 5. Using Google Drive for Desktop
Google Drive has a desktop app for Windows and Mac PC. You can use the drive for desktop to backup your PC data to drive and also sync and access the Google Drive files on your PC. If you have large Google Drive files then the best bet is to directly sync the file on your PC and then move the file to your device’s internal storage. This way can download the file on your PC without any network issues directly from Google Servers.
Install and Setup Google Drive on Windows PC [Guide]
Google Drive for Desktop – Auto Backup MacBook to Google Drive
With Drive for Desktop, you can sync all GDrive files on your PC for quick access and download the files easily from your PC Explorer or Finder to your internal storage directly without any network issues. Just copy and paste the files from Google Drive folder to internal storage and done!
Method 6. Use Downloader Manager for Android
You can also download large files from Drive on Android mobile itself. The app can download large files without any issues.
- Download 1DM on your Android.
- Grant the permissions and click on the link icon.
- Paste the Shared URL and hit connect.
- It will detect the file and show other details.
- Now click on the Start option to download the file. Done!😃|
That’s it with the methods above you can download very large Drive files on your Windows, Mac, or Android without any issues. If you have any queries please comment below, we will be happy to assist you.
Hey there. Nice manual, thanks a lot. The transfer speeds are much better. Do you know about a possibility to download whole folders with more speed?