Social media6 min readBy Purrkey teamUpdated

How to fetch a public Douyin video by share URL

Fetch a public Douyin video by share URL and get normalized author, caption, engagement and video metadata for a campaign recap

On this page

You have 25 Douyin share URLs from a creator campaign and need a comparable record for each before deciding which videos to feature in a recap. Fetch each public video once with anyapi.douyin.video, then sort the rows by views, likes, comments and shares to see which posts drove engagement

The worksheet below is the deliverable: one row per share URL, filled from the normalized output fields. Values in the sample rows are placeholders showing the shape. No run has been executed for this guide, so the table is a design

Example input and the worksheet design

Example input, using a placeholder for the share URL:

Agent prompt
PUBLIC_DOUYIN_VIDEO_SHARE_URL

The tool takes one URL per call, so 25 share URLs means 25 calls. Replace the example with links from your own campaign

A full row is 18 columns wide, which is awkward to read as one table. Here is the column list with the field each value comes from:

ColumnSource fieldRole in the recap
foundfoundSays whether the row carries data
iddata.idVideo identifier for joining rows
urldata.urlCanonical Douyin video URL
captiondata.captionText to quote in the recap
authorNicknamedata.authorNicknameAuthor display name
authorUniqueIddata.authorUniqueIdAuthor Douyin handle
authorVerifieddata.authorVerifiedMarks verified accounts
createdUtcdata.createdUtcPublish time in UTC epoch seconds
durationMsdata.durationMsVideo length in milliseconds
viewsdata.viewsPlay count, first sort key
likesdata.likesLike count
commentsdata.commentsComment count
sharesdata.sharesShare count
savesdata.savesSave count
regiondata.regionTwo-letter region code
videoUrldata.videoUrlPlayable URL, query string intact
imagedata.imageCover image URL
review noteyour own textShort note for the editor

A narrower view of the same sheet, with placeholder values:

foundidviewslikescommentssharesreview note
true(id)(count)(count)(count)(count)feature or skip
false(empty)(empty)(empty)(empty)(empty)not_found, no retry

What the tool takes

anyapi.douyin.video requires url, described in the contract as a public Douyin video share URL, format uri. Copy the link from the share action in the app or from the browser address bar on the video page

The contract shown here lists url as the required field and names no other required field. It does not say the input accepts nothing else, so check the current inputs in the catalog before you run a batch

How to read the output fields

found is true when the video was found. data holds the normalized video object, or null when there is no result. When found is false, reason is present and reads not_found: the source states the target does not exist, or returned nothing for it

That case is the limit to plan around. Only public Douyin video share URLs are accepted, and a video that resolves to nothing returns found: false with reason: not_found. The contract calls that a successful call, not an error, and costUsd is what it actually cost, so a dead share link still uses one call from your budget

For a found row, the fields that drive the feature decision are views, likes, comments, shares and saves, with createdUtc for recency. createdUtc is a UTC epoch timestamp in seconds; multiply by 1000 for a JS Date in milliseconds. durationMs is the length in milliseconds, authorVerified flags the account, and region gives the two-letter code the video was published from

Two fields need care when you reuse them. videoUrl is described as the playable URL whose query string carries required access parameters, so keep the string intact rather than trimming it. image is the cover image URL, not a frame from the clip

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch 25 public
Douyin videos by share URL. Check the current inputs and price of
anyapi.douyin.video before running anything. Call the tool once per URL.
Return a table with found, id, url, caption, authorNickname,
authorUniqueId, authorVerified, createdUtc, durationMs, views, likes,
comments, shares, saves, region, videoUrl, image and a review note.
For rows where found is false, put the reason value in the review note
and do not retry. Do not download or re-host video files.

PUBLIC_DOUYIN_VIDEO_SHARE_URL

Add the other 24 URLs under the example line, one per line. Keep the first run to five URLs so you can see how many resolve before committing the batch

Estimated tool cost

Prices come from the Purrkey catalog, read on November 12, 2026, and the tool is called through POST /v1/runs with toolId anyapi.douyin.video. The unit is max_call, which the catalog defines as "Maximum per call. Successful runs settle at the actual AnyAPI charge". Totals in the table are ceilings, not settled charges

StepFormulaUnit pricePlanned quantityTotal
Single video lookup1 call x max price$0.0012 per call1$0.0012
25-video campaign sample25 calls x max price$0.0012 per call25$0.0300

The 25-video row is the ceiling for the campaign sample whether or not each URL resolves, since a not_found answer is still a successful call. Model fees for the agent are not counted

Fetch the first URL

Open the Douyin video tool page and run one share URL from your list before you start the batch

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Douyin.
Explore Douyin tools and pricing

FAQ

How do I fetch a Douyin video by share URL?

Call anyapi.douyin.video once per URL with the url field set to a public Douyin video share URL. The response returns found and a normalized data object with author, caption, engagement and video metadata.

What input does anyapi.douyin.video take?

It requires url, described as a public Douyin video share URL in uri format. The contract lists url as the required field and names no other required field.

What happens when a Douyin video is not found?

The response returns found false, data null and reason not found. The contract treats that as a successful call, not an error, so it still uses one call.

Which fields should I sort a campaign recap by?

Sort by views, likes, comments and shares, with saves as a fifth engagement count. createdUtc gives the publish time for recency.

What does createdUtc mean in the output?

It is a UTC epoch timestamp in seconds. Multiply by 1000 to get a JS Date in milliseconds.

How much does it cost to fetch 25 Douyin videos?

At most $0.0300, at the ceiling of $0.0012 per call for 25 calls. A single lookup is at most $0.0012.

Why does videoUrl carry a long query string?

The contract says the query string carries required access parameters, so keep it intact when you reuse the link.

Next step

Try this with Douyin

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Douyin tools

Share this article