GALLERY-DL(1)

okay bestie, sit down, hydrate, and let me tell you about the single most iconic lil command line tool in the whole image-hoarding ecosystem πŸ’–


🌸 NAME 🌸

gallery-dl β€” download image-galleries and -collections


πŸ¦‹ SYNOPSIS πŸ¦‹

gallery-dl [OPTION]... URL...

πŸ’… DESCRIPTION πŸ’…

okay so gallery-dl is a command-line program that downloads image-galleries and -collections from several image hosting sites. the way it's cross-platform, has so many configuration options, and has genuinely powerful filenaming capabilities?? it's giving main character energy, no cap 😭✨


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” prints this help message and then dips out
  • --version β€” prints the program version and exits, periodt
  • -f, --filename FORMAT β€” the filename format string for your downloaded files (use '/O' if you want the "original" filenames, iykyk)
  • -d, --destination PATH β€” where your files go, the target location for file downloads
  • -D, --directory PATH β€” the exact location for file downloads, no wiggle room
  • --restrict-filenames VALUE β€” replaces restricted filename characters with underscores. pick one of 'windows', 'windows+', 'unix', 'ascii', 'ascii+', or bring your own custom set of characters πŸ’«
  • --windows-filenames β€” forces filenames to be Windows-compatible, whether they like it or not
  • -X, --extractors PATH β€” load external extractors from PATH
  • --compat β€” restores the legacy 'category' names, for the nostalgia girlies
  • -S, --server β€” enables server mode. sends input URLs to a gallery-dl server, or creates an IPC server when you give it no input URLs
  • -U, --update-check β€” checks if a newer version is available (spoiler: maybe πŸ‘€)
  • -i, --input-file FILE β€” downloads all the URLs found in FILE (use '-' for stdin). and yes bestie, you can specify more than one --input-file
  • -I, --input-file-comment FILE β€” downloads the URLs found in FILE, then comments them out once they've downloaded successfully. tidy!!
  • -x, --input-file-delete FILE β€” downloads the URLs found in FILE, then deletes them after they downloaded successfully. ruthless πŸ’€
  • --no-input β€” does not prompt for passwords/tokens
  • -q, --quiet β€” activates quiet mode 🀫
  • -w, --warning β€” prints only warnings and errors
  • -v, --verbose β€” prints various debugging information, the tea β˜•
  • -g, --get-urls β€” prints the URLs instead of downloading
  • -G, --resolve-urls β€” prints URLs instead of downloading, and resolves intermediary URLs on the way
  • -j, --dump-json β€” prints JSON information
  • -J, --resolve-json β€” prints JSON information, and resolves intermediary URLs too
  • -s, --simulate β€” simulates data extraction, downloads absolutely nothing
  • -E, --extractor-info β€” prints extractor defaults and settings
  • -K, --list-keywords β€” prints a list of available keywords plus example values for the URLs you gave it
  • -e, --error-file FILE β€” adds input URLs that returned an error to FILE
  • -N, --print [EVENT:]FORMAT β€” writes FORMAT during EVENT to standard output instead of downloading files. EVENT defaults to 'prepare'. can be used multiple times. examples: 'id' or 'post:{md5[:8]}'
  • --Print [EVENT:]FORMAT β€” like --print, but it downloads files as well (capital P, capital energy πŸ‘‘)
  • --print-to-file [EVENT:]FORMAT FILE β€” appends FORMAT during EVENT to FILE instead of downloading files. can be used multiple times
  • --Print-to-file [EVENT:]FORMAT FILE β€” like --print-to-file, but it downloads files as well
  • --list-modules β€” prints a list of available extractor modules
  • --list-extractors [CATEGORIES] β€” prints a list of extractor classes with description, (sub)category and example URL
  • --write-log FILE β€” writes logging output to FILE
  • --write-unsupported FILE β€” writes URLs that get emitted by other extractors but can't be handled to FILE
  • --write-pages β€” writes downloaded intermediary pages to files in the current directory so you can debug problems
  • --print-traffic β€” displays sent and read HTTP traffic
  • --no-colors β€” does not emit ANSI color codes in output 🚫🌈
  • -R, --retries N β€” maximum number of retries for failed HTTP requests, or -1 for infinite retries (default: 4)
  • -a, --user-agent UA β€” the User-Agent request header
  • --http-timeout SECONDS β€” timeout for HTTP connections (default: 30.0)
  • --proxy URL β€” use the specified proxy
  • --xff VALUE β€” uses a fake 'X-Forwarded-For' HTTP header to try bypassing geographic restrictions. can be IP blocks in CIDR notation or two-letter ISO 3166-2 country codes (12.0.0.0/8,FR,CN)
  • --source-address IP β€” client-side IP address to bind to
  • -4, --force-ipv4 β€” makes all connections via IPv4
  • -6, --force-ipv6 β€” makes all connections via IPv6
  • --no-check-certificate β€” disables HTTPS certificate validation
  • -r, --limit-rate RATE β€” maximum download rate (e.g. 500k, 2.5M, or 800k-2M)
  • --chunk-size SIZE β€” size of in-memory data chunks (default: 32k)
  • --no-part β€” does not use .part files
  • --no-skip β€” does not skip downloads, it overwrites existing files
  • --no-mtime β€” does not set file modification times according to Last-Modified HTTP response headers
  • --no-download β€” does not download any files
  • --sleep SECONDS β€” number of seconds to wait before each download. can be a constant value or a range (e.g. 2.7 or 2.0-3.5)
  • --sleep-skip SECONDS β€” number of seconds to wait after skipping a file download
  • --sleep-extractor SECONDS β€” number of seconds to wait before starting data extraction for an input URL
  • --sleep-request SECONDS β€” number of seconds to wait between HTTP requests during data extraction
  • --sleep-retries [TYPE=]SECONDS β€” number of seconds to wait before retrying an HTTP request. can be prefixed with 'lin[:START[:MAX]]' or 'exp[:BASE[:START[:MAX]]]' for linear or exponential growth between consecutive retries (e.g. '30', 'exp=40', 'lin:20=30-60'
  • --sleep-429 [TYPE=]SECONDS β€” number of seconds to wait when receiving a '429 Too Many Requests' response
  • -o, --option KEY=VALUE β€” additional options. example: -o browser=firefox
  • -c, --config FILE β€” additional configuration files in default format
  • --config-json FILE β€” additional configuration files in JSON format
  • --config-yaml FILE β€” additional configuration files in YAML format
  • --config-toml FILE β€” additional configuration files in TOML format
  • --config-type TYPE β€” sets the filetype of default configuration files (json, yaml, toml)
  • --config-ignore β€” does not load default configuration files
  • --config-create β€” creates a basic configuration file
  • --config-status β€” shows configuration file status
  • --config-open β€” opens configuration file in an external application
  • --cache-file PATH β€” use PATH as the cache file
  • --cache-status β€” shows cache file information
  • --cache-show MODULE β€” shows cached values for MODULE (ALL to show all entries, EXP to show only expired entries, VAL to show only valid entries)
  • --cache-clear MODULE β€” deletes cached login sessions, cookies, etc. for MODULE (ALL to delete everything, EXP to delete only expired values)
  • --cache-vacuum β€” cleans up the cache database by removing unused space and reorganizing the data to improve performance. self-care for your cache πŸ§–
  • -u, --username USER β€” the username to login with
  • -p, --password PASS β€” the password belonging to the given username
  • --netrc β€” enables .netrc authentication data
  • -C, --cookies FILE β€” file to load additional cookies from πŸͺ
  • --cookies-export FILE β€” exports session cookies to FILE
  • --cookies-from-browser BROWSER[/DOMAIN][+KEYRING][:PROFILE][::CONTAINER] β€” name of the browser to load cookies from, with an optional domain prefixed with /, keyring name prefixed with +, profile prefixed with :, and container prefixed with :: ('none' for no container (default), 'all' for all containers)
  • -A, --abort N[:TARGET] β€” stops the current extractor(s) after N consecutive file downloads were skipped. specify a TARGET to set how many levels to ascend or which subcategory to jump to. examples: '-A 3', '-A 3:2', '-A 3:manga'
  • -T, --terminate N β€” stops the current & parent extractors and proceeds with the next input URL after N consecutive file downloads were skipped
  • --filesize-min SIZE β€” does not download files smaller than SIZE (e.g. 500k or 2.5M)
  • --filesize-max SIZE β€” does not download files larger than SIZE (e.g. 500k or 2.5M)
  • --download-archive FILE β€” records successfully downloaded files in FILE and skips downloading any file that's already in it. memory of an elephant fr fr 🐘
  • --date-before DATE β€” processes only posts created before this date, given in ISO 8601 format or as a Unix timestamp (e.g. '2025-10-31', '2026-01-09T15:30:00', '1767972600')
  • --date-after DATE β€” processes only posts created after this date. stops extraction when an older post is encountered
  • --blacklist CATEGORIES β€” ignores the given comma-separated category names or category:subcategory pairs when spawning child extractors for external URLs (e.g. 'pixiv', 'pixiv:user,*:artist')
  • --whitelist CATEGORIES β€” allows only the given comma-separated category names or category:subcategory pairs when spawning child extractors for external URLs
  • --tags-blacklist TAGS β€” ignores posts tagged with any of the tags given as a comma-separated list or as a path to a file containing them. Danbooru blacklist rules are supported. can be '/import' to use your account's blacklist. (e.g. '1girl', 'shirt,highres -blush,smile', 'C:athot.txt')
  • --tags-whitelist TAGS β€” allows only posts tagged with at least one of the tags given as a comma-separated list or a path to a file containing them
  • --range RANGE β€” index range(s) specifying which files to download. these can be a constant value, a range, or a slice (e.g. '5', '8-20', or '1:24:3')
  • --post-range RANGE β€” like '--range', but for posts
  • --child-range RANGE β€” like '--range', but for child extractors handling manga chapters, external URLs, etc.
  • --filter EXPR β€” a Python expression controlling which files to download. files for which the expression evaluates to False are ignored. the available keys are the filename-specific ones listed by '-K'. example: --filter "image_width >= 1000 and rating in ('s', 'q')"
  • --post-filter EXPR β€” like '--filter', but for posts
  • --child-filter EXPR β€” bestie it's literally --filter but for the child extractors, you know, the ones doing manga chapters and external URLs and all that extracurricular πŸ’…
  • -P, --postprocessor NAME β€” turn on the post processor you named, go off queen ✨
  • --no-postprocessors β€” nope, not a single post processor runs today, we're resting πŸ›Œ
  • -O, --postprocessor-option KEY=VALUE β€” extra options for your post processors, pass them a little something πŸŽ€
  • --write-metadata β€” drops your metadata into separate JSON files, one per file, very organized of it ✨
  • --write-info-json β€” writes the whole gallery metadata into an info.json file πŸ“
  • --write-tags β€” image tags go into their own separate text files, cute and labelled 🏷️
  • --zip β€” shove all the downloaded files into a ZIP archive πŸ—œοΈ
  • --cbz β€” same energy but a CBZ archive, comic reader girlies rise πŸ”₯
  • --mtime NAME β€” sets file modification times based on whatever metadata NAME picks out. Like 'date' or 'status[date]' πŸ‘‘
  • --rename FORMAT β€” renames files you already downloaded, going from FORMAT to whatever the current filename format is πŸ”„
  • --rename-to FORMAT β€” opposite direction bestie: from the current filename format over to FORMAT πŸ’«
  • --ugoira FMT β€” converts Pixiv Ugoira to FMT using FFmpeg. The supported formats are 'webm', 'mp4', 'gif', 'vp8', 'vp9', 'vp9-lossless', 'copy', 'zip' β€” that's the whole list, no more, no less 🎬
  • --exec CMD β€” runs CMD for every single downloaded file. The replacement fields you can use are {} or {_path}, {_temppath}, {_directory, {_filename} β€” wait no, it's {_directory}, {_filename} ok phew 😭. On Windows, use {_path_unc} or {_directory_unc} for UNC paths. Example: --exec "convert {} {}.png && rm {}" πŸ’»
  • --exec-after CMD β€” runs CMD after all the files are downloaded. Example: --exec-after "cd {_directory} && convert * ../doc.pdf" πŸŽ‰

🌸 EXAMPLES 🌸

So here's what it actually looks like in the wild, bestie:

  • gallery-dl URL β€” downloads images from that URL. That's it. That's the whole vibe πŸ’–
  • gallery-dl -g -u <username> -p <password> URL β€” prints the direct URLs from a site that needs you to log in first πŸ”
  • gallery-dl --filter 'type == "ugoira"' --range '2-4' URL β€” stacks a filter AND a range expression together. This one only downloads the second, third, and fourth file where the type value equals "ugoira" ✨
  • gallery-dl r:URL β€” scans that URL for other URLs and then invokes gallery-dl on each one it finds. Recursive queen πŸŒ€
  • gallery-dl oauth:SITE-NAME β€” gets you OAuth authentication tokens for deviantart, flickr, reddit, smugmug, and tumblr. Five sites, one little command, iconic πŸ‘‘

πŸ“ FILES πŸ“

The places it keeps its stuff:

  • /etc/gallery-dl.conf β€” the system wide configuration file. Everybody shares this one 🏫
  • ~/.config/gallery-dl/config.json β€” your own personal per user configuration file πŸ’β€β™€οΈ
  • ~/.gallery-dl.conf β€” the alternate per user configuration file, for when you're feeling different 🌈

πŸ’€ BUGS πŸ’€

Found something broken? Not me being dramatic but please tell the devs, they want to know fr fr:


πŸ‘‘ AUTHORS πŸ‘‘


πŸ”— SEE ALSO πŸ”—

  • gallery-dl.conf(5) β€” go read it bestie, it's the config page, it's giving lore πŸ“–

okay that's the whole page, you made it to the end, I'm so proud of you πŸ₯Ή this was GALLERY-DL(1), version 1.32.14, dated 2026-09-27 β€” screenshot it, bookmark it, tattoo it, whatever, just remember it πŸ’– now go download something gorgeous, mwah πŸ’…βœ¨

πŸ“¦ where this page comes from