{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin 抖音 Scraper - Videos, Comments, Profiles & Hot Search",
    "description": "Scrape Douyin (抖音, the Chinese TikTok): video search, creator (博主) videos and profiles, comments, followers, hashtag and sound feeds, and the hot search board (热榜). Video authors and commenters come with user ID, sec_uid and IP location. No login or cookies needed. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "kXKVJ2uUk9BpYyMFD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clover_folktale~douyin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clover_folktale-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/clover_folktale~douyin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-clover_folktale-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/clover_folktale~douyin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-clover_folktale-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": "Mode",
            "enum": [
              "hot",
              "search",
              "creator",
              "video",
              "profile",
              "hashtag",
              "comments",
              "followers",
              "following",
              "users",
              "music",
              "board"
            ],
            "type": "string",
            "description": "What to scrape: the hot search board, videos by keyword, a creator's videos, details of videos, creator profiles, comments of videos, the videos of a hashtag, a creator's followers or following list, creator search, the videos using a sound, or the extended boards (hot videos, topics, rising and city hot spots).",
            "default": "hot"
          },
          "keyword": {
            "title": "Keyword (modes: search, users, board)",
            "type": "string",
            "description": "Search keyword. Chinese keywords work best, e.g. \"美食\". In mode board it is an optional filter on the board (leave empty for the full board).",
            "default": "美食"
          },
          "creators": {
            "title": "Creators (modes: creator, profile, followers, following)",
            "type": "array",
            "description": "Douyin profile URLs (https://www.douyin.com/user/MS4w...), v.douyin.com share links or sec_uid values. Many creators hide their followers or following list: those return nothing.",
            "items": {
              "type": "string"
            }
          },
          "videos": {
            "title": "Videos (modes: video, comments)",
            "type": "array",
            "description": "Douyin video URLs (https://www.douyin.com/video/...), v.douyin.com share links or numeric video IDs.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags (mode: hashtag)",
            "type": "array",
            "description": "Hashtag IDs or URLs (https://www.douyin.com/hashtag/1767587367821390). The ID of a hashtag is in its page URL.",
            "items": {
              "type": "string"
            }
          },
          "musics": {
            "title": "Sounds (mode: music)",
            "type": "array",
            "description": "Douyin sound URLs (https://www.douyin.com/music/7482371896877665043) or numeric sound IDs. Every video lists its sound as musicId.",
            "items": {
              "type": "string"
            }
          },
          "board": {
            "title": "Board (mode: board)",
            "enum": [
              "videos",
              "topics",
              "risingTopics",
              "rising",
              "city"
            ],
            "type": "string",
            "description": "Which board to read: hot videos, hot topics (hashtags), topics rising fastest, rising hot spots, or hot spots of one city.",
            "default": "videos"
          },
          "timeWindowHours": {
            "title": "Time window (mode: board; videos, topics, rising topics)",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "How far back the video and topic boards look, in hours. Allowed values: 1, 24, 72 or 168.",
            "default": 24
          },
          "city": {
            "title": "City (mode: board, board: city)",
            "type": "string",
            "description": "Chinese city name (e.g. 杭州) or numeric city code. Empty reads the hot spots of all cities."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of items to return in total for this run. You are charged per item returned. On the free Apify plan a run returns at most 20 results in total; any paid Apify plan removes the limit.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}