TikTok Comments API
Submit a video URL to retrieve comments and optional replies, including text, usernames, timestamps, likes and parent comment IDs.
Set collection parameters and receive a task ID.
1 credits per 100 comments and replies, rounded up; queries are free.
https://api.goanyapi.com/api/v1/tiktok-comments/tasks/{task_id}Loading saved example…
Run a request to see the response here
Fill in the demo parameters to preview an example response for free. Sign in to send live requests with your own parameters.
Read comments and replies as connected records
Main comments and replies are returned as structured records linked by comment IDs. The diagram shows how these fields connect. See the API documentation for complete requests and responses.
From video URL to comment records
Pass the full video URL as video_url, choose mode=page, and optionally set include_replies=true. Query the returned task_id to read records. userName, createTime and likeCount identify the username, comment timestamp and like count. Empty fields retain their returned values.
- id
- Each main comment and reply has its own ID. The diagram uses 1001 for the main comment and 2001 and 2002 for replies.
- parent_comment_id
- A reply points to its main comment’s id; a main comment has null here. Use type to distinguish comment from reply.
- content
- The comment or reply text. Text and IDs in the diagram are illustrative.

Keep collection and result pagination separate
Use data.collection.next_cursor when submitting a new task for the next main-comment page. Pass data.results.next_cursor as result_cursor to read the next saved-result page from the same task. These cursors are not interchangeable.
Choose the discussion you want to collect
Start with one main-comment page or try available pages, adding replies for context.
One page or available pages
Choose page for one main-comment page, or all to continue through pages the task can retrieve.
Replies with parent IDs
Include available replies to the selected main comments and retain their parent relationships.
Review saved records
Check task status and saved counts. Copy the currently displayed JSON for your own processing.
Frequently asked questions
Submit a full HTTPS TikTok video URL, not a short share link, as video_url to POST /api/v1/tiktok-comments/tasks. Authenticate with your GoAnyAPI API key. The returned task_id lets you query later; acceptance does not mean completion.
page collects up to 40 main comments; replies can take total records above 40. all attempts available main-comment pages and cannot be combined with a submission cursor. Neither mode guarantees a match with TikTok’s displayed comment total.
Set include_replies=true to collect available replies to the selected main comments within the same task. data.items contains both types: replies have type=reply and parent_comment_id pointing to the main comment; main comments have a null parent. Reconstruct threads using these fields.
content holds the wording; userName and userAvatar support display. createTime gives the comment timestamp; likeCount helps compare reactions. Keep id to trace findings. replyCount is a reported count, not collected replies: use data.counts.replies for saved replies and parent_comment_id for their parent. Preserve missing, null or empty fields as returned.
Query about every 5 seconds while queued or running; the Tester polls automatically. succeeded means the selected scope is complete. Check stop reasons for partial or failed. Empty data.items may mean nothing is saved yet or the current result page is empty; check cumulative data.counts.total. data.results.has_more=false applies at that moment. Later queries may save more; closing the page does not guarantee completion.
After a page task completes, use data.collection.next_cursor to submit a new page task if more main comments are available. data.results.next_cursor becomes result_cursor when querying saved records from the same task. The two cursors are not interchangeable.
Check the stop reason of an unexpired partial or failed task, address insufficient credits if needed, then resume. This preserves its ID, records, counters and rate without charging again for existing records. A new page task is separate.
Each submission is independently billed. Unique saved main comments and replies are combined, rounded up per 100 records, and billed progressively. See the Tester and Docs for the current rate; each task retains its creation-time rate. Separate page tasks round up separately. Zero saved records incur no collection charge.
Query requests, including repeated reads, have no separate charge. Querying queued or running tasks also advances collection, so newly saved records can trigger another billing unit. If collection stops early, saved records still count toward billing.
Tasks and results expire 30 days after submission, as shown by expires_at. Saving records or resuming does not restart the clock. Retrieve what you need before the deadline.
JSON copy covers only the displayed result. Follow result_cursor pagination in the Docs to read all saved records, up to 100 per query. Implement CSV conversion yourself. The saved example illustrates comment data, not the complete public asynchronous response format.
The API returns JSON. data.items in a query response contains comment and reply records. type distinguishes record types, while parent_comment_id preserves their relationship. See the Docs for the complete task structure, field paths and pagination examples.
Explore related GoAnyAPI APIs
Explore more GoAnyAPI endpoints for creator, template and AI answer data.