> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Where is the highest-quality Douyin video URL, and why does it expire?

> Read the highest-quality Douyin playback URL from data.original_video_url in douyin.app.v3.fetch_video_high_quality_play_url, verify video_id locally, and refresh signed URLs when they expire.

The highest-quality Douyin video URL is `data.original_video_url` in the response of `douyin.app.v3.fetch_video_high_quality_play_url`. Request one identified video, then save a **matched playback record** rather than pasting a bare URL into a spreadsheet. Because `data.original_video_url` is signed and can expire, request a fresh URL when you need playback access later. `playback_record.py` runs a local identity check that writes a private playback JSON and a URL-free review summary without downloading or publishing the video.

## Which input avoids buying the same lookup twice?

| What you already have       | What to submit                    | What not to do                                                   |
| --------------------------- | --------------------------------- | ---------------------------------------------------------------- |
| Original video ID           | `aweme_id` as a string            | Do not buy a separate share-link resolution                      |
| Actual share URL but no ID  | `share_url` instead of `aweme_id` | Do not send a fabricated ID or another creator’s profile         |
| A saved successful response | Run `playback_record.py` locally  | Do not call the endpoint again just to reformat a saved response |

`region` is the ISO country code of the request exit, such as CN, US or HK. `region` is not a content-language or creator-location filter. For viewing in mainland China, set CN explicitly; without `region`, the service's own exit is used. No `region` value guarantees that every returned CDN URL plays in every location.

Looking up ten videos once takes ten requests, and each URL refresh adds a request. See [BeatAPI pricing](https://beatapi.io/pricing).

## How do I request and preserve one result?

Save the JSON below as `request.json`, and replace the placeholder with your actual ID. Use only one input form: when starting from a share URL, replace the `aweme_id` entry with `share_url`. Keep the API key in a local environment variable, never in the JSON or a shared document.

```json
{"action":"douyin.app.v3.fetch_video_high_quality_play_url","params":{"aweme_id":"YOUR_REAL_VIDEO_ID","region":"CN"}}
```

```bash
mkdir playback-call &&
curl --fail-with-body -sS https://api.beatapi.io/v1/social-data/call \
  -H "Authorization: Bearer $BEATAPI_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @request.json \
  -D playback-call/headers.txt \
  -o playback-call/response.json
```

The new folder keeps an earlier observation from being overwritten. A failed HTTP request or a failed response envelope is a failed lookup, not a usable media result. Keep the failed lookup's request ID for diagnosis; do not loop over regions or keep buying replacement lookups.

## How do I check the identity and hand off the result?

Save the script below as `playback_record.py` and run `python3 playback_record.py playback-call/response.json YOUR_REAL_VIDEO_ID playback-review`. For a share-URL lookup, first compare the returned `video_id` with the post the share link actually opens. Passing an ID copied from the response only proves the response is internally consistent; only the comparison with the opened post shows you selected the right post.

```python
import hashlib,json,math,pathlib,sys
from urllib.parse import urlsplit
raw_path=pathlib.Path(sys.argv[1]);expected=sys.argv[2];out=pathlib.Path(sys.argv[3])
def video_id(value):
    return isinstance(value,str) and value.isascii() and value.isdigit() and any(c!='0' for c in value)
if not video_id(expected):raise ValueError('Expected original nonzero ASCII video ID')
raw=raw_path.read_bytes();response=json.loads(raw)
if not isinstance(response,dict) or response.get('status')!='succeeded' or response.get('action')!='douyin.app.v3.fetch_video_high_quality_play_url' or response.get('error') is not None:raise ValueError('Expected successful high-quality URL response')
rid=response.get('request_id');data=response.get('data')
if not isinstance(rid,str) or not rid.strip() or not isinstance(data,dict):raise ValueError('Missing request ID or data object')
if not video_id(data.get('video_id')) or data['video_id']!=expected:raise ValueError('Video identity does not match; do not use the URL')
url=data.get('original_video_url')
if not isinstance(url,str) or any(ord(c)<=32 or ord(c)==127 for c in url):raise ValueError('Missing or malformed URL')
u=urlsplit(url)
if u.scheme!='https' or not u.hostname or u.username is not None or u.password is not None or u.fragment or u.port not in (None,443):raise ValueError('Expected HTTPS media URL without credentials or fragment')
values={}
for field,kind in [('content_type',str),('file_size',str)]:
    value=data.get(field)
    if value is not None and not isinstance(value,kind):raise ValueError('Unexpected type: '+field)
    values[field]=value
size=data.get('file_size_in_mb')
if size is not None and (type(size) not in (int,float) or not math.isfinite(size) or size<0 or (type(size)==int and size>9007199254740991)):raise ValueError('Invalid megabyte value')
values['file_size_in_mb']=size
record={'video_id':expected,'request_id':rid,'original_video_url':url,**values,'source_sha256':hashlib.sha256(raw).hexdigest(),'source_file':str(raw_path.resolve()),'url_checked':False,'downloaded':False,'expires_at':None,'scope':'Saved response only; no network request, expiry inference or rights grant'}
summary={k:v for k,v in record.items() if k!='original_video_url'}
summary['media_host']=u.hostname;summary['url_omitted']=True
out.mkdir();(out/'raw-response.json').write_bytes(raw)
(out/'playback-private.json').write_text(json.dumps(record,ensure_ascii=False,indent=2),encoding='utf-8')
(out/'review-summary.json').write_text(json.dumps(summary,ensure_ascii=False,indent=2),encoding='utf-8')
print(str(out))
```

`playback-private.json` keeps the exact signed URL and the source hash, and `raw-response.json` keeps the original response bytes; treat both `playback-private.json` and `raw-response.json` as private working files. `review-summary.json` omits the URL but keeps `video_id`, `request_id`, `media_host`, metadata, and `source_sha256`, so verify those fields before sharing `review-summary.json`. `playback_record.py` makes no HTTP request, does not print the signed URL, rejects a mismatched `video_id`, and refuses to overwrite an existing folder.

The returned metadata describes one specific response: `content_type` is the returned MIME label, `file_size` keeps the original string, and `file_size_in_mb` stays numeric when present. Missing optional metadata stays `null`, not zero. Neither size value is checked against downloaded bytes. Read `data.original_video_url`, not the nested `play_addr` path of a detail endpoint, and do not read multiple mirror addresses as different quality levels.

## What if the URL fails tomorrow?

The playback URL is signed, and `expires_at: null` means the response provided no expiration time. If `data.original_video_url` returns 403 or 404 the next day, first check whether the original post still opens. If you still need a playback URL, request a new URL for the same `aweme_id` and save the new URL and retrieval time as a separate record. Each refresh counts as another request.

The record sets `url_checked: false` and `downloaded: false` on purpose: the local check does not prove reachability, image quality, codec compatibility, or a completed backup. Do not publish signed URLs as stable website assets. A playback URL does not grant copyright, republication permission, subtitles, or a transcript. The workflow on this page ends with a verified metadata handoff, not a media archive.

[Post metrics and source checks](/guides/douyin-share-snapshot) · [Video IDs and share links](/faq/douyin-video-id)

Contract basis: `data:douyin.app.v3.fetch_video_high_quality_play_url`. `playback_record.py` validates saved responses locally without network calls.

## How should I hand off video references from different platforms?

First decide whether the team needs the original work, the duration or the spoken content. For Douyin, verify the work and URL with the steps on this page. For Xiaohongshu, see [video text and media](/faq/xiaohongshu-video-text) and keep the description and URL actually returned. For WeChat Channels, follow [channel and work identifiers](/faq/wechat-channels-identifiers) to confirm the detail and media source. For every platform, record the platform, work ID, retrieval time, available material, playback verification and caption availability. In the review sheet, share original work links and traceable request IDs; keep originals that carry access credentials in the internal record.