# How to download TikTok videos with yt-dlp

Download TikTok videos with yt-dlp: the basic command, format and metadata notes, the 403 you get when cookies and User-Agent don't match, and what fails — region blocks, private accounts, photo slideshows.

TikTok is one of the easier platforms for yt-dlp: for a normal public video, the share URL works directly with no extra flags. The catches show up around the edges — region-blocked content, private accounts, and TikTok's photo-mode posts, which are not videos at all.

## Quick answer

```bash
yt-dlp "https://www.tiktok.com/@user/video/1234567890"
```

Paste the video URL as-is — the standard web URL from the share button works directly. Short vm.tiktok.com share links also resolve; yt-dlp follows the redirect.

## Quality and formats

TikTok usually serves a handful of MP4 renditions, sometimes including a version without the burned-in watermark. What is available varies by video and region, so check before assuming:

```bash
yt-dlp -F "https://www.tiktok.com/@user/video/1234567890"
```

The default selection picks the best available quality, so most people never need `-f` here. Use it only when the list shows a specific rendition you want.

## Metadata is unusually rich

TikTok extraction returns solid metadata: uploader handle, the full description including hashtags, upload date, and engagement counts. That makes output templates like `-o "%(uploader)s - %(title)s.%(ext)s"` work well, and `--write-info-json` gives you the whole record if you are feeding a pipeline. Long captions in other scripts can push the file name past the 255-byte limit on Linux, so in a pipeline cap the title by bytes: `%(title).150B` (see [Fix "File name too long"](/guides/yt-dlp-file-name-too-long)).

## What commonly fails

- **Region-blocked videos.** Some content is only served in certain countries. If a video plays for someone else but errors for you, geography is the first suspect.
- **Private accounts.** If the account is private, the video is not reachable without an authenticated session that follows it — there is no flag that gets around this.
- **Photo-mode slideshows.** These are image carousels with music, not videos, and their `/photo/` links fail with "Unsupported URL". There's a workaround for the audio; see the next section.

## TikTok photo posts: "Unsupported URL"

A photo post (a slideshow of images with a sound) has a link like `tiktok.com/@user/photo/<id>`. yt-dlp's TikTok extractor only matches `/video/` links, so the URL falls through to the generic extractor and fails:

```bash
$ yt-dlp "https://www.tiktok.com/@user/photo/7689250607613463829"
[generic] 7689250607613463829: Extracting information
ERROR: Unsupported URL: https://www.tiktok.com/@user/photo/7689250607613463829
```

Both open requests for this on the tracker are still open as of yt-dlp 2026.11.23 ([yt-dlp#10870](https://github.com/yt-dlp/yt-dlp/issues/10870), [yt-dlp#15764](https://github.com/yt-dlp/yt-dlp/issues/15764)). Until one lands, replace `/photo/` with `/video/` and keep the same user and ID. The TikTok extractor then takes it and returns the post's sound as the only format:

```bash
$ yt-dlp -F "https://www.tiktok.com/@user/video/7689250607613463829"
ID    EXT RESOLUTION | PROTO | VCODEC     ACODEC
------------------------------------------------
audio m4a audio only | https | audio only aac

$ yt-dlp "https://www.tiktok.com/@user/video/7689250607613463829"
```

That gives you an `.m4a` of the sound plus the usual metadata (caption, uploader, counts, cover thumbnail with `--write-thumbnail`). It doesn't give you the images. A short `vm.tiktok.com` or `tiktok.com/t/` link to a photo post fails the same way, and the error prints the full `/photo/` URL it redirected to, so copy that and swap the path.

In a script that takes links from users, do the swap before you call yt-dlp:

```python
import re

def tiktok_photo_to_video(url: str) -> str:
    return re.sub(r"(tiktok\.com/@[\w.-]*)/photo/(\d+)", r"\1/video/\2", url)
```

If you're building an app that accepts TikTok links, Importly's API takes photo post links as they are and returns [the audio and metadata](https://www.importly.io/docs/features/supported-sites?utm_source=ytdlp.org&utm_medium=referral&utm_campaign=doc-cta&utm_content=tiktok-photo-post&utm_term=%2Fguides%2Fyt-dlp-for-tiktok), short links included.

## Cookies stop working on TikTok (403 with cookies, fine without)

A pattern reported in November 2026: a TikTok video downloads fine with no cookies, but as soon as you add browser cookies you get this:

```bash
ERROR: [TikTok] 7705071818968730898: Unable to download webpage: HTTP Error 403: Forbidden
```

TikTok's logged-in cookies only work when the request carries the same User-Agent as the browser they were exported from. The yt-dlp maintainers retitled the report to exactly that ([yt-dlp#18045](https://github.com/yt-dlp/yt-dlp/issues/18045)). The usual way to hit it is a script with a hard-coded, years-old Chrome User-Agent next to cookies from a current browser.

**First, check whether you need cookies at all.** For public videos you don't. Remove them, and remove any custom User-Agent too; yt-dlp already sends the headers TikTok expects.

**If you do need them** (age-restricted or login-only posts), send the browser's exact User-Agent with its cookies. Find it by opening DevTools in that browser and running `navigator.userAgent` in the console, then:

```bash
yt-dlp --cookies-from-browser chrome \
  --add-headers "User-Agent:<paste navigator.userAgent here>" \
  "https://www.tiktok.com/@user/video/1234567890"
```

`--user-agent` from older guides still works, but current releases list `--add-headers` instead. The reporter also added `--impersonate chrome`, which needs `curl_cffi` installed (check with `yt-dlp --list-impersonate-targets`, and see [fix "no impersonate target is available"](/guides/fix-no-impersonate-target) to install it). From Python the same setup looks like this:

```python
import yt_dlp
from yt_dlp.networking.impersonate import ImpersonateTarget

opts = {
    "cookiesfrombrowser": ("chrome",),
    "http_headers": {"User-Agent": "<the same browser's navigator.userAgent>"},
    "impersonate": ImpersonateTarget.from_str("chrome"),  # needs curl_cffi
}

with yt_dlp.YoutubeDL(opts) as ydl:
    ydl.download(["https://www.tiktok.com/@user/video/1234567890"])
```

Browsers update every few weeks, so a pinned User-Agent goes stale again. If this runs inside an app, read it from the same browser each time you refresh the cookies, or keep cookies out of the path for public videos. See [using cookies with yt-dlp](/guides/yt-dlp-cookies) for the browser and profile options. If your app only needs the MP4 from public TikTok links your users paste, Importly's docs have a [Node script that takes the link and saves the video](https://www.importly.io/docs/recipes/tiktok-video-node?utm_source=ytdlp.org&utm_medium=referral&utm_campaign=doc-cta&utm_content=tiktok-node-recipe&utm_term=%2Fguides%2Fyt-dlp-for-tiktok), with no cookies or User-Agent to keep in sync.

## The mistake to avoid

Do not loop over an entire profile at full speed from a single IP. TikTok rate-limits aggressively, and a burst of rapid requests turns working downloads into empty responses and blocks. If you are grabbing many videos, slow down with `--sleep-requests` and spread the work out.

<DocCta variant="recurring-source" />

<Faq />

## Related guides

- [Use yt-dlp for YouTube](/guides/yt-dlp-for-youtube)
- [Batch download with yt-dlp](/guides/batch-download)
- [Fix "HTTP Error 403: Forbidden"](/guides/fix-http-error-403)
- [Use cookies with yt-dlp](/guides/yt-dlp-cookies)
- [Use yt-dlp from Python](/guides/yt-dlp-python)