> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapeunblocker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape the comments of a TikTok video

> Opens a TikTok post in a real browser session, scrolls its comment panel and returns the comments as JSON: `videoId`, `url`, `totalComments`, `comments` - each with `text`, `createdAt`, `likes`, `replyCount`, `language`, `author` (username, nickname, userId, avatar, profileUrl), `isCreator`, `likedByCreator`, nested `replies` TikTok preloads - plus `commentsCollected` and `hasMore`. No login or cookies. Takes 10-30 s because the panel is scrolled for each batch.



## OpenAPI

````yaml /api-reference/openapi.json post /social/tiktok-comments
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Three endpoints are
    documented here: page-source extraction, Google SERP scraping, and image
    fetch. All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 3.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /social/tiktok-comments:
    post:
      tags:
        - Plugins
      summary: Scrape the comments of a TikTok video
      description: >-
        Opens a TikTok post in a real browser session, scrolls its comment panel
        and returns the comments as JSON: `videoId`, `url`, `totalComments`,
        `comments` - each with `text`, `createdAt`, `likes`, `replyCount`,
        `language`, `author` (username, nickname, userId, avatar, profileUrl),
        `isCreator`, `likedByCreator`, nested `replies` TikTok preloads - plus
        `commentsCollected` and `hasMore`. No login or cookies. Takes 10-30 s
        because the panel is scrolled for each batch.
      operationId: tiktok_comments_social_tiktok_comments_post
      parameters:
        - name: url
          in: query
          required: true
          schema:
            type: string
            description: >-
              A TikTok video / photo-post URL, bare id or short link (same forms
              as /social/tiktok-video).
            title: Url
          description: >-
            A TikTok video / photo-post URL, bare id or short link (same forms
            as /social/tiktok-video).
        - name: max_comments
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            description: >-
              How many top-level comments to return (1-500). 20 arrive per
              scroll; replies TikTok preloads are nested under each comment's
              `replies`.
            default: 50
            title: Max Comments
          description: >-
            How many top-level comments to return (1-500). 20 arrive per scroll;
            replies TikTok preloads are nested under each comment's `replies`.
        - name: proxy_country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Exit-IP country (ISO-2, e.g. 'US', 'DE'). Optional - TikTok's
              public pages are the same worldwide; set it only for
              region-restricted items.
            title: Proxy Country
          description: >-
            Exit-IP country (ISO-2, e.g. 'US', 'DE'). Optional - TikTok's public
            pages are the same worldwide; set it only for region-restricted
            items.
      responses:
        '200':
          description: JSON object with a `comments` array.
          content:
            application/json:
              schema: {}
        '400':
          description: Missing or malformed url / proxy_country.
        '404':
          description: Post has no comments, or is deleted / private.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: Blocked by TikTok on every exit.
        '503':
          description: Browser engine unavailable on this node - retry.
        '504':
          description: Fetch timed out.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````