| 1 |
.TH "GALLERY-DL" "1" "2026-08-29" "1.32.10" "gallery-dl Manual" |
| 2 |
.\" disable hyphenation |
| 3 |
.nh |
| 4 |
|
| 5 |
.SH NAME |
| 6 |
gallery-dl \- download image-galleries and -collections |
| 7 |
|
| 8 |
.SH SYNOPSIS |
| 9 |
.B gallery-dl |
| 10 |
[OPTION]... URL... |
| 11 |
|
| 12 |
.SH DESCRIPTION |
| 13 |
.B gallery-dl |
| 14 |
is a command-line program to download image-galleries and -collections |
| 15 |
from several image hosting sites. It is a cross-platform tool |
| 16 |
with many configuration options and powerful filenaming capabilities. |
| 17 |
|
| 18 |
.SH OPTIONS |
| 19 |
.TP |
| 20 |
.B "\-h, \-\-help" |
| 21 |
Print this help message and exit |
| 22 |
.TP |
| 23 |
.B "\-\-version" |
| 24 |
Print program version and exit |
| 25 |
.TP |
| 26 |
.B "\-f, \-\-filename" \f[I]FORMAT\f[] |
| 27 |
Filename format string for downloaded files ('/O' for "original" filenames) |
| 28 |
.TP |
| 29 |
.B "\-d, \-\-destination" \f[I]PATH\f[] |
| 30 |
Target location for file downloads |
| 31 |
.TP |
| 32 |
.B "\-D, \-\-directory" \f[I]PATH\f[] |
| 33 |
Exact location for file downloads |
| 34 |
.TP |
| 35 |
.B "\-\-restrict\-filenames" \f[I]VALUE\f[] |
| 36 |
Replace restricted filename characters with underscores. One of 'windows', 'windows+', 'unix', 'ascii', 'ascii+', or a custom set of characters |
| 37 |
.TP |
| 38 |
.B "\-\-windows\-filenames" |
| 39 |
Force filenames to be Windows-compatible |
| 40 |
.TP |
| 41 |
.B "\-X, \-\-extractors" \f[I]PATH\f[] |
| 42 |
Load external extractors from PATH |
| 43 |
.TP |
| 44 |
.B "\-\-compat" |
| 45 |
Restore legacy 'category' names |
| 46 |
.TP |
| 47 |
.B "\-S, \-\-server" |
| 48 |
Enable server mode. Send input URLs to a gallery-dl server or create an IPC server when no input URLs are given |
| 49 |
.TP |
| 50 |
.B "\-U, \-\-update\-check" |
| 51 |
Check if a newer version is available |
| 52 |
.TP |
| 53 |
.B "\-i, \-\-input\-file" \f[I]FILE\f[] |
| 54 |
Download URLs found in FILE ('-' for stdin). More than one --input-file can be specified |
| 55 |
.TP |
| 56 |
.B "\-I, \-\-input\-file\-comment" \f[I]FILE\f[] |
| 57 |
Download URLs found in FILE. Comment them out after they were downloaded successfully. |
| 58 |
.TP |
| 59 |
.B "\-x, \-\-input\-file\-delete" \f[I]FILE\f[] |
| 60 |
Download URLs found in FILE. Delete them after they were downloaded successfully. |
| 61 |
.TP |
| 62 |
.B "\-\-no\-input" |
| 63 |
Do not prompt for passwords/tokens |
| 64 |
.TP |
| 65 |
.B "\-q, \-\-quiet" |
| 66 |
Activate quiet mode |
| 67 |
.TP |
| 68 |
.B "\-w, \-\-warning" |
| 69 |
Print only warnings and errors |
| 70 |
.TP |
| 71 |
.B "\-v, \-\-verbose" |
| 72 |
Print various debugging information |
| 73 |
.TP |
| 74 |
.B "\-g, \-\-get\-urls" |
| 75 |
Print URLs instead of downloading |
| 76 |
.TP |
| 77 |
.B "\-G, \-\-resolve\-urls" |
| 78 |
Print URLs instead of downloading; resolve intermediary URLs |
| 79 |
.TP |
| 80 |
.B "\-j, \-\-dump\-json" |
| 81 |
Print JSON information |
| 82 |
.TP |
| 83 |
.B "\-J, \-\-resolve\-json" |
| 84 |
Print JSON information; resolve intermediary URLs |
| 85 |
.TP |
| 86 |
.B "\-s, \-\-simulate" |
| 87 |
Simulate data extraction; do not download anything |
| 88 |
.TP |
| 89 |
.B "\-E, \-\-extractor\-info" |
| 90 |
Print extractor defaults and settings |
| 91 |
.TP |
| 92 |
.B "\-K, \-\-list\-keywords" |
| 93 |
Print a list of available keywords and example values for the given URLs |
| 94 |
.TP |
| 95 |
.B "\-e, \-\-error\-file" \f[I]FILE\f[] |
| 96 |
Add input URLs which returned an error to FILE |
| 97 |
.TP |
| 98 |
.B "\-N, \-\-print" \f[I][EVENT:]FORMAT\f[] |
| 99 |
Write FORMAT during EVENT (default 'prepare') to standard output instead of downloading files. Can be used multiple times. Examples: 'id' or 'post:{md5[:8]}' |
| 100 |
.TP |
| 101 |
.B "\-\-Print" \f[I][EVENT:]FORMAT\f[] |
| 102 |
Like --print, but downloads files as well |
| 103 |
.TP |
| 104 |
.B "\-\-print\-to\-file" \f[I][EVENT:]FORMAT FILE\f[] |
| 105 |
Append FORMAT during EVENT to FILE instead of downloading files. Can be used multiple times |
| 106 |
.TP |
| 107 |
.B "\-\-Print\-to\-file" \f[I][EVENT:]FORMAT FILE\f[] |
| 108 |
Like --print-to-file, but downloads files as well |
| 109 |
.TP |
| 110 |
.B "\-\-list\-modules" |
| 111 |
Print a list of available extractor modules |
| 112 |
.TP |
| 113 |
.B "\-\-list\-extractors" \f[I][CATEGORIES]\f[] |
| 114 |
Print a list of extractor classes with description, (sub)category and example URL |
| 115 |
.TP |
| 116 |
.B "\-\-write\-log" \f[I]FILE\f[] |
| 117 |
Write logging output to FILE |
| 118 |
.TP |
| 119 |
.B "\-\-write\-unsupported" \f[I]FILE\f[] |
| 120 |
Write URLs, which get emitted by other extractors but cannot be handled, to FILE |
| 121 |
.TP |
| 122 |
.B "\-\-write\-pages" |
| 123 |
Write downloaded intermediary pages to files in the current directory to debug problems |
| 124 |
.TP |
| 125 |
.B "\-\-print\-traffic" |
| 126 |
Display sent and read HTTP traffic |
| 127 |
.TP |
| 128 |
.B "\-\-no\-colors" |
| 129 |
Do not emit ANSI color codes in output |
| 130 |
.TP |
| 131 |
.B "\-R, \-\-retries" \f[I]N\f[] |
| 132 |
Maximum number of retries for failed HTTP requests or -1 for infinite retries (default: 4) |
| 133 |
.TP |
| 134 |
.B "\-a, \-\-user\-agent" \f[I]UA\f[] |
| 135 |
User-Agent request header |
| 136 |
.TP |
| 137 |
.B "\-\-http\-timeout" \f[I]SECONDS\f[] |
| 138 |
Timeout for HTTP connections (default: 30.0) |
| 139 |
.TP |
| 140 |
.B "\-\-proxy" \f[I]URL\f[] |
| 141 |
Use the specified proxy |
| 142 |
.TP |
| 143 |
.B "\-\-xff" \f[I]VALUE\f[] |
| 144 |
Use 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) |
| 145 |
.TP |
| 146 |
.B "\-\-source\-address" \f[I]IP\f[] |
| 147 |
Client-side IP address to bind to |
| 148 |
.TP |
| 149 |
.B "\-4, \-\-force\-ipv4" |
| 150 |
Make all connections via IPv4 |
| 151 |
.TP |
| 152 |
.B "\-6, \-\-force\-ipv6" |
| 153 |
Make all connections via IPv6 |
| 154 |
.TP |
| 155 |
.B "\-\-no\-check\-certificate" |
| 156 |
Disable HTTPS certificate validation |
| 157 |
.TP |
| 158 |
.B "\-r, \-\-limit\-rate" \f[I]RATE\f[] |
| 159 |
Maximum download rate (e.g. 500k, 2.5M, or 800k-2M) |
| 160 |
.TP |
| 161 |
.B "\-\-chunk\-size" \f[I]SIZE\f[] |
| 162 |
Size of in-memory data chunks (default: 32k) |
| 163 |
.TP |
| 164 |
.B "\-\-no\-part" |
| 165 |
Do not use .part files |
| 166 |
.TP |
| 167 |
.B "\-\-no\-skip" |
| 168 |
Do not skip downloads; overwrite existing files |
| 169 |
.TP |
| 170 |
.B "\-\-no\-mtime" |
| 171 |
Do not set file modification times according to Last-Modified HTTP response headers |
| 172 |
.TP |
| 173 |
.B "\-\-no\-download" |
| 174 |
Do not download any files |
| 175 |
.TP |
| 176 |
.B "\-\-sleep" \f[I]SECONDS\f[] |
| 177 |
Number of seconds to wait before each download. This can be either a constant value or a range (e.g. 2.7 or 2.0-3.5) |
| 178 |
.TP |
| 179 |
.B "\-\-sleep\-skip" \f[I]SECONDS\f[] |
| 180 |
Number of seconds to wait after skipping a file download |
| 181 |
.TP |
| 182 |
.B "\-\-sleep\-extractor" \f[I]SECONDS\f[] |
| 183 |
Number of seconds to wait before starting data extraction for an input URL |
| 184 |
.TP |
| 185 |
.B "\-\-sleep\-request" \f[I]SECONDS\f[] |
| 186 |
Number of seconds to wait between HTTP requests during data extraction |
| 187 |
.TP |
| 188 |
.B "\-\-sleep\-retries" \f[I][TYPE=]SECONDS\f[] |
| 189 |
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' |
| 190 |
.TP |
| 191 |
.B "\-\-sleep\-429" \f[I][TYPE=]SECONDS\f[] |
| 192 |
Number of seconds to wait when receiving a '429 Too Many Requests' response |
| 193 |
.TP |
| 194 |
.B "\-o, \-\-option" \f[I]KEY=VALUE\f[] |
| 195 |
Additional options. Example: -o browser=firefox |
| 196 |
.TP |
| 197 |
.B "\-c, \-\-config" \f[I]FILE\f[] |
| 198 |
Additional configuration files in default format |
| 199 |
.TP |
| 200 |
.B "\-\-config\-json" \f[I]FILE\f[] |
| 201 |
Additional configuration files in JSON format |
| 202 |
.TP |
| 203 |
.B "\-\-config\-yaml" \f[I]FILE\f[] |
| 204 |
Additional configuration files in YAML format |
| 205 |
.TP |
| 206 |
.B "\-\-config\-toml" \f[I]FILE\f[] |
| 207 |
Additional configuration files in TOML format |
| 208 |
.TP |
| 209 |
.B "\-\-config\-type" \f[I]TYPE\f[] |
| 210 |
Set filetype of default configuration files (json, yaml, toml) |
| 211 |
.TP |
| 212 |
.B "\-\-config\-ignore" |
| 213 |
Do not load default configuration files |
| 214 |
.TP |
| 215 |
.B "\-\-config\-create" |
| 216 |
Create a basic configuration file |
| 217 |
.TP |
| 218 |
.B "\-\-config\-status" |
| 219 |
Show configuration file status |
| 220 |
.TP |
| 221 |
.B "\-\-config\-open" |
| 222 |
Open configuration file in external application |
| 223 |
.TP |
| 224 |
.B "\-\-cache\-file" \f[I]PATH\f[] |
| 225 |
Use PATH as cache file |
| 226 |
.TP |
| 227 |
.B "\-\-cache\-status" |
| 228 |
Show cache file information |
| 229 |
.TP |
| 230 |
.B "\-\-cache\-show" \f[I]MODULE\f[] |
| 231 |
Show cached values for MODULE (ALL to show all entries, EXP to show only expired entries, VAL to show only valid entries) |
| 232 |
.TP |
| 233 |
.B "\-\-cache\-clear" \f[I]MODULE\f[] |
| 234 |
Delete cached login sessions, cookies, etc. for MODULE (ALL to delete everything, EXP to delete only expired values) |
| 235 |
.TP |
| 236 |
.B "\-\-cache\-vacuum" |
| 237 |
Clean up the cache database by removing unused space and reorganizing the data to improve performance |
| 238 |
.TP |
| 239 |
.B "\-u, \-\-username" \f[I]USER\f[] |
| 240 |
Username to login with |
| 241 |
.TP |
| 242 |
.B "\-p, \-\-password" \f[I]PASS\f[] |
| 243 |
Password belonging to the given username |
| 244 |
.TP |
| 245 |
.B "\-\-netrc" |
| 246 |
Enable .netrc authentication data |
| 247 |
.TP |
| 248 |
.B "\-C, \-\-cookies" \f[I]FILE\f[] |
| 249 |
File to load additional cookies from |
| 250 |
.TP |
| 251 |
.B "\-\-cookies\-export" \f[I]FILE\f[] |
| 252 |
Export session cookies to FILE |
| 253 |
.TP |
| 254 |
.B "\-\-cookies\-from\-browser" \f[I]BROWSER[/DOMAIN][+KEYRING][:PROFILE][::CONTAINER]\f[] |
| 255 |
Name of the browser to load cookies from, with optional domain prefixed with '/', keyring name prefixed with '+', profile prefixed with ':', and container prefixed with '::' ('none' for no container (default), 'all' for all containers) |
| 256 |
.TP |
| 257 |
.B "\-A, \-\-abort" \f[I]N[:TARGET]\f[] |
| 258 |
Stop current extractor(s) after N consecutive file downloads were skipped. Specify a TARGET to set how many levels to ascend or to which subcategory to jump to. Examples: '-A 3', '-A 3:2', '-A 3:manga' |
| 259 |
.TP |
| 260 |
.B "\-T, \-\-terminate" \f[I]N\f[] |
| 261 |
Stop current & parent extractors and proceed with the next input URL after N consecutive file downloads were skipped |
| 262 |
.TP |
| 263 |
.B "\-\-filesize\-min" \f[I]SIZE\f[] |
| 264 |
Do not download files smaller than SIZE (e.g. 500k or 2.5M) |
| 265 |
.TP |
| 266 |
.B "\-\-filesize\-max" \f[I]SIZE\f[] |
| 267 |
Do not download files larger than SIZE (e.g. 500k or 2.5M) |
| 268 |
.TP |
| 269 |
.B "\-\-download\-archive" \f[I]FILE\f[] |
| 270 |
Record successfully downloaded files in FILE and skip downloading any file already in it |
| 271 |
.TP |
| 272 |
.B "\-\-date\-before" \f[I]DATE\f[] |
| 273 |
Process only posts created before this date given in ISO 8601 format or as Unix timestamp (e.g. '2025-10-31', '2026-01-09T15:30:00', '1767972600') |
| 274 |
.TP |
| 275 |
.B "\-\-date\-after" \f[I]DATE\f[] |
| 276 |
Process only posts created after this date. Stop extraction when an older post is encountered |
| 277 |
.TP |
| 278 |
.B "\-\-blacklist" \f[I]CATEGORIES\f[] |
| 279 |
Ignore the given comma-separated category names or category:subcategory pairs when spawning child extractors for external URLs (e.g. 'pixiv', 'pixiv:user,*:artist') |
| 280 |
.TP |
| 281 |
.B "\-\-whitelist" \f[I]CATEGORIES\f[] |
| 282 |
Allow only the given comma-separated category names or category:subcategory pairs to allow when spawning child extractors for external URLs |
| 283 |
.TP |
| 284 |
.B "\-\-tags\-blacklist" \f[I]TAGS\f[] |
| 285 |
Ignore posts tagged with any of the tags given as comma-separated list or 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:\path\to\list.txt') |
| 286 |
.TP |
| 287 |
.B "\-\-tags\-whitelist" \f[I]TAGS\f[] |
| 288 |
Allow only posts tagged with at least one of the tags given as comma-separated list or path to a file containing them |
| 289 |
.TP |
| 290 |
.B "\-\-range" \f[I]RANGE\f[] |
| 291 |
Index range(s) specifying which files to download. These can be either a constant value, range, or slice (e.g. '5', '8-20', or '1:24:3') |
| 292 |
.TP |
| 293 |
.B "\-\-post\-range" \f[I]RANGE\f[] |
| 294 |
Like '--range', but for posts |
| 295 |
.TP |
| 296 |
.B "\-\-child\-range" \f[I]RANGE\f[] |
| 297 |
Like '--range', but for child extractors handling manga chapters, external URLs, etc. |
| 298 |
.TP |
| 299 |
.B "\-\-filter" \f[I]EXPR\f[] |
| 300 |
Python expression controlling which files to download. Files for which the expression evaluates to False are ignored. Available keys are the filename-specific ones listed by '-K'. Example: --filter "image_width >= 1000 and rating in ('s', 'q')" |
| 301 |
.TP |
| 302 |
.B "\-\-post\-filter" \f[I]EXPR\f[] |
| 303 |
Like '--filter', but for posts |
| 304 |
.TP |
| 305 |
.B "\-\-child\-filter" \f[I]EXPR\f[] |
| 306 |
Like '--filter', but for child extractors handling manga chapters, external URLs, etc. |
| 307 |
.TP |
| 308 |
.B "\-P, \-\-postprocessor" \f[I]NAME\f[] |
| 309 |
Activate the specified post processor |
| 310 |
.TP |
| 311 |
.B "\-\-no\-postprocessors" |
| 312 |
Do not run any post processors |
| 313 |
.TP |
| 314 |
.B "\-O, \-\-postprocessor\-option" \f[I]KEY=VALUE\f[] |
| 315 |
Additional post processor options |
| 316 |
.TP |
| 317 |
.B "\-\-write\-metadata" |
| 318 |
Write metadata to separate JSON files |
| 319 |
.TP |
| 320 |
.B "\-\-write\-info\-json" |
| 321 |
Write gallery metadata to a info.json file |
| 322 |
.TP |
| 323 |
.B "\-\-write\-tags" |
| 324 |
Write image tags to separate text files |
| 325 |
.TP |
| 326 |
.B "\-\-zip" |
| 327 |
Store downloaded files in a ZIP archive |
| 328 |
.TP |
| 329 |
.B "\-\-cbz" |
| 330 |
Store downloaded files in a CBZ archive |
| 331 |
.TP |
| 332 |
.B "\-\-mtime" \f[I]NAME\f[] |
| 333 |
Set file modification times according to metadata selected by NAME. Examples: 'date' or 'status[date]' |
| 334 |
.TP |
| 335 |
.B "\-\-rename" \f[I]FORMAT\f[] |
| 336 |
Rename previously downloaded files from FORMAT to the current filename format |
| 337 |
.TP |
| 338 |
.B "\-\-rename\-to" \f[I]FORMAT\f[] |
| 339 |
Rename previously downloaded files from the current filename format to FORMAT |
| 340 |
.TP |
| 341 |
.B "\-\-ugoira" \f[I]FMT\f[] |
| 342 |
Convert Pixiv Ugoira to FMT using FFmpeg. Supported formats are 'webm', 'mp4', 'gif', 'vp8', 'vp9', 'vp9-lossless', 'copy', 'zip'. |
| 343 |
.TP |
| 344 |
.B "\-\-exec" \f[I]CMD\f[] |
| 345 |
Execute CMD for each downloaded file. Supported replacement fields are {} or {_path}, {_temppath}, {_directory}, {_filename}. On Windows, use {_path_unc} or {_directory_unc} for UNC paths. Example: --exec "convert {} {}.png && rm {}" |
| 346 |
.TP |
| 347 |
.B "\-\-exec\-after" \f[I]CMD\f[] |
| 348 |
Execute CMD after all files were downloaded. Example: --exec-after "cd {_directory} && convert * ../doc.pdf" |
| 349 |
|
| 350 |
.SH EXAMPLES |
| 351 |
.TP |
| 352 |
gallery-dl \f[I]URL\f[] |
| 353 |
Download images from \f[I]URL\f[]. |
| 354 |
.TP |
| 355 |
gallery-dl -g -u <username> -p <password> \f[I]URL\f[] |
| 356 |
Print direct URLs from a site that requires authentication. |
| 357 |
.TP |
| 358 |
gallery-dl --filter 'type == "ugoira"' --range '2-4' \f[I]URL\f[] |
| 359 |
Apply filter and range expressions. This will only download |
| 360 |
the second, third, and fourth file where its type value is equal to "ugoira". |
| 361 |
.TP |
| 362 |
gallery-dl r:\f[I]URL\f[] |
| 363 |
Scan \f[I]URL\f[] for other URLs and invoke \f[B]gallery-dl\f[] on them. |
| 364 |
.TP |
| 365 |
gallery-dl oauth:\f[I]SITE\-NAME\f[] |
| 366 |
Gain OAuth authentication tokens for |
| 367 |
.IR deviantart , |
| 368 |
.IR flickr , |
| 369 |
.IR reddit , |
| 370 |
.IR smugmug ", and" |
| 371 |
.IR tumblr . |
| 372 |
|
| 373 |
.SH FILES |
| 374 |
.TP |
| 375 |
.I /etc/gallery-dl.conf |
| 376 |
The system wide configuration file. |
| 377 |
.TP |
| 378 |
.I ~/.config/gallery-dl/config.json |
| 379 |
Per user configuration file. |
| 380 |
.TP |
| 381 |
.I ~/.gallery-dl.conf |
| 382 |
Alternate per user configuration file. |
| 383 |
|
| 384 |
.SH BUGS |
| 385 |
https://codeberg.org/mikf/gallery-dl/issues |
| 386 |
https://github.com/mikf/gallery-dl/issues |
| 387 |
|
| 388 |
.SH AUTHORS |
| 389 |
Mike Fährmann <[email protected]> |
| 390 |
.br |
| 391 |
and https://github.com/mikf/gallery-dl/graphs/contributors |
| 392 |
|
| 393 |
.SH "SEE ALSO" |
| 394 |
.BR gallery-dl.conf (5) |