Track a TikTok Hashtag with an API Without Inventing a Trend

By Anurag Pathak, Founder of Serpent API·

A TikTok hashtag API watch can tell you which public video IDs a particular call returned. Save the tag, country, requested depth, observation time and list state, then compare only like-for-like samples. Newly observed IDs are useful for review; they are not a platform-wide growth rate.

I founded Serpent API, so this is an affiliated review of its published hashtag contract and TikTok’s Research API information, checked October 5, 2026. The example has no authenticated parsed production result. Verify access, fields and charges with your account before relying on a watch.

Fix the hashtag and sample definition

Choose one hashtag and a decision that needs it, such as a weekly editorial review of new public videos. Normalize the tag spelling, select a country and depth, and keep those inputs fixed across runs. Review the returned posts rather than equating hashtag use with endorsement or a trend.

The Serpent hashtag route accepts tag or q plus country and limit. It returns a list envelope with items, result_count, total_count, has_more, next_cursor, truncated, restricted and complete. These fields separate returned rows from any stated total and from a restricted or short list. Store each video_id as the durable key; cover and media URLs are short-lived display links.

Read the list state before counting

TikTok Research Tools are an official route for eligible, approved nonprofit research and can have data lag. Serpent’s public hashtag snapshot serves a different operational question: what this call returned for this tag and depth. This article has no authenticated parsed production check for the sample request. Confirm availability and returned fields in your account before implementation.

Field or inputUseInterpretation check
tag, country, limitStore the exact sample definition.Changing any of them breaks direct comparison.
items[].video_idUse as the durable post key.Never use a signed cover URL as identity.
result_count, total_countKeep returned count distinct from any stated total.A null total is unknown, not result_count.
truncated, restricted, completeExplain why a list can be short or empty.Check flags before calling the hashtag inactive.

Save a hashtag run in Python

Set SERPENT_API_KEY and install requests. The example below includes request authentication, a bounded timeout, a parsed success check and explicit missing-data handling. Its syntax was checked; production values and access remain to be validated with an authorized account. Replace the illustrative handle, ID or tag with one you are permitted to review.

import os
from datetime import datetime, timezone
import requests

BASE = "https://apiserpent.com"
KEY = os.environ["SERPENT_API_KEY"]

def fetch(path, params):
    response = requests.get(BASE + path, params=params,
                            headers={"X-API-Key": KEY}, timeout=60)
    if response.status_code == 404:
        # HTTP status alone cannot separate route access from resource absence.
        return {"lookup": "unverified_404", "observed_at":
                datetime.now(timezone.utc).isoformat()}
    response.raise_for_status()
    data = response.json()
    if data.get("success") is not True:
        raise ValueError("No usable response")
    data["observed_at"] = datetime.now(timezone.utc).isoformat()
    return data

tag = "booktok"
data = fetch("/api/tiktok/hashtag",
             {"tag": tag, "country": "us", "limit": 30})
if data.get("lookup") == "unverified_404":
    print({"tag": tag, "status": "unverified API 404; check route access and request"})
else:
    items = data.get("items")
    if not isinstance(items, list):
        raise ValueError("Hashtag items were not a list")
    ids = [item.get("video_id") for item in items
           if isinstance(item, dict) and item.get("video_id")]
    record = {"tag": tag, "observed_at": data["observed_at"],
              "video_ids": list(dict.fromkeys(ids)),
              "returned": data.get("result_count"),
              "stated_total": data.get("total_count"),
              "truncated": data.get("truncated"),
              "restricted": data.get("restricted"),
              "complete": data.get("complete"),
              "has_more": data.get("has_more"),
              "next_cursor": data.get("next_cursor")}
    print(record)

Interpret the printed record carefully. If result_count is zero, check restricted and complete before explaining it. total_count is the platform’s stated number when one is available; it must not be filled from len(items). A new video_id in a later sample is “newly observed,” not necessarily newly published. Review created_at on the video record when timing matters.

Budget the requested depth

At the documented Default TikTok enriched rate, a hashtag call with default limit=30 is $3.00 per 1,000 calls. One call a day for 30 days plans at 30 × $0.003 = $0.09 in metered usage. Depth changes the rate: the published multiplier is 0.7 + 0.01 × billed limit, with the default calibrated to 1.0. Check your account tier and ledger before scheduling. The output count is not a platform-wide volume estimate.

These are dated contract calculations, not a live invoice or a guarantee of result quality. See Serpent pricing for current tier terms, and inspect your account ledger after a small verified run. Do not divide a bill by returned items when the published unit is a request or requested depth.

When TikTok Research Tools fit

OptionBest useAccess or billing unitDecision
TikTok Research ToolsApproved research access for eligible nonprofit researchers.Application/approval route; fields and lag follow official Research documentation.Choose for eligible formal research with its approved scope.
Serpent TikTok hashtagPublic hashtag sample with video IDs and list flags.Enriched call; $3.00/1K at Default limit=30.Choose for a small review queue after access and parsed output pass your check.
Manual TikTok hashtag pageVisual context for a few posts.Human time.Use to review a surprising record or sample gap.

What a hashtag sample cannot prove

The list can be truncated, restricted or incomplete. Even a complete response describes only the requested path and its stated endpoint semantics, not all TikTok use of a tag. Popularity, total views and growth rate require a defensible sampling design and additional fields; this guide makes no such inference. Do not store a signed media URL as a permanent asset.

Compare like-for-like snapshots without claiming trend volume

Create a run key from the normalized tag, country, requested limit and observation cadence. Compare video IDs only between runs with that same key. A larger requested limit can reveal older posts and make “new IDs” look like growth; a restricted or incomplete run is not comparable to a complete one. Keep result_count, total_count, has_more, truncated, restricted and complete in every snapshot.

Run pairWhat you may sayWhat to do
Same inputs, both parsed and completeThese video IDs entered or left the returned list.Inspect created_at and source pages before calling them new uploads.
Different limit or countryTwo differently defined samplesKeep separate series or rerun with matching inputs.
Either run restricted, truncated or incompleteComparison inconclusiveShow the flags and review a later valid sample.
Both lists emptyNo items returned by these callsDo not infer zero platform use of the hashtag.

An operational alert can notify an editor when a previously unseen ID appears in a comparable sample, with the run key and source link attached. It should not say “the hashtag is up 20%” unless a separate, documented population and denominator support that statistic. Before any schedule, validate one parsed response and charge with an account that can access this endpoint.

Check comparability before alerting

  1. Choose one permitted tag and a small repeat schedule. Confirm the endpoint is available to your account before interpreting a 404.
  2. Save the returned video IDs, result_count, total_count, restricted and completeness flags with the exact observation time.
  3. Inspect a few IDs and creation dates on TikTok; a newly observed ID is not necessarily a newly published video.
  4. Compare like-for-like samples and the billed requested depth before using the list as a trend signal.

Compare one hashtag carefully

Check account access and one parsed hashtag list, then repeat with the same country and limit before comparing IDs.

Get an API key

Try the playground · Read the field contract

FAQ

Does result_count show total hashtag volume?

No. It counts items returned by this call; total_count is separate and can be null.

Can I call a tag inactive when the list is empty?

No. Check restricted and complete flags and confirm a parsed response before interpreting zero.

Is this the official TikTok Research API?

No. Research Tools have a separate approved-access purpose and data contract.

Is the TikTok route verified live for this guide?

No. This article has no authenticated parsed production result for the sample query.

Related Posts