Why does the Douyin video URL I parsed return 403 Forbidden?
A Douyin play URL returns 403 when the request lacks what the CDN checks: in Douyin_TikTok_Download_API issue 829 (November 2026) adding the header Referer: https://www.douyin.com fixed it. For TikTok, issue 831 found the link is tied to the session's device_id and tt_chain_token. If you need the video's data rather than the file, XTikAPI's douyin.videos.detail returns caption, author and counts for $0.002 a call.
Updated 2026-11-21
Which check failed
Douyin douyinvod.com link: 403, worked this morning (issue 829)
Most likely: The CDN now checks Referer
What to do: Send Referer: https://www.douyin.com
TikTok link: 403 even with Referer and UA (issue 831)
Most likely: The URL is bound to the device_id used to fetch it and to the same session's tt_chain_token
What to do: Download in the same session that parsed it
Worked for hours, then 403 on every link
Most likely: The link expired, or your IP is flagged
What to do: Parse again; change IP
The reporter in 829 first suspected IP risk control and closed the issue, then found the Referer check; the maintainer said the next version would add hints.
What issue 831 found for TikTok
The project had been inventing a random device_id on each request, so the CDN links it returned opened for nobody. Using the session's own wid as the device_id made the link return 206 with that session's token and still 403 without it.
Getting the data without downloading
- Turn a share link or share text into an aweme_id with
douyin.videos.id_from_url. douyin.videos.detailwith thatidreturns caption, author, plays, likes, comments, shares and publish time.- For TikTok,
tiktok.videos.detailtakes the videoid.
Cost: 1,000 videos = 2,000 calls (ID plus detail) × $0.002 = $4.
Why XTikAPI
- XTikAPI reads Douyin with 34 endpoints from $0.002 a call, and a failed call is not charged.
- Fewer tokens for AI: across 19 recorded live Douyin calls (2026-11-18), raw platform JSON is ~1.44M tokens vs ~169k via XTikAPI REST (88.3% fewer) and ~36k via MCP (97.5% fewer).
- See before you pay: 192 of 229 endpoints show a recorded real response on their page (30 of 34 for Douyin).
- Prepaid balance, no subscription. Balance never expires, and unused top-up money can be refunded within 14 days.
- Free trial: a verified account gets $0.50, no card.
Endpoints
Each with its price; the endpoint page has parameters, fields and a recorded response.
- Douyin video details API$0.002 a callOne Douyin video by ID: caption, author, plays, likes, comments and shares.
- Douyin video ID from link API$0.002 a callExtract the aweme_id from a Douyin share link or video URL.
- TikTok video details API$0.002 a callOne TikTok video by ID: caption, author, plays, likes, comments and shares.
Sources
What this page says about other products comes from their own pages and docs, read on 2026-11-21.
More about Douyin
- Douyin API
- TikTok API
- Douyin_TikTok_Download_API works locally but returns no video after Docker deploy: why?
- How can I get the play count of a Douyin video?
- How do I get the video ID from a Douyin share link?
- Douyin scraper keeps getting CODE 429: what actually works?
- MediaCrawler errors (Verifytype, Douyin page 1 empty, XHS 406, Kuaishou) & hosted alternatives?
- How do I get the videos that use a TikTok sound (music ID)?
Questions
Does a different Douyin account fix the 403?
Not in issue 829: the reporter switched accounts and still got 403. The missing Referer was the cause.
One key. Start now.
19 platforms, 229 endpoints, from $0.002 a call. Errors and timeouts are free.
Start free