100 free credits — no credit card required.Start building
Logo
Developer tutorial

How to scrape TikTok comments with Node.js (2026)

This tutorial shows how to scrape TikTok comments in Node.js using the SocialCrawl API. You get every comment on a video with its text, author, like count, and reply count, paginated by cursor from one GET request, with no TikTok developer account, proxies, or HTML parsing. The code below is runnable as-is, and the response underneath it is a real, unedited call.

How it works

  1. 1
    Get a free API keyCreate a SocialCrawl account and copy your API key from the dashboard. Every new account starts with free credits.
  2. 2
    Set up Node.jsUse Node.js 18 or newer, which includes the fetch API with no extra packages.
  3. 3
    Call the TikTok Post Comments endpointSend a GET request to /v1/tiktok/post/comments with your API key in the x-api-key header and the `url` parameter.
  4. 4
    Read the responseParse the JSON. SocialCrawl returns every comment on a video with its text, author, like count, and reply count, paginated by cursor in one normalized schema, so you write no HTML parsing or proxy code.

The code

A real, unedited response from the request above.

const params = new URLSearchParams({
  "url": "https://www.tiktok.com/@stoolpresidente/video/7623818255903329566",
});

const response = await fetch(
  `https://www.socialcrawl.dev/v1/tiktok/post/comments?${params}`,
  { headers: { "x-api-key": "YOUR_API_KEY" } },
);
const data = await response.json();
console.log(data);
[ RESPONSE ]
{
  "success": true,
  "platform": "tiktok",
  "endpoint": "/v1/tiktok/post/comments",
  "data": {
    "items": [
      {
        "comment": {
          "id": "7623869779602457374",
          "url": null,
          "parent_id": null,
          "post_id": "7623818255903329566",
          "text": "Beach gossip in 3 months time",
          "author": {
            "username": "jw22784",
            "display_name": "JW",
            "avatar_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/cbec99d66023ddef2902c1111eb046c4~tplv-tiktokx-cropcenter:100:100.jpg?dr=9640&refresh_token=d33f22a6&x-expires=1784592000&x-signature=kxH9DUoL4oXbGUgpxMZywVbSAAI%3D&t=4d5b0474&ps=13740610&shp=30310797&shcp=ff37627b&idc=useast8",
            "verified": false
          },
          "engagement": {
            "likes": 12613,
            "replies": 25
          },
          "flags": {
            "pinned": false,
            "deleted": false
          },
          "published_at": "2026-04-01T19:08:53.000Z",
          "ext": {
            "published_at_epoch": 1775070533
          }
        }
      },
      {
        "comment": {
          "id": "7623828115408274207",
          "url": null,
          "parent_id": null,
          "post_id": "7623818255903329566",
          "text": "Tea by the Sea 🌊 🫖",
          "author": {
            "username": "xoxobkp",
            "display_name": "Briana P",
            "avatar_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/7353158061415989290~tplv-tiktokx-cropcenter:100:100.jpg?dr=9640&refresh_token=cf8384cd&x-expires=1784592000&x-signature=xTo10TE%2FbdLBXD%2BSpQc1h9vncRU%3D&t=4d5b0474&ps=13740610&shp=30310797&shcp=ff37627b&idc=useast8",
            "verified": false
          },
          "engagement": {
            "likes": 16270,
            "replies": 50
          },
          "flags": {
            "pinned": false,
            "deleted": false
          },
          "published_at": "2026-04-01T16:27:52.000Z",
          "ext": {
            "published_at_epoch": 1775060872
          }
        }
      }
    ],
    "next_cursor": "20",
    "total": 2204,
    "dropped": 0
  },
  "credits_used": 1,
  "credits_remaining": 9999,
  "request_id": "req_example000000",
  "cached": false,
  "pagination": {
    "next_cursor": "sc.eyJ2IjoyLCJjIjoiMjAiLCJwIjoiY3Vyc29yIn0",
    "has_more": true,
    "page_size": 20
  }
}
API reference for this endpoint

Prefer another language?

FAQ

Have a question? We got answers

Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.

Contact us
Do I need a TikTok developer account to scrape TikTok comments?
No. SocialCrawl handles authentication and proxies upstream, so you never register a TikTok app, manage OAuth tokens, or run your own scrapers. One API key returns TikTok data directly.
What does the TikTok Post Comments endpoint return?
It returns every comment on a video with its text, author, like count, and reply count, paginated by cursor. The response is normalized into SocialCrawl's unified schema, identical in shape across every platform.
How much does it cost to scrape TikTok comments?
Each call costs a small number of credits, and new accounts start with free credits. There are no monthly minimums, so you pay only for the calls you make.
Can I use this Node.js code in production?
Yes. The snippet on this page is the real request against the live API. For production, add error handling and follow the response cursor to paginate through large result sets.

Ask AI about SocialCrawl