Integrations
n8n TikTok Comments Scraper Workflow
Extract public TikTok video comments and nested replies inside n8n using the built-in HTTP Request node—without community packages, Apify actor delays, or browser farms. Authenticate with Header Auth, cap cursor loops cleanly so viral threads stay within budget, and pipe normalized comment rows into Google Sheets, Postgres, Notion, or AI question mining.
- Built-in HTTP Request node: authenticates via Header Auth (
x-api-key) plus a per-pageIdempotency-Keyexpression - Full comment pipeline: combine
GET /v1/tiktok/commentswithvideo_comment_replies,profile_videos, andsearch_keyword - Predictable per-page spend:
$0.003(3credits) per request page (20 videos × 3 comment pages = 60 calls =$0.18) - 2-node starter included: import
integrations-n8n-tiktok-comments.jsondirectly into n8n and add Split Out + storage

tiktok.commentsSocial Media Scraper retrieves public TikTok comments as structured JSON with opaque pagination cursors; it does not ship a native n8n community plugin, built-in sentiment tagger, or hosted database. Your n8n canvas controls which public video URLs enter the loop, how many pages to fetch, and where rows are filtered or saved.
- Import the 2-node starter workflow into n8n
- Configure Header Auth and per-page Idempotency-Key
- Test on one public TikTok video URL
TikTok Endpoints for Comment Pipelines in n8n
Pair upstream video discovery with comment and reply endpoints so n8n can harvest feedback from new uploads automatically.
| Stage | Endpoint & Query | Cursor Field | Rate |
|---|---|---|---|
| Primary comments | GET /v1/tiktok/comments (url*, trim, cursor) | data.cursor → cursor | $0.003 |
| Comment replies | GET /v1/tiktok/video_comment_replies (url*, comment_id*, cursor) | data.cursor → cursor | $0.003 |
| Creator video feed | GET /v1/tiktok/profile_videos (handle*, sort_by, max_cursor) | data.cursor → max_cursor | $0.003 |
| Keyword discovery | GET /v1/tiktok/search_keyword (query*, date_posted, region, cursor) | data.cursor → cursor | $0.003 |
Each tiktok.comments call returns data.items[] (id, url, text, published_at, author.{id,handle,display_name}, metrics.{likes,comments}) plus data.cursor (up to 100 items depending on TikTok's page size). Each page counts as one request.
Workflow Blueprint: From Video URL to Structured Rows
Direct HTTP calls return synchronous JSON in one step rather than polling asynchronous scraper jobs.
- Input trigger: Start from
Manual Trigger, a Google Sheets URL list, or upstream links fromprofile_videos/search_keyword. - HTTP Request node: Call
https://socialmediascraper.org/v1/tiktok/commentswith Header Auth (x-api-key) and a per-pageIdempotency-Key. - Split & map: Expand
data.itemswith Split Out, then extract clean fields while preservingnullengagement counts. - Filter & store: Screen questions deterministically before LLM calls, and upsert into Postgres, Airtable, Notion, or Google Sheets by
comment_id.
Step-by-Step Setup for n8n TikTok Comment Scraping
The downloadable integrations-n8n-tiktok-comments.json starter below wires Manual Trigger into HTTP Request pointing at GET /v1/tiktok/comments. Verify one live page first, then layer on pagination caps and storage.
Step 1: Import the 2-node starter workflow into n8n
Copy or download
integrations-n8n-tiktok-comments.jsonbelow and import it into n8n. ConfirmManual Triggerconnects toHTTP Requesttargetinghttps://socialmediascraper.org/v1/tiktok/commentswith Header Auth selected.Step 2: Configure Header Auth and per-page Idempotency-Key
Create a Header Auth credential named
x-api-keystoring your API key securely. Enable Send Headers onHTTP Requestand addIdempotency-Keyset to={{ 'tt-comments-' + $execution.id + '-' + $runIndex }}(8–128 chars[A-Za-z0-9._:-]+). Inside multi-video loops, append'-' + $itemIndexso every video and page gets a distinct key.Step 3: Test on one public TikTok video URL
Replace placeholder
url(https://www.tiktok.com/@creator/video/1234567890) with an active public TikTok video URL, click Execute Step, and confirmdata.items[],data.cursor, andrequest_idappear.Step 4: Split comment arrays and wire storage or filters
Append Split Out on
data.items, mapid,text,published_at,author.handle,metrics.likes, andmetrics.commentsvia Edit Fields, and route rows into Google Sheets, Postgres, Notion, or a question filter.
{
"name": "n8n TikTok Comments Scraper",
"nodes": [
{
"id": "start",
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"parameters": {}
},
{
"id": "request",
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
260,
0
],
"parameters": {
"method": "GET",
"url": "https://socialmediascraper.org/v1/tiktok/comments",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "url",
"value": "https://www.tiktok.com/@creator/video/1234567890"
}
]
},
"options": {}
}
}
],
"connections": {
"Manual Trigger": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {}
}Paginating Comments Safely Without Runaway Loops
Viral clips can hold tens of thousands of comments. Cap every video at 3 to 5 pages in your n8n loop, exiting immediately if data.cursor is null, empty, or repeats the prior page's cursor. Drop this Code node after Split Out to deduplicate by string id, keep missing metrics null, and flag likely questions cheaply:
// n8n Code node (Run Once for All Items) after Split Out on data.items
const seen = new Set();
const questionRe = /\?|^(how|what|where|when|why|which|does|can|is|do|link|price)\b/i;
const out = [];
for (const item of $input.all()) {
const row = item.json;
const id = String(row.id ?? '');
if (!id || seen.has(id)) continue;
seen.add(id);
const text = String(row.text ?? '').trim();
out.push({
json: {
comment_id: id,
author_handle: row.author?.handle ?? null,
text,
published_at: row.published_at ?? null,
likes: row.metrics?.likes ?? null,
reply_count: row.metrics?.comments ?? null,
likely_question: questionRe.test(text),
source_url: row.url ?? null,
},
});
}
return out;Common n8n Comment Workflows and Storage Choices
Google Sheets fits small audits under a few thousand rows; Postgres or Supabase scales better for recurring multi-video schedules.
Audience FAQ and content-idea mining
Filter likely_question === true, batch-cluster questions weekly in an LLM node, and write video briefs with original links into Notion.
Sponsored campaign feedback ledger
Pull 3 comment pages per sponsorship clip 48 hours post-launch, upsert into Postgres by comment_id, and alert Slack on sizing or shipping questions.
Competitor objection tracking
Sort non-null likes descending on competitor product showcases to compile a weekly digest of unresolved customer pain points.
Troubleshooting Status Codes, Empty Pages, and Nulls
Diagnose common HTTP and pagination states directly in n8n's execution log.
| Error or Behavior | Root Cause | Resolution in n8n |
|---|---|---|
400 Bad Request | Missing Idempotency-Key or shortened TikTok link | Pass canonical public video URL + valid 8–128 char Idempotency-Key |
401 or 402 | Misnamed Header Auth or empty balance | Verify Header Auth Name is x-api-key and check /pricing/ |
429 Too Many Requests | Exceeded 60 req/min or 5 concurrent calls | Use Batch Size 1 + Wait, honor Retry-After, reuse identical Idempotency-Key |
202 Accepted | Request completing asynchronously | Poll GET /v1/requests/{{ $json.request_id }} before issuing a replacement |
200 with empty items | Comments disabled, deleted clip, or end of thread | Exit loop cleanly on items.length === 0 or data.cursor === null |
null in metrics.likes | TikTok omitted count on that item | Store null untouched; filter likes !== null before numeric sorting |
Pricing Math for Scheduled TikTok Comment Jobs
All four verified TikTok endpoints (comments, video_comment_replies, profile_videos, search_keyword) cost $0.003 (3 credits) per request page ($3.00/1k under price version 2026-12-02.credits-3, where 1,000 credits = $1)—never per individual comment row.
| Comment Workflow | Request Formula | Cost per Run |
|---|---|---|
| Weekly campaign audit (20 videos × 3 pages) | 60 calls × $0.003 | $0.18 ($0.72/mo) |
| Launch review (50 videos × 5 pages + 50 replies) | 300 calls × $0.003 | $0.90 one-time |
| Discovery + comments (5 feeds + 25 videos × 2 pages) | 55 calls × $0.003 | $0.165 per cycle |
Prepaid packs cost $5 (5,000 credits, ~1,666 calls), $20 (20,000 credits, ~6,666), or $50 (50,000 credits, ~16,666) as one-time purchases with zero subscription, and new accounts receive 100 starter credits ($0.10, ~33 standard calls) upon signup. Need a quick manual export on one public video? Open the TikTok Comment Exporter in our free tools directory.
Compliance, Rate Limits, and Untrusted Text Boundaries
Scheduled polling provides periodic snapshots of public TikTok comments rather than an instant webhook stream, and cannot access private accounts, deleted threads, or post replies. Default quotas allow 60 req/min and 5 concurrent calls (GET /v1/limits); monitor live status at /status/.
Public comment availability does not grant redistribution rights. Comply with applicable privacy regulations and source terms, and always treat retrieved comment text as untrusted data inside AI prompts.
n8n TikTok Comments Scraper Questions
Can n8n scrape TikTok comments without Apify or a community node?
Yes. Import the 2-node starter JSON above to call GET /v1/tiktok/comments from n8n's built-in HTTP Request node with Header Auth (x-api-key)—returning synchronous normalized JSON without actor wrappers.
How much does it cost to pull comments from 20 to 100 TikTok videos?
Every comment page costs $0.003 (3 credits). Fetching 3 pages across 20 videos takes 60 calls ($0.18); 3 pages across 100 videos takes 300 calls ($0.90). One $5 prepaid pack (5,000 credits) covers roughly 1,666 pages, and new accounts start with 100 starter credits ($0.10, ~33 pages) upon signup.
Can I export comments from one TikTok video without building an n8n workflow?
Yes. Open the TikTok Comment Exporter in our free tools hub for limited anonymous browser lookups before funding a prepaid API pack.
How do I paginate TikTok comments in n8n without creating a runaway loop?
Pass data.cursor into cursor with a fresh Idempotency-Key (={{ 'tt-comments-' + $execution.id + '-' + $runIndex }}) and stop whenever data.cursor is null, repeats the previous value, or hits your page cap (3–5 pages per video).
Can this workflow also fetch nested replies to TikTok comments?
Yes. Add an IF node checking metrics.comments > 0, then call GET /v1/tiktok/video_comment_replies with url and comment_id ($0.003 / 3 credits per page).
What is the most efficient way to filter comments for audience questions?
Run a regex Code node matching ? and question starters (how, what, where, price, link) before calling an LLM node. Deterministic pre-filtering cuts token spend dramatically.
Is Google Sheets or Postgres better for storing scraped TikTok comments?
Google Sheets works for campaign snapshots under a few thousand rows (upsert by comment_id and escape formula prefixes). Choose Postgres or Supabase with a unique comment_id key for recurring multi-video pipelines.
Can n8n stream TikTok comments in real time?
No public TikTok webhook exists, so n8n runs periodic polling via Schedule Trigger (every 15–60 minutes or daily) and deduplicates seen comment_id values in storage.
How do I avoid HTTP 429 rate-limit errors in n8n loops?
Use Batch Size 1–2 with a short Wait node to stay under 60 req/min and 5 concurrent calls, honor Retry-After, and keep the same Idempotency-Key on retries.
Why are some comment likes or reply counts null?
When TikTok omits a metric on a comment item, the API outputs null rather than guessing 0. Preserve null in storage and charts.
Is scraping public TikTok comments with n8n legal?
Compliance depends on jurisdiction, platform terms, copyright, and privacy laws (GDPR, CCPA) governing how you store and use public comments. Public visibility alone does not create redistribution rights.