ytdlp.org
On this page

Platform guide

How to download Bandcamp tracks with yt-dlp

Bandcamp downloads mostly just work from the track or album URL - except for one error that started showing up in late 2026, where yt-dlp says it is "attempting impersonation" and then stops. That is the first thing to fix; the rest is about albums, art and what quality you actually get.

Quick answer

# one track
yt-dlp "https://<artist>.bandcamp.com/track/<track>"

# a whole album, in order, in its own folder, with cover art embedded
yt-dlp -o "%(album)s/%(track_number)02d - %(title)s.%(ext)s" \
  --embed-thumbnail --embed-metadata \
  "https://<artist>.bandcamp.com/album/<album>"

We ran this in November 2026 (yt-dlp 2026.11.23) against a public track: it saved a mp3-128 file with the title and artist tags set. For MP3 you do not need -x --audio-format mp3 - Bandcamp already streams MP3, so re-encoding only loses quality.

"The extractor is attempting impersonation, but no impersonate target is available"

This is the error most people hit first:

ERROR: [Bandcamp] <id>: The extractor is attempting impersonation, but no impersonate target is available.

Bandcamp now answers some requests with a "Client Challenge" page, and the Bandcamp extractor responds by retrying with browser impersonation. If your yt-dlp has no impersonation backend installed, it has nothing to retry with, so it errors out instead (reported in yt-dlp#18029). A bare pip install yt-dlp does not include it; the standalone binary builds do.

Install the impersonation backend and the error goes away:

pip install -U "yt-dlp[default,curl-cffi]"

Then confirm yt-dlp can see the targets:

yt-dlp --list-impersonate-targets
# Client      OS          Source
# Chrome-136  Macos-15    curl_cffi
# Safari-18.0 Ios-18.0    curl_cffi
# ...

An empty list means curl_cffi still is not installed in the same environment yt-dlp runs in - common when yt-dlp is on your PATH from one Python and you pip installed into another. Reinstall into the interpreter that owns yt-dlp, or switch to the standalone binary. If you ever need to force a specific client, --impersonate chrome works once a target is listed, but you rarely need to set it by hand.

Albums, discographies and art

yt-dlp treats an album and an artist's whole catalog as playlists:

# every track on an album
yt-dlp "https://<artist>.bandcamp.com/album/<album>"

# the artist's entire discography (walks every release on /music)
yt-dlp -o "%(artist)s/%(album)s/%(track_number)02d - %(title)s.%(ext)s" \
  "https://<artist>.bandcamp.com/music"

# see what a URL contains before downloading anything
yt-dlp --flat-playlist --print "%(url)s" "https://<artist>.bandcamp.com/music"

The square cover art comes down with --embed-thumbnail (embedded in the file) or --write-thumbnail (saved beside it). Add --download-archive done.txt when you grab a big catalog so a rerun skips what you already have - more in the playlist guide.

What quality you actually get

yt-dlp -F on a public track lists a single stream:

ID      EXT RESOLUTION | TBR  PROTO | ACODEC ABR
mp3-128 mp3 audio only | 128k https | mp3    128k

That 128 kbps MP3 is the public streaming file, and it is all a public URL exposes. The lossless and 320 kbps files Bandcamp sells are released only after purchase, from your collection page - no -f or --audio-quality flag pulls them from a public track page, because the server never offers them there. For the files you paid for, use the download links on your Bandcamp collection/purchases page.

Other things that come up

  • Private or unreleased links: use the full secret URL the artist shared (it carries a token). yt-dlp passes the token through; a trimmed URL 404s.
  • Name-your-price "free" tracks: these stream like any public track, so the track URL works directly - you do not need to go through the email-for-download flow to get the 128k stream.
  • Geo-blocked releases: some labels restrict tracks by country; yt-dlp reports the restriction rather than downloading, and the request has to come from a country where it plays.
  • HTTP 429 on a big catalog: slow down with --sleep-requests 1 --sleep-interval 3 and resume with a download archive. See avoiding rate limits and blocks.

The mistake to avoid

If the impersonation error shows up, do not start swapping -f formats or adding cookies - none of that is the problem. The one fix is installing the curl-cffi extra (or using a binary build) so yt-dlp can clear the challenge. Everything else about Bandcamp is a normal playlist download.

If you take Bandcamp (or any audio) links users paste and need the file on a server or inside an app, the hosted download API does the same job from a single call - you send the URL and get the audio file back, with the challenge handling kept on their side.

Recurring sources

Pulling from the same sources on repeat?

Paste a link to preview what a maintained import API returns for it — across 1,000+ sites.

Building this into an app? See the API your backend calls instead

Frequently asked questions

How do I fix "The extractor is attempting impersonation, but no impersonate target is available" on Bandcamp?

Bandcamp started answering yt-dlp with a Client Challenge page, and the extractor needs browser impersonation (curl_cffi) to get past it. Reinstall yt-dlp with the curl-cffi extra: pip install -U "yt-dlp[default,curl-cffi]". Then yt-dlp --list-impersonate-targets should list Chrome and Safari targets, and the download works again. A standalone/binary build already bundles it; a bare pip install does not.

What audio quality does yt-dlp get from a Bandcamp URL?

A public track page streams 128 kbps MP3, and that is what yt-dlp downloads (format mp3-128). The higher-quality and lossless files (FLAC, 320 MP3) are only released after you buy the track, from your collection page - a public URL cannot reach them, no matter the flags.

How do I download a whole Bandcamp album or an artist's discography?

Point yt-dlp at the album URL (.../album/<name>) and it downloads every track. Point it at the artist's /music page and it walks the whole discography. Use -o "%(album)s/%(track_number)02d - %(title)s.%(ext)s" to keep albums in folders and tracks in order.

Can yt-dlp download tracks I bought on Bandcamp?

The purchased files live on your collection page behind a login. Pass a logged-in session with --cookies-from-browser, but a public track URL still only streams the 128k MP3. For the lossless files you paid for, the download links on your collection/purchases page are the reliable route.