Skip to content

Python guide

Scrape TikTok comments
with Python.
One script. Every comment.

Text, likes, reply counts and dates for every comment on a public TikTok video, saved to CSV. One API key. No TikTok login, cookies or browser.

  • 1 creditper page
  • ~50comments a page
  • 0TikTok logins
import csv
import os
import requests

API_URL = "https://www.monocrawl.com/v1/tiktok/post-comments"
HEADERS = {"x-api-key": os.environ["MONOCRAWL_API_KEY"]}
VIDEO = "https://www.tiktok.com/@mkbhd/video/7655355767746284814"


def get_comments(video_url, max_pages=100):
    params = {"url": video_url}
    for _ in range(max_pages):
        body = requests.get(API_URL, params=params, headers=HEADERS, timeout=60).json()
        if not body.get("success"):
            raise RuntimeError(body["error"]["message"])
        yield from body["data"]["items"]
        if not body["data"].get("has_more"):
            break
        params = {"url": video_url, "cursor": body["data"]["cursor"]}


with open("comments.csv", "w", newline="", encoding="utf-8") as file:
    writer = csv.writer(file)
    writer.writerow(["id", "created_at", "likes", "replies", "author", "text"])
    for comment in get_comments(VIDEO):
        writer.writerow([comment["id"], comment["created_at"], comment["likes"],
                         comment["reply_count"], comment["author"]["handle"], comment["text"]])

$ python comments.py

GET /v1/tiktok/post-comments page 1

✓ 49 comments · 1 credit · has_more: true

↻ following the cursor until has_more is false

✓ comments.csv · this video: 1,355 comments ≈ 28 pages ≈ 28 credits (estimate)

Replay of a real call, recorded 26 Sep 2026

Four steps

Copy, paste, run.
See what each step returns.

Terminal
export MONOCRAWL_API_KEY="mn_your_key_here"
pip install requests

What you get

MONOCRAWL_API_KEY=mn_••••••••Free plan · 1,000 credits a month · No card

What comes back

One page.
Real comments.

A real page from a Marques Brownlee TikTok about Apple’s price rises: 49 of its 1,355 comments, for 1 credit. The first 6 are below, commenters left out.

  • idThe comment’s TikTok id
  • textWhat the commenter wrote
  • created_atWhen, as an ISO timestamp
  • likesLikes on the comment
  • reply_countReplies in its thread
  • authorThe commenter’s id, handle and name
  1. Suddenly the Neo not so appealing

    5,4492325 Jun 2026
  2. “Temporary price increases” I’ve never seen a company raise the price and go back down. Once they see enough people are willing to pay these prices they won’t go down.

    10,2243325 Jun 2026
  3. Reminder... Apple has almost $150 billion in cash reserves. They don't NEED to do this. They don't care about customers.

    1,1162025 Jun 2026
  4. All this for AI slop

    1,228325 Jun 2026
  5. you don't hate AI enough

    2,150525 Jun 2026
  6. there’s no such thing as temporary price increase

    1,043326 Jun 2026
Show the JSON
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "7655398064869901070",
        "text": "Suddenly the Neo not so appealing",
        "created_at": "2026-06-25T18:15:01.000Z",
        "likes": 5449,
        "reply_count": 23
      },
      {
        "id": "7655361959764116237",
        "text": "“Temporary price increases” I’ve never seen a company raise the price and go back down. Once they see enough people are willing to pay these prices they won’t go down.",
        "created_at": "2026-06-25T15:54:51.000Z",
        "likes": 10224,
        "reply_count": 33
      },
      {
        "id": "7655396770322744094",
        "text": "Reminder... Apple has almost $150 billion in cash reserves. They don't NEED to do this. They don't care about customers.",
        "created_at": "2026-06-25T18:09:37.000Z",
        "likes": 1116,
        "reply_count": 20
      },
      {
        "id": "7655360792607474445",
        "text": "All this for AI slop",
        "created_at": "2026-06-25T15:50:30.000Z",
        "likes": 1228,
        "reply_count": 3
      },
      {
        "id": "7655383483145863958",
        "text": "you don't hate AI enough",
        "created_at": "2026-06-25T17:18:02.000Z",
        "likes": 2150,
        "reply_count": 5
      },
      {
        "id": "7655498775855940360",
        "text": "there’s no such thing as temporary price increase",
        "created_at": "2026-06-26T00:45:29.000Z",
        "likes": 1043,
        "reply_count": 3
      }
    ],
    "count": 49,
    "cursor": "mlc1.…",
    "has_more": true,
    "total": 1355
  }
}

Cost

1 credit a page.
Nothing for failures.

Every page of about 50 comments costs 1 credit, and replies cost the same. Slide to see what a video costs.

28credits, one per page
35videos like this a month on the free plan
357on Starter, $29 a month

About 50 comments a page; the recorded page returned 49. Failed calls are free.

Two more things

Replies, errors
and rate limits.

Replies to a comment

A comment with replies has its own thread. Fetch it from tiktok/comment-replies with the video URL and the comment’s id: same fields, same cursor, 1 credit a page.

replies.py
REPLIES_URL = "https://www.monocrawl.com/v1/tiktok/comment-replies"

params = {"url": VIDEO, "comment_id": "7655361959764116237"}
body = requests.get(REPLIES_URL, params=params, headers=HEADERS, timeout=60).json()
for reply in body["data"]["items"]:
    print(reply["likes"], reply["text"])

Errors and rate limits

A failed call returns success: false with an error type and message, and costs nothing. On HTTP 429, wait and try again.

Rate limits by plan
comments.py
import time

def get_page(params, attempts=5):
    for attempt in range(attempts):
        response = requests.get(API_URL, params=params, headers=HEADERS, timeout=60)
        if response.status_code != 429:
            return response.json()
        time.sleep(2 ** attempt)
    raise RuntimeError("Still rate limited; try again later")

Other platforms

Same loop.
Swap the endpoint.

The same key collects comments from other platforms. Each endpoint’s reference lists its fields and paging.

Questions

Scraping TikTok comments,
answered.

Do I need a TikTok account, cookies or a browser?

No. You call Monocrawl with your API key and get the comments back as JSON. It works for public videos.

How many comments does one call return?

About 50. The recorded page returned 49, with has_more set to true and a cursor for the next page.

What does it cost?

1 credit for each page that comes back, and replies cost the same. The free plan’s 1,000 credits a month cover about 1,000 pages, and failed calls are free.

Can I get the replies to a comment?

Yes. Use tiktok/comment-replies with the video URL and the comment’s id. It returns replies with the same fields and pages them the same way.

Can I collect comments from many videos?

Yes. Run the same loop for each video URL. Each video is paged on its own, with its own cursor.

Does TikTok have an official API for comments?

TikTok’s own APIs have their own access rules. Our TikTok data API comparison sets out the official routes and the main providers side by side.

Start free

Every comment on a TikTok video.
1 credit a page.

1,000 free credits every month. No card required.

Get a free API key