{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Scraper — 抖音 Search, Videos, Users & Comments",
    "description": "Scrape Douyin (抖音, China's TikTok) without login: keyword video search, user search, video details by URL, comments, profiles and the hot-search boards. Videos with likes, comments, shares, saves, hashtags, music, cover and video URL, plus the author's followers and IP location.",
    "version": "1.0",
    "x-build-id": "cSokE8L1nVPyQIBOL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~douyin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-douyin-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/logiover~douyin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-logiover-douyin-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/logiover~douyin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-douyin-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "search",
              "users",
              "videos",
              "comments",
              "profiles",
              "trending"
            ],
            "type": "string",
            "description": "<b>Search videos</b> — videos for each keyword (Douyin's video tab and general tab). <b>Search users</b> — creator accounts for each keyword. <b>Video details</b> — one row per video URL / id. <b>Comments</b> — the comments of each video URL / id. <b>Profiles</b> — one row per profile URL, sec_uid or Douyin ID (抖音号). <b>Hot search</b> — Douyin's trending boards (抖音热榜).",
            "default": "search"
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "For \"Search videos\" and \"Search users\". One keyword per line. Chinese keywords (美食, 旅行, 健身 …) match far more content than English ones. Each keyword returns what Douyin's search shows for it (typically 60–300 videos); add more keywords — or turn on \"Add related keywords\" — for bigger datasets.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Douyin URLs or IDs",
            "type": "array",
            "description": "For \"Video details\" and \"Comments\": video links (https://www.douyin.com/video/…, /note/…, v.douyin.com short links, share links) or bare video ids. For \"Profiles\": profile links (https://www.douyin.com/user/…), sec_uid values (MS4wLjABAAAA…), v.douyin.com profile short links or Douyin IDs (抖音号).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows in total (videos, users, comments …). 0 = no limit (the run stops when every keyword or URL is read, or at the run's maximum cost).",
            "default": 1000
          },
          "maxItemsPerKeyword": {
            "title": "Max results per keyword",
            "minimum": 0,
            "type": "integer",
            "description": "Cap for each keyword, so a long keyword list is spread evenly. 0 = everything Douyin returns for the keyword.",
            "default": 0
          },
          "searchTabs": {
            "title": "Search tabs",
            "enum": [
              "all",
              "video",
              "general"
            ],
            "type": "string",
            "description": "Which of Douyin's search tabs to read for each keyword. Both tabs together return the most unique videos (duplicates are removed).",
            "default": "all"
          },
          "expandRelatedKeywords": {
            "title": "Add related keywords (相关搜索)",
            "type": "boolean",
            "description": "Also search the related keywords Douyin suggests under the results (相关搜索), up to the limit below. Turns a few seed keywords into thousands of videos on the same topic.",
            "default": false
          },
          "maxRelatedKeywords": {
            "title": "Max related keywords",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many related keywords may be added in total when \"Add related keywords\" is on.",
            "default": 30
          },
          "includeAuthorProfiles": {
            "title": "Include author profiles (followers, likes, IP location)",
            "type": "boolean",
            "description": "Douyin hides follower and like counts inside search results. With this on, each author's profile is read once (cached) and the row gets followers, following, total likes, video count, signature and IP location (IP属地). Turn off for the fastest possible run.",
            "default": true
          },
          "userFollowers": {
            "title": "User search: follower range",
            "enum": [
              "",
              "0_1k",
              "1k_1w",
              "1w_10w",
              "10w_100w",
              "100w_"
            ],
            "type": "string",
            "description": "Only for \"Search users\": Douyin's own follower filter (粉丝数量).",
            "default": ""
          },
          "userType": {
            "title": "User search: account type",
            "enum": [
              "",
              "common_user",
              "enterprise_user",
              "personal_user"
            ],
            "type": "string",
            "description": "Only for \"Search users\": Douyin's own account-type filter (用户类型).",
            "default": ""
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Only for \"Comments\": how many top-level comments to read for each video, in Douyin's own default order (its hot ranking: popular comments first, mixed with recent ones).",
            "default": 100
          },
          "trendingBoards": {
            "title": "Hot search boards",
            "type": "array",
            "description": "Only for \"Hot search\": which of Douyin's boards to export (about 50 entries each).",
            "items": {
              "type": "string",
              "enum": [
                "hot",
                "entertainment",
                "society",
                "challenge"
              ],
              "enumTitles": [
                "Hot search (热榜)",
                "Entertainment (娱乐榜)",
                "Society (社会榜)",
                "Challenges (挑战榜)"
              ]
            },
            "default": [
              "hot"
            ]
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: the Actor chooses the route itself (direct connection first, then Apify datacenter and, for small runs, residential IPs when Douyin refuses one). Set a proxy only if you want every request to go through it.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}