{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Comments Scraper API (抖音评论): Every Comment, No Login",
    "description": "Douyin comment scraper API, no login: every top-level comment of a Douyin (抖音) video by link, share link, id or keyword, the most-liked included. Text, likes, reply count, time, commenter id and IP region, pictures. Douyin's own translation, optional sentiment. Misses free.",
    "version": "0.1",
    "x-build-id": "vRxN2sej3MD6PMhGJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hyperbach~socialdatax-douyin-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hyperbach-socialdatax-douyin-data-api",
        "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/hyperbach~socialdatax-douyin-data-api/runs": {
      "post": {
        "operationId": "runs-sync-hyperbach-socialdatax-douyin-data-api",
        "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/hyperbach~socialdatax-douyin-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-hyperbach-socialdatax-douyin-data-api",
        "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 links, share links or video ids",
            "maxItems": 5000,
            "type": "array",
            "description": "One video a line: a video or image-post link (`douyin.com/video/<id>`, `douyin.com/note/<id>`, a link with `?modal_id=<id>`, `iesdouyin.com/share/video/<id>/`), an app share link (`v.douyin.com/...`) or the copied share text around it, or a bare 19-digit video id. A value that names no video is a free `invalid_input` row.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchKeywords": {
            "title": "Search keywords (the comments of the videos found)",
            "maxItems": 100,
            "type": "array",
            "description": "Search words, one a line (Chinese or English). The run reads the comments of the first `maxVideosPerSearch` videos Douyin's search lists now; each keyword gets a free `search` row with the videos it found.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSearch": {
            "title": "Videos per keyword",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many videos each keyword gives (Douyin's search shows 8 to 16 videos a load; the run asks up to 3 loads).",
            "default": 5
          },
          "sortBy": {
            "title": "Comment order",
            "enum": [
              "likes",
              "default"
            ],
            "type": "string",
            "description": "`likes` (default): the order Douyin's own app shows, the most-liked first; every top-level comment of the video, the most-liked ones included. `default`: the web page's own order (newest first in passes; it never shows some of the most-liked comments, so a run with no cap reads those last). Douyin serves no strict newest-first order without a login.",
            "default": "likes"
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "The most top-level comments a video gives; 0 = every comment the video lists. The video's free row says COMPLETE, LIST_END or TRUNCATED against Douyin's own count.",
            "default": 100
          },
          "maxItems": {
            "title": "Max comments (whole run)",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "The most charged comment rows of the whole run; 0 = no cap beyond your charge limit.",
            "default": 0
          },
          "startCursor": {
            "title": "Start from list cursor",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Resume a video's list where an earlier run stopped: the `pageCursor` of that run's last row (it applies to every video of the run). 0 = from the start.",
            "default": 0
          },
          "videoDetails": {
            "title": "Read each video's own details",
            "type": "boolean",
            "description": "Each video's free row gets its caption, date, duration, hashtags and author (name, link, followers, total likes) from the video's page, and its own likes, shares and saves where Douyin shows them. Free; turn off for the fastest run.",
            "default": true
          },
          "translateTo": {
            "title": "Translate comments to",
            "enum": [
              "none",
              "en",
              "ja",
              "ko",
              "es",
              "fr",
              "de",
              "ru",
              "pt",
              "ar",
              "th",
              "vi",
              "id",
              "it",
              "tr",
              "zh"
            ],
            "type": "string",
            "description": "Douyin's own translator writes each comment into `textTranslated` (one call a comment, about 2 s each, 6 at a time). `none` (default) skips it.",
            "default": "none"
          },
          "sentimentAnalysis": {
            "title": "Sentiment of each comment",
            "type": "boolean",
            "description": "A sentiment score (-1 to 1), its confidence and a label (positive, neutral, negative) on each comment with text, from a classification model. A paid add-on per scored comment.",
            "default": false
          },
          "includeKeywords": {
            "title": "Only comments with any of these words",
            "maxItems": 100,
            "type": "array",
            "description": "Keep a comment only when its text holds one of these words (case-insensitive). Douyin filters nothing itself: the run reads the list and keeps the matches; a comment left out is free.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Leave out comments with any of these words",
            "maxItems": 100,
            "type": "array",
            "description": "Leave out a comment whose text holds one of these words (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyWithPictures": {
            "title": "Only comments with pictures",
            "type": "boolean",
            "description": "Keep only comments that carry a picture.",
            "default": false
          },
          "ipLocations": {
            "title": "Only commenters from these IP regions",
            "maxItems": 100,
            "type": "array",
            "description": "Keep a comment only when its IP region label (`ipLocation`, in Chinese as Douyin shows it, e.g. 北京, 广东, 美国) holds one of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Keep comments with at least this many likes. In the likes order the run stops at the first page under it.",
            "default": 0
          },
          "postedAfter": {
            "title": "Comments posted on or after",
            "type": "string",
            "description": "Only comments from this time on: a date (UTC midnight) as `2026-11-01`, a time as `2026-11-01T12:00:00Z` (UTC when no zone is written), or an age as `7 days`, `2 weeks`, `1 month` (30 days) back from the run's start. The run reads the list and keeps these; a comment left out is free."
          },
          "feedback": {
            "title": "Feedback to the maintainers",
            "maxLength": 2000,
            "type": "string",
            "description": "A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}