# 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

| What you see | Most likely | What to do |
| --- | --- | --- |
| Douyin `douyinvod.com` link: 403, worked this morning (issue 829) | The CDN now checks Referer | Send `Referer: https://www.douyin.com` |
| TikTok link: 403 even with Referer and UA (issue 831) | The URL is bound to the `device_id` used to fetch it and to the same session's `tt_chain_token` | Download in the same session that parsed it |
| Worked for hours, then 403 on every link | The link expired, or your IP is flagged | 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

1. Turn a share link or share text into an aweme_id with `douyin.videos.id_from_url`.
2. `douyin.videos.detail` with that `id` returns caption, author, plays, likes, comments, shares and publish time.
3. For TikTok, `tiktok.videos.detail` takes the video `id`.

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

- [Douyin video details API](https://xtikapi.com/apis/douyin/videos/detail) ($0.002 a call): One Douyin video by ID: caption, author, plays, likes, comments and shares.
- [Douyin video ID from link API](https://xtikapi.com/apis/douyin/videos/id_from_url) ($0.002 a call): Extract the aweme_id from a Douyin share link or video URL.
- [TikTok video details API](https://xtikapi.com/apis/tiktok/videos/detail) ($0.002 a call): One TikTok video by ID: caption, author, plays, likes, comments and shares.

## More about Douyin

- [Douyin API](https://xtikapi.com/apis/douyin)
- [TikTok API](https://xtikapi.com/apis/tiktok)
- [Douyin_TikTok_Download_API works locally but returns no video after Docker deploy: why?](https://xtikapi.com/answers/douyin-tiktok-api-docker-no-video)
- [How can I get the play count of a Douyin video?](https://xtikapi.com/answers/douyin-video-play-count-api)
- [How do I get the video ID from a Douyin share link?](https://xtikapi.com/answers/douyin-share-link-to-video-id)
- [Douyin scraper keeps getting CODE 429: what actually works?](https://xtikapi.com/answers/douyin-crawler-code-429)
- [MediaCrawler errors (Verifytype, Douyin page 1 empty, XHS 406, Kuaishou) & hosted alternatives?](https://xtikapi.com/answers/mediacrawler-errors-and-alternatives)
- [How do I get the videos that use a TikTok sound (music ID)?](https://xtikapi.com/answers/tiktok-api-sound-videos)

## Sources

What this page says about other products comes from their own pages and docs, read on 2026-11-21.

- [Douyin_TikTok_Download_API issue #829 (sudden 403 on parsed Douyin URLs)](https://github.com/Evil0ctal/Douyin_TikTok_Download_API/issues/829)
- [Douyin_TikTok_Download_API issue #831 (TikTok play URL 403)](https://github.com/Evil0ctal/Douyin_TikTok_Download_API/issues/831)

## 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.

---

XTikAPI: one API key for public social media data, prepaid per call. [HTML version](https://xtikapi.com/answers/douyin-video-url-403-forbidden) · [llms.txt](https://xtikapi.com/llms.txt) · [OpenAPI](https://xtikapi.com/openapi.json)
