Douyin video download API

Download a public Douyin video as MP4 with one POST. The response returns a permanent download URL plus video metadata and engagement stats.

  • One POST, One MP4
  • Permanent Download URLs
  • Every Link Shape
  • Engagement Stats Included
  • Idempotency Key Support
  • Server-Side Key Required

Request examples

curl -X POST "https://api.agentbody.io/v1/douyin/video/download" \
  -H "Authorization: Bearer <YOUR_AGENTBODY_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"url":"YOUR_URL"}'

Response examples

Documented responses from the OpenAPI specification.

Downloaded Douyin media link and normalized public video metadata.

{
  "author_name": "盗月社食遇记",
  "collect_count": 855021,
  "comment_count": 162235,
  "digg_count": 4037193,
  "duration_seconds": 1082.5,
  "id": "7577614489533680959",
  "share_count": 5135670,
  "text": "这个贵州五线小城市…",
  "title": "贵州美食探店",
  "url": "https://www.douyin.com/video/7577614489533680959",
  "video_content_type": "video/mp4",
  "video_size_bytes": 215476832,
  "video_url": "https://api.apify.com/v2/key-value-stores/example/records/7577614489533680959.mp4"
}

Features

The douyin.video_download operation saves one public Douyin video as an MP4 file. Your server holds the API key; the endpoint returns a permanent download URL in a single call.

One POST, One MP4

Send POST /v1/douyin/video/download with any public Douyin share URL. A successful 200 returns the video title, author, engagement stats, and a permanent download URL — everything a pipeline needs.

Permanent Download URLs

The URL points to a fully saved file, not an expiring CDN redirect. Download from any server, any IP, at any time — safe for queue workers, media servers, and archives.

Every Link Shape

App share links and web player URLs all resolve to the same video. Private, deleted, and restricted videos return a structured error and are not billed.

Engagement Stats Included

The response carries the video's engagement counts alongside the media URL, so research pipelines get media and metrics in one call instead of two.

Idempotency Key Support

Pass an Idempotency-Key header so network retries never trigger a second download or charge. The gateway deduplicates by key.

Server-Side Key Required

The endpoint requires an AgentBody API key held on your server. Route calls through your backend; never ship the key to a client bundle.

How to use

Integrate Douyin video downloads in three API steps.

01

Get Your API Key

Create a free AgentBody account and generate an API key from the dashboard.

02

POST The Share Link

Send POST /v1/douyin/video/download with the public Douyin share URL. Include an Idempotency-Key header for safe retries.

03

Receive The Download Link

A 200 returns the permanent MP4 URL plus title, author, and engagement stats. Download directly or hand the URL to your storage pipeline.

Frequently asked questions

How does the Douyin video download API work?

Send POST /v1/douyin/video/download with a public Douyin share URL. The API saves the video as an MP4 file and returns a permanent download URL with title, author, and engagement stats.

What link formats are supported?

App share links and web player URLs both work. The API resolves every common Douyin link shape; private, deleted, and restricted videos return an error and are not billed.

What is in the response?

The video's title and author, engagement stats, and the permanent MP4 download URL — media and metrics in one response.

Does the download URL expire?

No. The URL points to a fully saved file rather than a temporary CDN redirect, so it works from any server at any time after the call.

How am I billed?

Each successful download draws a fixed amount from your AgentBody balance at the gateway-governed price. Failures are not billed; use the Idempotency-Key header to avoid duplicate charges on retries.

Is there a length limit?

Very long videos may be declined by an upstream cost guard that keeps each download at a predictable fixed price. Typical clips process without issue.