# How to Turn TikTok Comments into a Product Bug Queue

https://jsonscraper.com/blog/turn-tiktok-comments-into-bug-queue

Author: Michael Johnson

Published: 2026-11-18T11:36:01+00:00

Updated: 2026-11-18T11:36:01+00:00

Collect public comments on selected videos and save the raw JSON so you can verify the response structure before thematic labeling.

To study discussion of a problem on TikTok, first find relevant videos, then request comments for each selected video. For a product team, the result can be a set of raw JSON responses linked to the search query and video URL. Before building a topic queue, verify the actual structure of the comments: the documentation confirms the endpoint and its parameters, but does not describe the fields in the response records.

 

This is an important step in an analytics pipeline. Search results help gather context around a product, while comments may contain bug reports, questions, or workarounds. To base classification on real data, first save the API response without transformation, then match its fields to the schema actually returned.

 

## Why video search alone is not enough

 

An app or device name can help find videos, but a video description primarily reflects the creator’s wording. Viewers may discuss specific problems and ways of using a product in the comments. Collecting comments therefore adds a second layer of data to the search sample, linked to the original video.

 

Earlier articles covered monitoring TikTok search, extracting questions from descriptions, and processing search responses. This article has a narrower focus: collect responses from the comments endpoint and verify their structure before developing a classification system. This is useful for analytics integration developers, user experience researchers, and support teams.

 

## From a search phrase to a verifiable dataset

 

Enter several specific queries, such as a product name combined with a feature or model name. Save the search response and the URLs of the selected videos. Then request comments by URL, saving each raw response separately. After checking the schema, you can normalize the required fields, remove duplicates, and group texts by topic.



![Article: How to Turn TikTok Comments into a Product Bug Queue
Summary: A Python pipeline connects TikTok video search with comment requests through jsonscraper. The example saves and prints raw JSON without assuming comment field names in advance.
Image role: supporting illustration 2 — a different specific aspect
Section: From a search phrase to a verifiable dataset
Visual subject: Russian-language process infographic showing keyword search → video selection → comments request ](https://jsonscraper.com/assets/uploads/journal/2026/11/0fd7e8fd8c3e0ddec431e375056cca1b.png.hero.webp)

The diagram separates documented collection steps from normalization after the actual response has been checked.© jsonscraper · AI-generated illustration

 

1. **Search:** request videos for a keyword and check both supported result structures.
2. **Selection:** choose relevant videos and save their IDs and URLs.
3. **Comment collection:** pass the URL to the comments endpoint; use the returned cursor to continue pagination.
4. **Verification:** save the raw JSON and establish the actual field names from the response.
5. **Analysis:** once the schema is verified, group the texts and send examples to a person for review.

 

Diagram: TikTok video search, video selection, comment request, saving raw JSON, checking the structure, and manual topic labeling

Save the entire response first; add normalization only after checking the actual fields.

 

## Which endpoints to use

 

The [TikTok Scraper API documentation](https://github.com/jsonscraper/tiktok-api-python/blob/main/docs/endpoints.md) describes `GET /searchVideo` with the required `keyword` parameter. Additional parameters include `count`, `cursor`, `date_posted`, `sort_by`, and `region`. For comments, it provides `GET /getCommentsByUrl` with the required `video_url`; additional parameters include `cursor`, `count`, and `region`. The key is passed in the `license_key` parameter.

 

Videos in the search response may be found in `tiktok.aweme_list` or `tiktok.search_item_list[].aweme_info`. The example handles both forms, checks the outer status, and saves the video objects it finds. For the comments response, it assumes neither an array name nor field names: it saves and prints the returned JSON so it can be inspected.

 

## A minimal Python collector

 

The code is compatible with Python 3.8+. Install `requests` and set the key in the `JSONSCRAPER_TIKTOK_LICENSE_KEY` environment variable. The script writes search and comment responses to separate JSON files, linking each comment response to the query and video URL. It deliberately does not extract comment fields until you have checked the actual response structure.



![Article: How to Turn TikTok Comments into a Product Bug Queue
Summary: A Python pipeline connects TikTok video search with comment requests through jsonscraper. The example saves and prints raw JSON without assuming comment field names in advance.
Image role: cover — the central idea
Section: A minimal Python collector
Visual subject: Editorial documentary photograph of a printed raw JSON response beside cards representing video URLs and comments, arranged for a product team to ](https://jsonscraper.com/assets/uploads/journal/2026/11/90f31ffdc4a020d2bacccfeef5317f4e.png.hero.webp)

The raw response preserves the original data for structural inspection before normalization.© jsonscraper · AI-generated

 

```
import json
import os
from pathlib import Path

import requests

BASE = "https://tiktok.evelode.com"
KEY = os.environ["JSONSCRAPER_TIKTOK_LICENSE_KEY"]
OUT = Path("tiktok_raw")
OUT.mkdir(exist_ok=True)


def get_json(path, params):
    response = requests.get(
        BASE + path,
        params={**params, "license_key": KEY},
        timeout=30,
    )
    response.raise_for_status()
    data = response.json()
    if data.get("status") != "ok":
        raise RuntimeError("API returned non-ok status")
    return data


def videos_from_search(data):
    tiktok = data.get("tiktok") or {}
    found = list(tiktok.get("aweme_list") or [])
    for item in tiktok.get("search_item_list") or []:
        aweme = (item or {}).get("aweme_info") or {}
        if aweme:
            found.append(aweme)

    unique = {}
    for video in found:
        video_id = video.get("aweme_id")
        video_url = video.get("share_url")
        if video_id and video_url:
            unique[video_id] = video
    return list(unique.values())


for index, keyword in enumerate(("APP_NAME ошибка", "APP_NAME не работает")):
    search = get_json("/searchVideo", {"keyword": keyword, "count": 10})
    (OUT / f"search_{index}.json").write_text(
        json.dumps(search, ensure_ascii=False, indent=2), encoding="utf-8"
    )

    for video in videos_from_search(search):
        video_id = video["aweme_id"]
        video_url = video["share_url"]
        comments = get_json(
            "/getCommentsByUrl",
            {"video_url": video_url, "count": 30},
        )
        filename = f"comments_{video_id}.json"
        record = {
            "keyword": keyword,
            "video_id": video_id,
            "video_url": video_url,
            "response": comments,
        }
        (OUT / filename).write_text(
            json.dumps(record, ensure_ascii=False, indent=2), encoding="utf-8"
        )
        print(json.dumps(record, ensure_ascii=False, indent=2))
```

 

The script checks the outer response status and then writes the complete JSON object. This makes it possible to inspect the real keys, value types, and nesting before building a comments table. If the API returns an error, the code stops and reports it instead of silently saving an invalid result.

 

## From raw JSON to a topic queue

 

After checking one or more responses, build a normalizer based on the schema you actually found. Keep the raw JSON alongside the normalized rows so you can verify the transformation and reprocess the data if the code changes. It is useful to retain the video link, the original comment record, the collection time, and the version of the labeling rule used.

 

To label topics, you could start with categories such as “bug,” “how-to question,” “feature request,” “feedback,” and “not product-related.” Keyword rules or a classifier can help sort the sample; store the assigned label separately from the original text. Before creating a task, a specialist should review the comment’s context and the original video.

 

For deduplication, use an ID field only after confirming that it exists in the response. If the data contains no ID, a combination of the video URL and normalized text can serve as a temporary key. This approach merges matching wording within a single video, but does not establish that the records belong to the same author.

 

## Automation and data provenance

 

Schedule collection with cron, GitHub Actions, or n8n. Store the key in runtime secrets and do not include it in the repository, result files, or logs. Keep the raw JSON responses available for review; set a retention period and access permissions in line with your team’s requirements and applicable platform rules.

 

To monitor the pipeline, record the number of successful search queries, unique videos found, comment responses saved, and API errors. These technical metrics show at which stage the result changed. An empty response, a request error, and no matches after topic classification are different states, so record them separately.

 

For a database, it is useful to separate collection runs, videos, raw comment responses, and topic-labeling decisions into distinct entities. Linking each record to its query and video makes it possible to open the source for manual review. After verifying the schema, you can add cursor-based pagination: the endpoint accepts `cursor`, and the next request should pass the value returned by the API without trying to interpret it.

 

## What this approach provides

 

The team gets a repeatable collection process and a verifiable set of sources from which to build a topic queue. An analyst can trace which search query led to a video and which comment response was saved. Once the structure has been checked, a developer can add normalization and topic grouping without replacing an unknown schema with assumptions.

 

In your report, specify the search phrases, run date, selection criteria, and number of responses processed. Findings apply to the specific queries and returned data; they help investigate the discussions found and plan further review while preserving their provenance and context.

 

Start with one product and a few diagnostic queries: save the responses, check the comments structure, and then add only verified fields to the normalizer. The [API documentation](https://github.com/jsonscraper/tiktok-api-python/blob/main/docs/endpoints.md) describes the endpoint parameters, and product information is available on the [TikTok Scraper API page](https://jsonscraper.com/services/tiktok-scraper-api).
