Skip to content
Browsabledocs
Staging API reference · Requests use https://api-ingress-worker-staging.browsable-staging.workers.dev
Documentation TikTok comments
Markdown ↗
TikTok APIs

TikTok comments

Get comments for a TikTok video using a connected TikTok account. The current website requires sign-in to open comments; video and profile metadata remain available through the public endpoints.

POST/v1/tiktok/comments
Authenticate every request

Send Authorization: Bearer YOUR_API_KEY. Get an API key →

Connected website account required

Requires a connected tiktok.com account. Browsable automatically uses a saved connection on your team when one is available.

If none is available, HTTP 428 includes a hosted_url. Complete sign-in there, then retry. Connect an account →

Parameters

Send these fields in a flat JSON body. Add _run to choose execution options.

Provide at least one of: url; username + video_id.

urlstringOptional

Full public TikTok video URL. Minimum length: 1. Maximum length: 2000.

usernamestringOptional

TikTok username, with or without the leading @. Minimum length: 1. Maximum length: 2000.

limitintegerOptional

Maximum number of public comments to collect from the rendered page. Preferred name; max_comments remains supported. Default: 50. Minimum: 0. Maximum: 200.

cursorstringOptional

Zero-based pagination cursor returned as next_cursor from the previous response.

video_idstringOptional

TikTok numeric video id. Use with username when url is not provided.

Advanced & compatibility inputs 1
max_commentsintegerOptional

Maximum number of public comments to collect from the rendered page. You can also use limit. Default: 50. Minimum: 0. Maximum: 200.

Response

Every response describes a run. Read result once run_status is succeeded.

run_id
The run to track. Keep it when contacting support.
run_status
Queued, running, waiting for sign-in, succeeded, or failed. Check this even after an HTTP 200.
status_url
Poll this URL while the run is pending. Keep the same run instead of starting another request.
result
The endpoint’s returned data. The example is illustrative; actual fields may be empty or unavailable.
error
On failure, inspect its code, message, retryable and action fields.
View the complete output schema
JSON
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "success",
    "video",
    "comments",
    "count",
    "max_comments_requested",
    "pagination"
  ],
  "properties": {
    "count": {
      "type": "integer"
    },
    "video": {
      "type": "object",
      "required": [
        "id",
        "url",
        "username"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "username": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "success": {
      "type": "boolean"
    },
    "comments": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "author_username",
          "author_display_name",
          "text",
          "created_at_text",
          "likes_text",
          "like_count",
          "reply_count",
          "url"
        ],
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "text": {
            "type": "string"
          },
          "like_count": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "likes_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_count": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "author_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "author_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "pagination": {
      "type": "object",
      "required": [
        "cursor",
        "next_cursor",
        "has_next_page",
        "count"
      ],
      "properties": {
        "count": {
          "type": "integer"
        },
        "cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "next_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "has_next_page": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "max_comments_requested": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}
View a polled run response
JSON
{
  "run_id": "00000000-0000-4000-8000-000000000001",
  "task_key": "tiktok-comments",
  "task_name": "TikTok comments",
  "run_status": "succeeded",
  "status_url": "/v1/runs/00000000-0000-4000-8000-000000000001",
  "result": {
    "count": 1,
    "video": {
      "id": "id-1",
      "url": "https://example.com/item-1",
      "username": "Stylish Shoreditch Loft with Balcony"
    },
    "success": true,
    "comments": [
      {
        "id": "id-1",
        "url": "https://example.com/item-1",
        "text": "Sample text 1",
        "like_count": 1,
        "likes_text": "Sample likes_text 1",
        "reply_count": 1,
        "author_username": "Stylish Shoreditch Loft with Balcony",
        "created_at_text": "2026-06-14T15:30:00Z",
        "author_display_name": "Stylish Shoreditch Loft with Balcony"
      }
    ],
    "pagination": {
      "count": 1,
      "cursor": "cursor-page-1",
      "next_cursor": "cursor-page-1",
      "has_next_page": true
    },
    "max_comments_requested": 1
  },
  "error": null
}

Errors & retries

  • 400Fix the fields listed in errors before retrying.
  • 428Connect the requested website account using the returned sign-in link.
  • 429Wait for the duration in Retry-After.
  • 5xxRetry transient failures with backoff. Keep the request ID.

A failed run has its own error inside the response. Retry it only when error.retryable is true.

Validation, pagination and recovery →

More examples

Async request with polling
RUN=$(curl -s -X POST "https://api-ingress-worker-staging.browsable-staging.workers.dev/v1/tiktok/comments" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.tiktok.com/@tiktok/video/7641647587056962846"}')

RUN_ID=$(echo "$RUN" | jq -er '.run_id // empty') || { echo "$RUN" >&2; exit 1; }
POLL_DELAY=3

while true; do
  RESULT=$(curl -s -H "Authorization: Bearer YOUR_API_KEY" "https://api-ingress-worker-staging.browsable-staging.workers.dev/v1/runs/$RUN_ID")
  STATUS=$(echo "$RESULT" | jq -r '.run_status')
  if [[ "$STATUS" =~ ^(succeeded|failed|errored|cancelled|canceled|expired)$ ]]; then
    echo "$RESULT"
    break
  fi
  sleep "$(awk "BEGIN { print $POLL_DELAY * (0.9 + ($RANDOM % 21) / 100) }")"
  POLL_DELAY=$((POLL_DELAY < 30 ? POLL_DELAY * 2 : 30))
  [ "$POLL_DELAY" -gt 30 ] && POLL_DELAY=30
done
Wait-for-results request
curl -X POST "https://api-ingress-worker-staging.browsable-staging.workers.dev/v1/tiktok/comments" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.tiktok.com/@tiktok/video/7641647587056962846","_run":{"async":false}}'
Canonical & compatibility routes

You can also send the same JSON body to /v1/tasks/tiktok-comments/runs.