ytdl-org/youtube-dl · error · ExtractorError
This video is private
Error message
This video is private
What it means
Raised by TikTokIE when the __NEXT_DATA__ JSON contains no itemStruct and pageProps.statusCode equals 10216, TikTok's code for a private video. Marked expected=True, so it is presented as a definitive availability error, not a bug.
Source
Thrown at youtube_dl/extractor/tiktok.py:115
'comment_count': int,
'repost_count': int,
}
}]
def _real_initialize(self):
# Setup session (will set necessary cookies)
self._request_webpage(
'https://www.tiktok.com/', None, note='Setting up session')
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
page_props = self._parse_json(self._search_regex(
r'<script[^>]+\bid=["\']__NEXT_DATA__[^>]+>\s*({.+?})\s*</script',
webpage, 'data'), video_id)['props']['pageProps']
data = try_get(page_props, lambda x: x['itemInfo']['itemStruct'], dict)
if not data and page_props.get('statusCode') == 10216:
raise ExtractorError('This video is private', expected=True)
return self._extract_video(data, video_id)
class TikTokUserIE(TikTokBaseIE):
_VALID_URL = r'https://(?:www\.)?tiktok\.com/@(?P<id>[^/?#&]+)'
_TESTS = [{
'url': 'https://www.tiktok.com/@zureeal',
'info_dict': {
'id': '188294915489964032',
},
'playlist_mincount': 24,
}]
_WORKING = False
@classmethod
def suitable(cls, url):
return False if TikTokIE.suitable(url) else super(TikTokUserIE, cls).suitable(url)
View on GitHub (pinned to 956b8c5855)
Solutions
- Open the URL in a logged-out browser incognito window; if TikTok says the video is private/unavailable, nothing to fix
- If every TikTok URL errors, your youtube-dl is too old — update to yt-dlp which actively tracks TikTok changes
- Ask the owner to make the video public or use their shared link while logged in via cookies (yt-dlp --cookies)
- In batch scripts, catch expected ExtractorError and skip
Defensive patterns
Strategy: try-catch
Try / catch
try:
ydl.extract_info(tiktok_url)
except ExtractorError as e:
if e.expected and 'private' in str(e):
skip(url) # statusCode 10216: permanent unless owner changes visibility Prevention
- Use a current yt-dlp for TikTok; the site changes weekly
- For private-account content, export an authorized session's cookies
- Do not retry private-video errors — they are terminal states
When it happens
Trigger: Extracting a tiktok.com/@user/video/<id> URL for a video the owner set to private, or an account switched to private; the session-setup request succeeds but the embed page returns statusCode 10216 instead of item data.
Common situations: Videos made private after going viral; deleted-then-private states where TikTok keeps the id; region-blocked states that surface as 10216; old youtube-dl versions whose TikTok extraction no longer works at all because TikTok changed its page structure — in that case every URL fails, not just private ones.
Related errors
- This video is private.
- Bigo says: %s (code %s)
- Video %s does not exist
- This video is DRM protected.
- No downloadable videos found
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/da1111e809b76389.
Report an issue: GitHub.