HasData
Scraper API

TikTok Comments Scraper API

for audience research

Collect comment text, likes and author details as JSON. Analyze audience reactions without maintaining TikTok scrapers or parsers.

SUCCESS
100%

of requests succeed

P50
3.2s

median response

P95
5.1s

95% finish faster

PRICE
$0.83

per 1k requests at volume

Stop maintaining scrapers

TikTok changes its pages. Your code shouldn't care.

  • Browser sessions and blocked requests
  • Comments loaded behind interactive panels
  • Nested author data to extract
  • Reply endpoints and cursors to maintain
  • Broken parsers after page changes
One integration commit replaces a backlog you’ll never finish.
scraper | git log
✗ hotfix: markup changed, nulls in output
✗ fix: headless Chrome OOM under load
✗ fix: retry storm on 429s
✗ chore: refresh residential IPs again
✗ fix: selector drift after redesign
✗ fix: rate-limit loop on every session
✗ chore: rotate user-agents, again
✗ fix: pagination broke after redesign
✗ hotfix: wrong-country results on shared IPs
✗ fix: cookies expired mid-crawl
✗ hotfix: markup changed, nulls in output
✗ fix: headless Chrome OOM under load
✗ fix: retry storm on 429s
✗ chore: refresh residential IPs again
✗ fix: selector drift after redesign
✗ fix: rate-limit loop on every session
✗ chore: rotate user-agents, again
✗ fix: pagination broke after redesign
✗ hotfix: wrong-country results on shared IPs
✗ fix: cookies expired mid-crawl
✗ hotfix: markup changed, nulls in output
✗ fix: headless Chrome OOM under load
✗ fix: retry storm on 429s
✗ chore: refresh residential IPs again
✗ fix: selector drift after redesign
✗ fix: rate-limit loop on every session
✗ chore: rotate user-agents, again
✗ fix: pagination broke after redesign
✗ hotfix: wrong-country results on shared IPs
✗ fix: cookies expired mid-crawl
✗ hotfix: markup changed, nulls in output
✗ fix: headless Chrome OOM under load
✗ fix: retry storm on 429s
✗ chore: refresh residential IPs again
✗ fix: selector drift after redesign
✗ fix: rate-limit loop on every session
✗ chore: rotate user-agents, again
✗ fix: pagination broke after redesign
✗ hotfix: wrong-country results on shared IPs
✗ fix: cookies expired mid-crawl
✓ feat: integrate HasData API
Code Examples

From video to structured comments

Bring a page of public video comments into your application with one HTTP request.

request example
curl -G 'https://api.hasdata.com/scrape/tiktok/comments' \
	--data-urlencode 'videoId=7667749432279977230' \
	--header 'x-api-key: <YOUR_API_KEY>' \
	--header 'Content-Type: application/json'
videoId * Video ID
The numeric id of the video (the number after `/video/` in a TikTok URL).
commentId Comment ID
When provided, returns the replies to this comment instead of the video's top-level comments.
nextPageToken Next Page Token
Defines the next page token. Use the `nextPageToken` value returned by the previous response. Omit it to fetch the first page.
TRY ALL 3 PARAMETERS FREE
AI Integration

Add TikTok Comments API with your AI agent

Paste a ready-to-use integration prompt into your coding agent. It includes API references, setup requirements, and testing instructions.

tiktok-comments-integration.md
# Integrate HasData TikTok Comments API

## Task

Add the requested public-video comments or selected-comment replies workflow to this project using HasData TikTok Comments API.
Inspect project instructions, the server-side runtime, existing HTTP client, and tests first.
Follow the project's conventions and preserve unrelated code. No new SDK is required.
Implement only the requested workflow. If the workflow is unclear, ask which public video to use and whether the application needs top-level comments or replies to a selected comment.
Keep the integration as REST API calls; do not replace it with an MCP connection or a custom TikTok scraper.

## References

Read the endpoint documentation before implementing:

- Video comments, replies, and pagination: https://docs.hasdata.com/apis/tiktok/comments.md
- Error handling: https://docs.hasdata.com/api-codes.md
- Documentation index: https://docs.hasdata.com/llms.txt
- Full documentation (fallback): https://docs.hasdata.com/llms-full.txt

Start with the endpoint reference. Use `llms.txt` to find additional pages.
Use `llms-full.txt` only when needed; extract relevant sections instead of loading everything into context.
If a `.md` reference is unavailable, try its HTML URL without `.md`.
If it is still unavailable, ask for the missing documentation rather than guessing.

## Optional agent skill

If the official `hasdata` skill is already available, use its relevant guidance.
Otherwise, if this agent supports skills, ask before installing it in this project:

```sh
npx skills add hasdata/agent-skills --skill hasdata
```

Run from the project directory and select the coding agent in use.
The `hasdata-cli` skill is not required. If installation is declined or unsupported, continue with the docs.
Flag conflicts between skill guidance and current API docs rather than guessing.

## Implementation

- Use `GET https://api.hasdata.com/scrape/tiktok/comments` with required `videoId`. Extract the numeric identifier after `/video/` when accepting a TikTok URL; do not send the full URL as `videoId`.
- Preserve `videoId`, `commentId`, author IDs, and returned comment IDs as strings to avoid numeric precision loss.
- For replies, send the same `videoId` with `commentId` from a comment on that video. This returns the selected comment’s replies in the `comments` array. Retain the requested parent ID in application context.
- For requested pagination, pass `pagination.nextPageToken` as `nextPageToken` when `pagination.hasMore` is true, retaining the video and selected comment context. Tokens are opaque strings; do not calculate offsets.
- Read `comments` and `pagination` separately. Comment `text`, `replyCount`, and optional inline `replies` may be absent. Dedicated reply records need not include `replyCount`.
- Deduplicate records by comment ID. Neither `pagination.total`, a reply count, nor an inline reply selection guarantees a complete discussion or historical archive.
- Do not invent page-size, sorting, language, country, or date-filter parameters. Apply requested sorting or analysis to the collected data in application code.
- Topic grouping, sentiment scores, review priorities, summaries, scheduling, and alerts belong to the application. Preserve original text and allow ambiguous or unclassified results in any requested analysis.
- Embedded authors are limited public attributes. Profile and posts links require separate API requests; do not treat full bios or follower counts as included, and do not expand links automatically.
- Handle empty results and unavailable public videos. Do not infer why a comment lacks text or claim recovery of deleted or private content.
- Handle timeouts and documented errors before reading data. Keep requests server-side. If no suitable runtime exists, discuss options before changing the architecture.

## Credentials

- Implement the integration and mocked tests without requiring a live API key.
- Read `HASDATA_API_KEY` from the project's existing environment or secret store and send it as `x-api-key`.
- If the key is missing before live verification, ask the user to configure it from https://app.hasdata.com/api-keys.
- Never ask the user to paste the key into chat. Check only that it is configured, without printing its value.
- Never put the key in browser code, logs, or version control. Add only a placeholder to the project's example configuration.
- If using a local `.env` file, make sure it is gitignored.
- Send the key only to `https://api.hasdata.com`. Never forward it to documentation, TikTok, media links, bio links, or redirects to another origin.

## Verification

- Add mocked tests for video and comment ID validation, string precision, reply-parent context, pagination, duplicate IDs, missing text, replies without replyCount, empty results, timeouts, and errors. Include a usage example and run local checks.
- With a configured key and explicit user approval, including approval already given for this task, make one live verification request with agreed inputs. A successful TikTok request consumes 10 credits.
- Verify only the requested comments or replies query.
- Validate the HTTP status, documented API status, and response structure. An empty result set can be valid.
- Do not automatically repeat paid requests to obtain a nonempty response or follow pagination during this check.
- Report changed files, setup commands, and test results. State separately whether live verification passed, failed, or was skipped.
- Ask before deploying.

Use Cases

What you can build with TikTok Comments API

Build audience research and discussion review tools with public comment text, replies and engagement counts.

Turn audience questions into content ideas

Use comment text to identify recurring questions and prioritize topics for follow-up videos or FAQs.

  • Video: 7667749432279977230
Questions found in the saved comments Question excerpts
  • Pls tell me this comes to Netflix 😭😭 @reginaldejiofor
  • when is it coming out? @nickelelisa
API data
comments[].idcomments[].textcomments[].likes
Your app
Group related questions in your own analysis and count repetitions across the comments you collect.
Explore response fields

These comments are research inputs. Topic labels and repeated-question counts are produced by your application.

Understand reactions to a public video

Feed comment text into your own sentiment analysis to compare audience reactions to content or campaign messages.

  • Video: 7667749432279977230
Unclassified comment excerpts Text for your analysis
Unclassified comment excerpts — Text for your analysis
CommentPublished at (UTC)
excited but I need Alex and Bethany to be endgame2026-07-29T13:42:17.000Z
you’re telling me i have to wait until christmas…2026-07-29T02:36:24.000Z
API data
comments[].idcomments[].textcomments[].createTime
Your app
Classify tone with your chosen model or review process, retain source text and inspect ambiguous or sarcastic comments.
Explore response fields

The API returns comments, not sentiment scores. Collected reactions do not represent every viewer or all TikTok users.

Follow the discussion behind a comment

Retrieve replies to a selected comment to understand responses and follow-up questions in context.

  • Video: 7667749432279977230
  • Parent comment: 7667752263792673558
Two replies to the selected comment Verified reply excerpts
Two replies to the selected comment — Verified reply excerpts
AuthorReply
youngnyquilpluhhhEven better bro in theaters
lilly.x762When!!!!
API data
comments[].idcomments[].textcomments[].author.username
Your app
Request the selected comment’s replies and attach them to the parent using the video and comment IDs you supplied.
Explore response fields

A separate commentId request returned these replies. Reply counts and returned records can differ; complete thread coverage is not guaranteed.

Prioritize comments that attract discussion

Use likes and reply counts to build a review queue for comments attracting audience attention.

  • Video: 7667749432279977230
  • Selected comments
Selected comments ordered by likes Comment engagement excerpts
Selected comments ordered by likes — Comment engagement excerpts
CommentLikesReplies
Pls tell me this comes to Netflix 😭😭9,86515
excited but I need Alex and Bethany to be endgame3538
you’re telling me i have to wait until christmas…621
API data
comments[].idcomments[].textcomments[].likescomments[].replyCount
Your app
Rank collected comments by your review criteria and open relevant threads before deciding on a response.
Explore response fields

Likes and reply counts measure reactions, not importance or sentiment. Ranking and any follow-up action belong to your application.

Response

Comment data, ready for analysis

Work with comment text, audience reactions and author details in structured fields for your research pipeline.

tiktok-comment-text.json

TikTok comments response excerpt.

{
  "comments": [
    {
      "id": "7667752263792673558",
      "text": "Pls tell me this comes to Netflix 😭😭",
      "createTime": "2026-07-29T01:16:19.000Z",
      "likes": 9853,
      "replyCount": 15
    },
    {
      "id": "7668401372559983368",
      "text": "when is it coming out?",
      "createTime": "2026-07-30T19:19:33.000Z",
      "likes": 26,
      "replyCount": 2
    }
  ]
}
Fields in Comments & reactions
comments[].id string

Comment identifier for matching records across captures and requesting replies.

comments[].text string

Comment text when available, preserving emoji and the original language.

comments[].createTime string

Comment publication time in the returned ISO date-time format.

comments[].likes number

Like count for the comment, separate from likes on the video.

comments[].replyCount number

Reported reply count. Request replies for a selected comment separately, even when some appear inline.

What We Do

See what your audience is saying

Use comments to find recurring questions, compare reactions and understand the discussions around public videos.

Find recurring questions

Collect comment text to identify repeated questions, product feedback and content ideas in your own analysis.

Compare audience reactions

Combine comment text with likes and reply counts to compare which discussions attract attention across videos.

Follow the conversation

Retrieve replies to selected comments and keep author handles alongside the text to examine the discussion in context.

What We Offer

An all-in-one scraping service

Connect comment data with TikTok videos and profile information through the same API platform.

Loved by developers

What developers say about HasData

Feedback from HasData customers.

4.8 ★★★★★
across 100+ reviews on 5 platforms
Trustpilot Trustpilot ★★★★★

HasData delivers exactly what we need: speed and comprehensive search features. It's the fastest API we've used in this space. Plus, their customer support is fantastic.

Denver Sinclair
Denver Sinclair
Capterra Capterra ★★★★★

We rely on HasData for search performance data and broader scraping needs. Their APIs deliver highly structured data that integrates directly into our platforms.

JN
Jacob N.
Trustpilot Trustpilot ★★★★★

Great web scraping API which is incredibly easy to use. It requires minimal effort to get up and running, and the documentation is very clear and helpful.

Arnold Foster
Arnold Foster
Trustpilot Trustpilot ★★★★★

I needed to scrape some information they didn't already support, and they wrote the code for me right away, which was super nice of them.

Hussein Ali
Hussein Ali
Clutch Clutch ★★★★★

We were particularly impressed with how easily we could integrate HasData into our existing workflow.

TB
Taras Bazyshyn
CEO at BAZTDL Sp. z o.o
Pricing

Plans that get cheaper at scale

Choose your request volume and concurrency. Pay for successful requests, with no metered overage.

Free
$0 /mo
Free forever
100 requests / month
1,000 credits / month
1 concurrent request
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Community support
Start free
Startup
$49 /mo
$2.46 / 1k requests
20K requests / month
200K credits / month
5 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Email support
Get started
Basic
Recommended
$99 /mo
$0.99 / 1k requests
100K requests / month
1M credits / month
15 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Priority email support
Get started
Growth
$208 /mo
$0.69 / 1k requests
3M credits / month
50 concurrent requests
Structured JSON, no parsers to maintain
Only successful requests billed
Team seats
Dedicated account manager
Get started
Monthly request volume
Free 100K 500K 2M
Best fit
Basic
requests / mo
100K
Concurrency
15
$ / 1k requests
$0.99
$99 /mo
Get Started
Enterprise
Custom price based on required volume

Past 20M credits a month, or terms the self-serve plans do not cover. We shape the contract around your workload.

Credits rollover
Unused credits carry into the next billing period.
Concurrency 2000+
Parallel request limits set to your peak load.
#1 request priority
Highest speed, always first in the queue.
Personal manager
A direct line to the founding team.
SSO
SAML single sign-on for the whole team.
Security review
Security questionnaire, DPA, and controls overview.
Talk to sales Quote within one business day
FAQ

Questions, answered

1 Grab your API key 2 Send a GET request 3 Get structured JSON

Your first TikTok comments response
is minutes away

100 requests free · no credit card