How should I validate media links in a Douyin response?
How should I validate media links in a Douyin response? Follow concrete contracts, examples and reviewable steps using Douyin.
Copy the agent prompt manually
Answer
Start by inspecting the contracts and local samples for Douyin video detail. Establish the input for douyin.videos.get, then check whether its post object contains the fields your task needs.
Keep media links, cover images, post text and transcripts separate. A URL does not guarantee permanent download access or subtitles. Feed only an actual transcript field into transcript analysis; never invent missing speech text.
Relevant contracts
| Capability | Object | Shape | Pagination |
|---|---|---|---|
| douyin.videos.get | Post | item | No cursor |
Input contract
Inspect meanings, examples and conditional rules for the selected method. view and fields control the response without changing the TEST unit price.
- GET: supply exactly one of id / url.
| Method | Field | Type | Requirement | Meaning | Enum or bound | Example |
|---|---|---|---|---|---|---|
| GET | id | string | Optional / conditional | Video ID, a string of digits. With only a link or a share text, give it as url | — | "7694940173372575014" |
| GET | url | string | Optional / conditional | Link to the video, pasted as it is: the https://www.douyin.com/video/… web link, a web link with modal_id in it, the page a share opens on a phone, the v.douyin.com short link the app copies, or a whole share text with one of these in it. A short link is opened once to see which video it leads to | — | — |
| GET | view | string | Optional / conditional | How much of each item: compact (the most used fields, long text cut short), standard, or full (adds `ext`). | ["compact","standard","full"] | — |
| GET | fields | array | Optional / conditional | Return only these fields of each item, by path (`author.name`). | maxItems: 64 | — |
Complete one verification
Run one local fixture for a listed capability and inspect the object structure. Then filter, classify or export according to the question. A local sample cannot replace evidence for a real-platform conclusion.
{
"capability": "douyin.videos.get",
"method": "GET",
"params": {
"id": "7694940173372575014"
}
}Clear inputs. Inspectable output.
Each click runs a local fixture. Advanced JSON inputs are checked against the selected method. Editing does not execute a request.
Copying does not execute. CLI quote is read-only and needs a local customer TEST key. Configure MCP in demo mode first. GET and POST batches both return only fictional local fixtures.
Download contract example (no execution) ↗For TEST budgets, Key scopes or failure scenarios, open the account console. Customer sandbox ↗