SerpBase
Back to Blog

TikTok Post API: One Video's Views, Likes and Saves as JSON

Send a TikTok video ID and username (or its URL) to get caption, hashtags, views, likes, comments, shares, saves and author as JSON. Three videos tested.

December 3, 2026
By SerpBase Team2 min read

Short answer: POST a TikTok video's id and the creator's username (or the full video url) to /tiktok/post and you get that one video as JSON β€” caption, hashtags, views, likes, comments, shares, saves, publish time, duration and the author's profile. We tested three latte-art videos on 2 December 2026; all three returned.

The request

curl -X POST 'https://api.serpbase.dev/tiktok/post' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{"username":"moz.latte","id":"7389525134173932806"}'

Both values are in every video address: tiktok.com/@moz.latte/video/7389525134173932806. Sending the address itself also worked: {"url":"https://www.tiktok.com/@kamilbaristalisiecki/video/7447839453454011671"}.

What came back

Shortened response for the first video:

{
  "status": 0,
  "credits_charged": 2,
  "action": "post",
  "post": {
    "id": "7389525134173932806",
    "text": "Slow Heart 🫢🏼  #latteart #coffee #lattearttutorial #barista ...",
    "hashtags": ["latteart", "coffee", "lattearttutorial", "barista", "cappuccino", "lattearttutorials", "coffeetiktok"],
    "published_at": "2024-07-09T06:51:40Z",
    "views_count": "2500000",
    "likes_count": "119500",
    "comments_count": "576",
    "shares_count": "8868",
    "saves_count": "22089",
    "language": "en",
    "location": "ID",
    "media": [{"duration": "19", "height": 1024, "thumbnail": "https://p16-common-sign.tiktokcdn-eu.com/..."}],
    "author": {"username": "moz.latte", "followers_count": "11300", "likes_count": "384800", "videos_count": "130", "verified": false}
  }
}

The three tests:

videoviewslikessavespublished
@moz.latte2,500,000119,50022,0892024-07-09
@amancoffee1,100,00057,30028,6102023-04-01
@kamilbaristalisiecki (by URL)49,7001,1253302024-12-13

Python: track a video's numbers over time

import csv, datetime, requests

def post_stats(username, video_id):
    r = requests.post(
        "https://api.serpbase.dev/tiktok/post",
        headers={"X-API-Key": "YOUR_API_KEY"},
        json={"username": username, "id": video_id},
        timeout=60,
    ).json()
    if r["status"] != 0:
        raise SystemExit(r.get("error"))
    p = r["post"]
    return {k: int(p.get(k) or 0) for k in
            ("views_count", "likes_count", "comments_count", "shares_count", "saves_count")}

row = {"date": datetime.date.today().isoformat(), **post_stats("moz.latte", "7389525134173932806")}
with open("tiktok_stats.csv", "a", newline="") as f:
    csv.DictWriter(f, fieldnames=row.keys()).writerow(row)

Run it once a day and the CSV becomes a growth curve for the video.

Things that trip people up

  • Counts are strings. "2500000", not a number β€” convert before comparing.
  • Some counts look rounded. In our tests views and likes came back as round figures (2,500,000; 119,500) while saves and shares were exact (22,089; 8,868). Treat views and likes as approximate.
  • One video per request. To find video IDs by keyword, use the TikTok Search API; for an account's totals, the TikTok Profile API.
  • location is a country code TikTok attaches to the post (ID, AU, PL in our tests), not a precise place.

Cost and docs

Each post lookup is 2 credits. Failed requests are not charged, and new accounts get 500 free credits.