gdown 6.0.0


pip install gdown

  Latest version

Released: Apr 12, 2026

Project Links

Meta
Author: Kentaro Wada
Requires Python: >=3.10

Classifiers

Development Status
  • 5 - Production/Stable

Environment
  • Console

Intended Audience
  • Developers

License
  • OSI Approved :: MIT License

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Topic
  • Software Development :: Libraries :: Python Modules

gdown

PyPI Python Build License

Google Drive public file/folder downloader when curl/wget fails.

Why?

Downloading public files from Google Drive with curl or wget doesn't work — Google serves a confirmation page for large files, and the URL formats are a mess.

gdown gets around that:

  • Skips the virus-scan confirmation page so large downloads actually finish
  • Downloads folders recursively
  • Exports Google Docs/Sheets/Slides as PDF, DOCX, CSV, etc.
  • Resumes partial downloads with --continue
  • Also works with plain HTTP/HTTPS URLs as a curl/wget replacement

Install

Requires Python 3.10 or later.

pip install gdown

Or with uv:

uv tool install gdown

Quick start

# Just paste a Google Drive URL
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ

# Or copy-paste a share link directly
gdown 'https://drive.google.com/file/d/0B9P1L--7Wd2vU3VUVlFnbTgtS2c/view?usp=sharing'

Usage

CLI

Files

# Download by URL
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ

# Download by file ID
gdown 1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ

# Download from a share link
gdown 'https://drive.google.com/file/d/0B9P1L--7Wd2vU3VUVlFnbTgtS2c/view?usp=sharing'

# Save to a specific path
gdown https://drive.google.com/uc?id=0B9P1L--7Wd2vU3VUVlFnbTgtS2c -O /tmp/spam.txt

Folders

# Download an entire folder
gdown https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl -O /tmp/folder --folder

Google Docs, Sheets, Slides

# Download a Google Slides file (default: pptx)
gdown "https://docs.google.com/presentation/d/15umvZKlsJ3094HNg5S4vJsIhxcFlyTeK/edit?usp=sharing"

# Export as PDF instead
gdown "https://docs.google.com/presentation/d/15umvZKlsJ3094HNg5S4vJsIhxcFlyTeK/edit" --format pdf

Default export formats: Docs → docx, Sheets → xlsx, Slides → pptx.

Resume, speed limit, proxy

# Resume a partially downloaded file
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --continue

# Limit download speed
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --speed 10MB

# Download via proxy
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --proxy http://proxy:8080

Other options

# Skip TLS certificate verification
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --no-check-certificate

# Don't use cookies from ~/.cache/gdown/cookies.txt
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --no-cookies

# Use a custom User-Agent
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --user-agent "MyApp/1.0"

Pipe to stdout

gdown https://github.com/wkentaro/gdown/archive/refs/tags/v4.0.0.tar.gz -O - --quiet | tar zxvf -

Any URL

gdown also works with regular URLs, not just Google Drive:

gdown https://httpbin.org/ip -O ip.json

[!NOTE] For Google Drive URLs, gdown automatically extracts the file ID and downloads the actual file. Use curl or wget to download the raw HTML page instead.

Python

import gdown

# Download a file
url = "https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ"
gdown.download(url=url, output="fcn8s_from_caffe.npz")

# Download by file ID
gdown.download(id="0B9P1L--7Wd2vNm9zMTJWOGxobkU", output="output.npz")

# Download from a share link
url = "https://drive.google.com/file/d/0B9P1L--7Wd2vNm9zMTJWOGxobkU/view?usp=sharing"
gdown.download(url=url, output="output.npz")

# Download with hash verification and caching
gdown.cached_download(
    url=url,
    path="output.npz",
    hash="md5:fa837a88f0c40c513d975104edf3da17",
    postprocess=gdown.extractall,
)

# Track download progress
def on_progress(bytes_so_far: int, bytes_total: int | None) -> None:
    if bytes_total is not None:
        print(f"\r{bytes_so_far / bytes_total * 100:.1f}%", end="")

gdown.download(url=url, output="output.npz", quiet=True, progress=on_progress)

# Download a folder
url = "https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl"
gdown.download_folder(url=url)

# Download a folder by ID
gdown.download_folder(id="15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl")

FAQ

"Permission Denied" error

Make sure the file sharing is set to "Anyone with the link".

Download still fails even with "Anyone with the link"

Google throttles downloads when too many people access the same file. If you can still open the file in your browser, try exporting cookies:

  1. Install a browser extension like Get cookies.txt LOCALLY
  2. Export cookies.txt and move it to ~/.cache/gdown/cookies.txt
  3. Run the download again

Once the file is in place, gdown loads it automatically (no extra flags needed).

Download stops after ~1 hour

Google Drive terminates connections after approximately 1 hour for large files. Use --continue to resume, and retry until the download completes:

gdown --continue https://drive.google.com/uc?id=<file_id>

Can I use gdown for non-Google-Drive URLs?

Yes. It works with any public HTTP/HTTPS URL.

Contributing

git clone https://github.com/wkentaro/gdown.git
cd gdown
make setup   # install dependencies
make test    # run tests
make lint    # run linters

License

MIT (LICENSE)

6.0.0 Apr 12, 2026
6.0.0rc1 Apr 12, 2026
5.2.2 Apr 12, 2026
5.2.1 Jan 11, 2026
5.2.0 May 12, 2024
5.1.0 Feb 03, 2024
5.0.1 Jan 26, 2024
5.0.0 Jan 20, 2024
5.0.0rc1 Jan 20, 2024
4.7.3 Jan 16, 2024
4.7.2 Jan 16, 2024
4.7.1 Mar 25, 2023
4.7.0 Mar 25, 2023
4.6.6 Mar 24, 2023
4.6.5 Mar 24, 2023
4.6.4 Feb 21, 2023
4.6.3 Feb 13, 2023
4.6.2 Feb 11, 2023
4.6.1 Feb 11, 2023
4.6.0 Dec 05, 2022
4.5.4 Nov 25, 2022
4.5.3 Oct 18, 2022
4.5.2 Oct 17, 2022
4.5.1 Jun 26, 2022
4.5.0 Jun 25, 2022
4.4.0 Feb 26, 2022
4.3.1 Feb 20, 2022
4.3.0 Feb 17, 2022
4.2.2 Feb 20, 2022
4.2.1 Jan 31, 2022
4.2.0 Oct 20, 2021
4.1.1 Oct 18, 2021
4.1.0 Oct 18, 2021
4.0.2 Oct 06, 2021
4.0.1 Oct 03, 2021
4.0.0 Oct 03, 2021
3.15.0 Oct 03, 2021
3.14.0 Sep 29, 2021
3.13.1 Sep 15, 2021
3.13.0 May 02, 2021
3.12.2 Aug 18, 2020
3.12.1 Aug 17, 2020
3.12.0 Jul 22, 2020
3.11.1 Jun 06, 2020
3.11.0 May 04, 2020
3.11.0rc1 Apr 29, 2020
3.10.3 Apr 16, 2020
3.10.2 Mar 31, 2020
3.10.1 Feb 05, 2020
3.10.0 Jan 19, 2020
3.9.1 Jan 10, 2020
3.9.0 Jan 04, 2020
3.8.3 Sep 01, 2019
3.8.2 Aug 28, 2019
3.8.1 Mar 17, 2019
3.8.0 Mar 17, 2019
3.7.4 Mar 01, 2019
3.7.3 Jan 29, 2019
3.7.1 Jan 16, 2019
3.7.0 Jan 15, 2019
3.6.4 Jan 02, 2019
3.6.3 Jan 02, 2019
3.6.2 Jan 02, 2019
3.6.1 Dec 21, 2018
3.6.0 Oct 23, 2018
3.5.0 Jun 05, 2018
3.4.6 Mar 23, 2018
3.4.5 Feb 21, 2018
3.4.4 Feb 21, 2018
3.4.3 Dec 27, 2017
3.4.2 Dec 27, 2017
3.4.1 Dec 22, 2017
3.4.0 Dec 22, 2017
3.3.2 Aug 07, 2017
3.3.1 Aug 05, 2017
3.3.0 Aug 03, 2017
3.2.5 May 08, 2017
3.2.4 Nov 22, 2016
3.2.3 Nov 15, 2016
3.2.2 Nov 15, 2016
3.2.1 Nov 15, 2016
3.2.0 Nov 15, 2016
3.1.0 Nov 15, 2016
3.0.0 Nov 15, 2016
2.3.1 Nov 15, 2016
2.3.0 Nov 15, 2016
2.2.0 Jun 02, 2016
2.1.1 Jun 02, 2016
2.1.0 Jun 02, 2016
2.0.2 May 31, 2016
2.0.1 May 31, 2016
2.0.0 May 01, 2016
1.0.2 Dec 16, 2015
1.0.1 Oct 17, 2015

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
beautifulsoup4
filelock
requests[socks]
tqdm
typing-extensions (>=4.0)