jsonscraper
Markets
Back to journal

How to Find Repeated Product Questions on TikTok

Collect public videos using several queries, combine them, and turn the resulting phrases into a queue for your support or content team.

Editorial Policy Report an error

If customers ask the same question in several TikTok videos, it is useful for the support team to have a list of the original videos and wording they can review. One way to start is to collect search results for several queries, combine them by video ID, and send the sample for manual labeling.

The Python script below collects the returned results and creates a CSV containing links, video descriptions, and the search phrases that found each video. It helps reveal overlaps between searches; it does not, by itself, identify semantically similar questions. A specialist or a separate classifier, followed by human review, should make that determination.

What question should the collection answer?

Suppose a team sells a travel mug and wants to understand what people ask about in public videos. The query “travel mug leaks” may return videos with complaints, reviews, and instructions. The query “how to clean a travel mug” will produce a different sample. Several phrases create a working set of examples for reviewing support needs and planning content.

Article: How to Find Repeated Product Questions on TikTok
Summary: Learn how to use the TikTok Scraper API to retrieve videos for several search phrases, extract captions and links, remove duplicates, and build a sample for reviewing recurring questions—without replacing missing metrics with zeros.
Image role: cover — the central idea
Section: What question should the collection answer?
Visual subject: Editorial still life, a practical paper-based map of public short-video research: several video-link
Links to posts make it possible to check the context and manually group verified questions.© jsonscraper · AI-generated

The script produces a table with a post ID, description, link, and list of search phrases that returned it. A video appearing in multiple result sets shows overlap between search results, but does not prove that the video contains a recurring question. To build a question queue, open the links, check the context, and assign a topic to each verified phrasing.

This process is useful for a developer automating collection and an analyst who needs a reproducible sample to review. A link to the original video makes it possible to verify a conclusion before changing instructions or preparing new material.

What data does search return?

The /searchVideo route and its parameters are listed in the TikTok API reference. The required parameter is keyword; additional parameters include count, cursor, region, date_posted, sort_by, and cache_timeout. Requests are authenticated using the license_key parameter. The example below uses a phrase and page size.

The verified response structure includes a top-level status and a tiktok object. Items may include IDs, descriptions, links, author details, and statistics, including views and comments. Individual fields may be missing, so those values remain blank in the CSV rather than being converted to zero.

The search response supports two item structures: items may be in aweme_list or inside search_item_list[].aweme_info. The normalizer handles both options. The code also checks for a tiktok object so that an unexpected response structure is not mistaken for a successful empty result.

A ready-to-use Python collector

The example works with Python 3.8+ and the requests library. It makes one request for each phrase, checks the HTTP response and API status, combines records by ID, saves the matching search phrases, and writes a CSV. The key is read from an environment variable and is not printed.

Article: How to Find Repeated Product Questions on TikTok
Summary: Learn how to use the TikTok Scraper API to retrieve videos for several search phrases, extract captions and links, remove duplicates, and build a sample for reviewing recurring questions—without replacing missing metrics with zeros.
Image role: supporting illustration 2 — a different specific aspect
Section: A ready-to-use Python collector
Visual subject: Infographic in Russian showing verified workflow steps: three keyword querie
The diagram shows two search-response item structures and the normalization path to a CSV for manual review.© jsonscraper · AI-generated illustration
import csv
import os
import sys
import requests

BASE_URL = "https://tiktok.evelode.com/searchVideo"
KEY = os.environ.get("JSONSCRAPER_TIKTOK_LICENSE_KEY")
QUERIES = [
    "термокружка протекает",
    "как мыть термокружку",
    "термокружка не держит тепло",
]

if not KEY:
    sys.exit("Задайте JSONSCRAPER_TIKTOK_LICENSE_KEY")

def extract_items(payload):
    data = payload.get("tiktok")
    if not isinstance(data, dict):
        raise RuntimeError("В ответе отсутствует объект tiktok")

    items = list(data.get("aweme_list") or [])
    for entry in data.get("search_item_list") or []:
        video = entry.get("aweme_info") if isinstance(entry, dict) else None
        if isinstance(video, dict):
            items.append(video)
    return items

rows = {}

for query in QUERIES:
    response = requests.get(
        BASE_URL,
        params={"license_key": KEY, "keyword": query, "count": 20},
        timeout=30,
    )
    response.raise_for_status()
    payload = response.json()
    if payload.get("status") != "ok":
        raise RuntimeError("API вернул статус, отличный от ok")

    for item in extract_items(payload):
        video_id = item.get("aweme_id")
        if not video_id:
            continue
        stats = item.get("statistics") or {}
        author = item.get("author") or {}
        row = rows.setdefault(video_id, {
            "video_id": video_id,
            "description": item.get("desc"),
            "share_url": item.get("share_url"),
            "author": author.get("nickname"),
            "play_count": stats.get("play_count"),
            "comment_count": stats.get("comment_count"),
            "matched_queries": set(),
        })
        row["matched_queries"].add(query)

fields = ["video_id", "description", "share_url", "author",
          "play_count", "comment_count", "matched_queries"]
with open("tiktok_questions.csv", "w", newline="", encoding="utf-8-sig") as file:
    writer = csv.DictWriter(file, fieldnames=fields)
    writer.writeheader()
    for row in rows.values():
        output = dict(row)
        output["matched_queries"] = " | ".join(sorted(row["matched_queries"]))
        writer.writerow(output)

Install the dependency with python -m pip install requests, set JSONSCRAPER_TIKTOK_LICENSE_KEY in the process environment, and run the file. Do not put the key in source code, the CSV, or logs. For scheduled runs, execute the script in a secure environment where the variable is available to the task.

How to turn the CSV into a question queue

After collection, open the videos and manually identify the actual questions, then group the verified wording by topic, such as “leakproofing,” “care,” or “heat retention.” A search phrase helps find a post, but the video description and overlap between queries are no substitute for checking the context.

If you use a language model, provide the description and ask it to suggest a brief topic label and a possible question. Keep the original text, link, and model output together so a specialist can check the basis for the classification. Do not present wording suggested by the model as a verbatim question unless it appears in the description.

The number of records found describes only the results returned for the specific queries. It does not measure the full volume of discussion or demand. For an internal report, save the run date, original phrase, ID, and raw API response. This makes it possible to compare repeat runs and separately note new IDs.

This example intentionally does not include automatic pagination. For subsequent pages, the documentation specifies the cursor parameter; take its value from the previous response and pass it on without modification. A single page represents only the returned batch, not the full result set.

What the team will see

The tiktok_questions.csv file contains one row for each unique ID found for the specified phrases. The matched_queries column shows which queries returned that video. This is a convenient way to identify overlaps between result sets and select examples for review; question classification must be done separately.

The CSV can then be included in weekly automation: a scheduler runs the collection, storage saves a snapshot, and a notification is sent when an ID appears that is not already in the log. This is external orchestration logic, not a feature of the search endpoint. The team gets a queue of links to analyze, not a ready-made conclusion about the reasons behind customer behavior.

Route parameters are available in the API documentation; you can try a request on the TikTok API playground. Before collecting data regularly, check the actual response structure and save the values needed to go from a summary to a specific video. The product is described on the TikTok Scraper API page.

A useful outcome is a verifiable set of videos associated with specific search phrases. It helps you select material for manual review and retain the sources for every topic adopted in the content plan.

People

No people listed for this article yet.

Keep readingHow to Analyze TikTok Creator Topics: A Practical Python Pipeline
Read the next article

Turn what you read into a working integration

Explore jsonscraper's social-data APIs, test requests and build your next workflow.

Explore APIs