{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Comments Scraper",
    "description": "TikTok comments scraper: export the comments on public TikTok videos, by link, numeric id or creator. Each row has the text, like count, reply count, the author's handle and avatar, timestamp and any attached images. Replies and a keyword filter are optional. $0.25 per 1,000 comments.",
    "version": "0.1",
    "x-build-id": "eTMichzFoEqzkeGWw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~tiktok-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-tiktok-comments-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/dami_studio~tiktok-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-tiktok-comments-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/dami_studio~tiktok-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-tiktok-comments-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "TikTok video or photo post links to scrape comments from. Share links copied from the app (vm.tiktok.com, vt.tiktok.com) work too.",
            "items": {
              "type": "string"
            }
          },
          "videoIds": {
            "title": "Video IDs",
            "type": "array",
            "description": "Or bare numeric video IDs.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "Optional. TikTok usernames or profile links. Each one adds its newest public videos to the run, as many as Videos per profile says, and their comments come back like any other video's. Up to 10 videos a profile, or up to 10,000 with Deep read on.",
            "items": {
              "type": "string"
            }
          },
          "videosPerProfile": {
            "title": "Videos per profile",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many of each profile's newest videos to read, after the date and pinned settings below. 1 to 10, or up to 10,000 with Deep read on (paid plans).",
            "default": 5
          },
          "videosPostedAfter": {
            "title": "Videos posted on or after",
            "type": "string",
            "description": "Profiles only. Keeps the videos posted on or after this day, counted in UTC, for example 2026-10-01, or within a span such as 30 days. Older videos are skipped before their comments are read. Leave it empty for no date limit."
          },
          "videosPostedBefore": {
            "title": "Videos posted before",
            "type": "string",
            "description": "Profiles only. Keeps the videos posted before this day, counted in UTC: 2026-10-15 keeps videos up to the end of 14 October, and 7 days keeps those older than a week. Leave it empty for no date limit."
          },
          "skipPinnedVideos": {
            "title": "Skip pinned videos",
            "type": "boolean",
            "description": "Profiles only. Skips the videos a creator pinned to the top of their profile, so you get comments from their newest ones. A pinned video that is also the newest stays in.",
            "default": false
          },
          "maxComments": {
            "title": "Max comments",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Max comments across the whole run, replies included. Charged per comment.",
            "default": 100
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Optional. A limit for each video instead of an even share of Max comments. Max comments still caps the run. Leave it empty to share Max comments across the videos."
          },
          "includeReplies": {
            "title": "Add replies",
            "type": "boolean",
            "description": "Adds the replies under each comment, as rows of their own right after it, with isReply, parentCommentId and replyToCommentId. Each reply is charged as a comment and counts toward Max comments.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "With Add replies on: how many replies to take under each comment. 0 means none.",
            "default": 10
          },
          "commentDetails": {
            "title": "Extra comment details",
            "type": "boolean",
            "description": "Adds likedByAuthor (the video's creator liked it), language, commentUrl and labels (such as Creator) to each row. On some videos those fields are empty; the comments still come back.",
            "default": false
          },
          "includeVideoCaption": {
            "title": "Add the video's caption",
            "type": "boolean",
            "description": "Adds videoCaption, the video's own caption, to every comment row of that video.",
            "default": false
          },
          "notionConnector": {
            "title": "Notion connector ID (optional)",
            "type": "string",
            "description": "Optional. Deliver results to your connected Notion via Apify MCP connectors."
          },
          "notionParentId": {
            "title": "Notion data-source ID (optional)",
            "type": "string",
            "description": "Optional Notion database/data-source id."
          },
          "sessionCookies": {
            "title": "Account cookies (not needed)",
            "type": "array",
            "description": "Optional: your own session, used only for your run. You are responsible for using it within the site's terms. Runs work without it."
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Not required, this scraper needs no proxy.",
            "default": {
              "useApifyProxy": false
            }
          },
          "onlyCommentsNewerThan": {
            "title": "Only comments newer than",
            "type": "string",
            "description": "Optional cut-off. A date (2026-01-31, or a full timestamp like 2026-01-31T18:00:00Z), a span (3 days, 2 weeks ago, 24h, 7d), or yesterday / today. Comments and replies older than this are left out and never charged, so a re-check of the same videos returns only what is new. On a video with many older comments it stops looking after four times that video's share of Max comments (at least 100), and says so. A value it cannot read stops the run before any request, with a free note."
          },
          "deepRead": {
            "title": "Deep read (paid plans)",
            "type": "boolean",
            "description": "Paid plans only. Videos per profile can then go up to 10,000: a profile's videos are read newest first, older ones included. Comments and replies come back as usual and are charged per comment, nothing extra. On the Free plan a run reads as it does with this off.",
            "default": false
          },
          "profileSorting": {
            "title": "Profile video order",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Profiles only. Which of a creator's videos come first: the newest (latest), the most played (popular) or the oldest. Popular and oldest need Deep read on, on a paid plan; without it each profile gives its newest videos and the status message says so.",
            "default": "latest"
          },
          "topLevelCommentsPerVideo": {
            "title": "Max top-level comments per video",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Optional. How many top-level comments to take from each video; with Add replies on, their replies come on top of this number. Max comments and Max comments per video still cap the run."
          },
          "commentKeywords": {
            "title": "Only comments containing",
            "maxItems": 100,
            "type": "array",
            "description": "Optional. Keeps only the comments and replies whose text holds at least one of these words or phrases, ignoring case. The rest are read, left out and never charged, and replies are looked for only under comments that match. Up to 100 entries.",
            "items": {
              "type": "string"
            }
          },
          "videoDetails": {
            "title": "Add the video's numbers",
            "type": "boolean",
            "description": "Adds the video's own details to each of its rows, at the end: videoAuthor, videoCreateTime, videoPlayCount, videoLikeCount, videoCommentCount, videoShareCount, videoSaveCount, videoDuration (seconds), and byVideoAuthor (the comment is by the video's creator). Charged per comment as usual, nothing extra.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}