vlayervlayer docs

Walkthrough: TikTok post metrics

Track views, likes, comments, shares and saves on many TikTok posts, with post details, creator profiles and video files.

For teams that track the public numbers of many TikTok posts. Tokens, batches, limits, retries and billing work as in Instagram post metrics, and one batch can mix both platforms.

Share links, post details, exact counts from 10,000, TikTok profile details and video links are enabled per account; this page describes an account with all of them. Book a call (opens in a new tab) to get them.

1. Read a post

GET/v1/stats?url={postUrl}Data lookup

Send a video link, a photo link or a share link. A post is found by its id, so the handle in the link can be out of date. Store post.id, and use postUrl for later reads.

LinkExample
Videohttps://www.tiktok.com/@creator/video/7300000000000000000
Photo posthttps://www.tiktok.com/@creator/photo/7300000000000000000
Share linkhttps://vm.tiktok.com/<code>, https://vt.tiktok.com/<code>, https://www.tiktok.com/t/<code>
curl -G {API_BASE_URL}/v1/stats \
  -H "Authorization: Bearer <API_TOKEN>" \
  --data-urlencode "url=https://www.tiktok.com/@creator/video/7300000000000000000"
const params = new URLSearchParams({ url: "https://www.tiktok.com/@creator/video/7300000000000000000" });
const res = await fetch(`${API_BASE_URL}/v1/stats?${params}`, {
  headers: { Authorization: `Bearer ${API_TOKEN}` },
  signal: AbortSignal.timeout(120_000),
});
const { post, stats } = await res.json();
{
  "platform": "tiktok",
  "contentType": "video",
  "postUrl": "https://www.tiktok.com/@creator/video/7300000000000000000",
  "owner": { "handle": "creator", "accountId": "6800000000000000000", "secUid": null, "displayName": null },
  "post": {
    "id": "7300000000000000000",
    "caption": "New drop #clips",
    "postedAt": "2026-11-20T09:30:00.000Z",
    "thumbnailUrl": "https://...",
    "mediaUrls": [],
    "videoDurationMs": 15000,
    "carouselVideos": [],
    "isPaidPartnership": true,
    "roundedCounts": [],
    "hashtags": ["clips"],
    "images": [],
    "videoAspectRatio": "9:16",
    "videoDefinition": "540p",
    "subtitles": [{ "language": "eng-US", "url": "https://...", "format": "webvtt", "source": "ASR" }],
    "sound": { "id": "77", "title": "original sound", "author": "Creator", "isOriginal": true, "durationMs": 15000 }
  },
  "stats": { "views": 34164, "likes": 2815, "comments": 143, "shares": 96, "saves": 211 },
  "source": "provider"
}
  • owner.accountId is the author's id. Use it, not the handle, to confirm whose post it is.
  • contentType is photo for a photo post. Its images are in images, in order, and their links in mediaUrls; the video fields are null.
  • isPaidPartnership is true for TikTok's paid partnership label and its commission labels, and null when it can't be read.
  • Elsewhere, null means unknown, never zero.
  • The links to covers, images and subtitles are signed and expire. Download them when you read the post.

The live API reference (opens in a new tab) has every field.

2. Use counts that are exact

TikTok shows views, likes, comments and shares rounded from 10,000. On accounts with exact counts they are returned exactly, as are counts below 10,000 and saves at any size.

A count that could not be read exactly is listed by name in post.roundedCounts, for example ["views", "likes"]; comments and shares are the other two. It is approximate: it may be above or below the previous exact value. Don't pay on a listed count; use the value from a later read that doesn't list it. Counts of a post only available in some countries can occasionally be rounded, mostly on its first read; later reads are normally exact.

A read or batch with a count of 10,000 or more can take up to about 15 seconds longer.

3. Get the video file

GET/v1/stats?url={postUrl}&videoLink=trueData lookup

post.mediaUrls then holds a link to the video file that opens without cookies for about six hours. Ask when you download the file, not on every read. The read takes up to about 12 seconds longer, and is billed as usual even when no link could be had; ask again later. Batches and photo posts ignore the parameter.

4. Read a creator profile

GET/v1/profile?platform=tiktok&handle={handle}Data lookup

See Creator profiles for the response. On TikTok, profile also has followingCount and likeCount, and its counts are exact. A private account is answered with isPrivate: true and, of the counts, only followerCount. A handle that doesn't exist, or that was changed, answers 404 PROFILE_UNAVAILABLE.

5. Handle posts that can't be read

ErrorMeaning
POST_AGE_RESTRICTEDTikTok restricts the post as mature content and shows its counts only to signed-in users
POST_GEO_RESTRICTEDThe post is only available in some countries, none of which we read from
POST_NOT_FOUNDThe post is gone

None is billed. Stop reading such a post on every cycle and check it again much later, for example once a day. Errors has the rest.

Last updated on