YouTube Comments API for Audience Research
Use a YouTube comments API to collect a bounded sample, identify viewer questions, and build a reviewable audience research brief.
Key takeaways
- 01Select videos around one research question and record how the sample was collected.
- 02Use the Comments API with a page cap and a deliberate `newest` or `top` sort order; count retrieved records rather than parsing the display count.
- 03Group comments into reviewable themes and check important claims against the source video or transcript before acting on them.
What YouTube comments can tell you
A YouTube comments API gives a research team something more useful than a long page to scroll: comment records that can be sampled, grouped, and checked against their source video. A product team might look for setup problems under tutorials. A creator might collect follow-up questions after a review. Neither task requires treating every comment as a vote or every repeated phrase as a trend.
The useful unit is a specific comment in context. Keep the video ID, comment ID, text, available author and publish metadata, and the collection method together. That lets an editor inspect the evidence behind a theme before it becomes a content brief or product claim. Comments describe what some viewers chose to say; they do not represent everyone who watched the video.
Choose videos before collecting comments
Start with a small set of videos that answer one research question. For example, a team researching a note-taking app might choose recent tutorials that demonstrate the same workflow, then ask which setup steps viewers found confusing. Mixing unrelated videos produces a larger dataset with less meaning.
If you already know the video IDs, go directly to comments. If the subject is still broad, use the YouTube query suggestions workflow to refine search terms, then the YouTube Search endpoint to select videos. Write down the selection rule, such as topic, publish window, and why each video belongs in the sample. A search result is a candidate, not evidence that its comments are relevant.
Fetch a bounded sample with the Comments API
MintAPI's YouTube Comments API accepts a video or Shorts video id. Set sort_by=newest to inspect recent discussion or sort_by=top to inspect prominent comments. The endpoint also accepts optional geo, lang, and fields parameters. Do not assume a locale setting makes the returned comments a representative sample of that audience.
1curl --request GET \2 --url 'https://api.mintapi.dev/api/youtube/comments?id=1gxf6flnvNA&sort_by=newest' \3 --header 'Authorization: Bearer YOUR_API_KEY'The response has a data array and may include a continuationtoken for the next page. Pass that value as the next request's token. The documented commentsCount is human-readable, so do not parse a value such as 1.6K as the exact number of comments you collected. Count the records in your own sample instead.
Decide the page limit before fetching. For an initial review, a few pages from each video under the same sort order is easier to compare than an unbounded crawl of one popular video. Store the sort order, fetch time, and number of pages with the sample. If you later compare videos, those details explain why one set contains more recent or more visible discussion than another.
Turn comment records into a reviewable dataset
Normalize only the fields you actually receive. Comment items can include a comment ID, display text, author metadata, publish time, likes, reply count, and reply tokens. The exact fields may vary, so keep the raw response alongside a smaller analysis record. A useful record contains video ID, comment ID, text, available time and engagement fields, collection time, and sort order.
- Deduplicate by video ID and comment ID before counting themes.
- Keep missing fields as missing; do not infer a timestamp or author identity from display text.
- Separate empty, promotional, and off-topic comments with explicit review labels.
- Preserve original wording for audit, and create a cleaned copy only for search or clustering.
- Record how many comments were retrieved from each video and each sort order.
A reply count signals that a thread may be worth a closer look, but it is not itself the content of those replies. The Comments endpoint documents thread listings and reply-related fields; inspect the actual response before designing any reply-level analysis. Avoid presenting a top-level sample as a complete conversation.
Classify questions, objections, and requests
Begin with a small manual pass. Read enough comments to define labels that match the topic: unanswered question, reported obstacle, comparison, feature request, praise, correction, and unrelated. Then apply those labels consistently to the rest of the sample. A single comment can carry more than one label, but its original text should remain available for review.
For the note-taking tutorial example, “Does this work offline?” is a question; “The import failed on my phone” is a reported obstacle. Those are different signals. A useful output is a short evidence table: theme, count in the collected sample, example comment IDs, and a proposed next question. The next question might be whether the video omitted an instruction, whether the product behavior differs by device, or whether a follow-up tutorial is needed.
An LLM can suggest labels or summarize a group, but it should cite the comments it used. Review examples from both common and rare groups. Sentiment scores alone often flatten sarcasm, mixed feedback, and requests that sound positive while describing a problem. Keep the final conclusion narrower than the data: “Several comments in this sample ask about offline use” is supportable; “the audience wants offline use” may not be.
Compare comments with what the video actually says
Some apparent gaps disappear when you inspect the video. Pair selected comments with the YouTube Transcript endpoint when a viewer claims that a step was skipped or a feature was never explained. The transcript API pipeline guide explains how to preserve timestamps and source metadata for that comparison.
This does not mean every comment needs a transcript lookup. Fetch it for the videos and claims that need verification. You can then separate missing coverage from a viewer missing an existing explanation. That distinction changes the recommendation: revise documentation or produce a new video for one problem; improve the video description or chaptering for the other.
Keep collection costs and conclusions bounded
Each request is a decision. Search for candidate videos, select a few, fetch comments under a fixed page cap, and only retrieve transcripts when the analysis needs them. MintAPI supports dashboard API keys for team scripts and a request-time x402 flow for agents; both use the same endpoint contract. The agent request flow documents how an agent runtime handles payment and retries.
Set limits in application code: maximum videos, pages per video, total requests, and a stopping rule when comments stop adding new themes. The broader social media API workflow guide covers the same selection principle across platforms. If you need to compare the YouTube discussion with short-form video comments, the TikTok comment research guide is a related example. Keep findings separate by platform until you have a reason to combine them.
A useful research output
End with a short brief, not a pile of comments. State the question, video selection rule, collection date, sort order, sample size, and page cap. Give each finding a label, a count within the collected sample, and comment IDs that a reviewer can inspect. Add an explicit “unknown” where the evidence cannot distinguish a product issue from a misunderstanding or a one-off experience.
That brief can drive a follow-up video, a support article, or another research pass. To build the retrieval step, start with the Comments API reference and test one known video before expanding the sample.
Frequently asked questions
Read next
Next step
Explore the API surface behind the article.
Browse endpoint docs, pricing notes, and implementation examples for human and agent workflows.
Open docs