{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Scraper - Profiles, Videos, Comments and Trending",
    "description": "Douyin (Chinese TikTok) without login or cookies: creator profiles with their latest posts, full video stats with comments, videos that use a sound, the hot search board and creator search by keyword. Clean English fields. $1.50 per 1,000 results.",
    "version": "1.0",
    "x-build-id": "fzNefBeEOi3A0VkbN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pomlabs~douyin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pomlabs-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/pomlabs~douyin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pomlabs-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/pomlabs~douyin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pomlabs-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",
        "properties": {
          "queries": {
            "title": "Queries",
            "type": "array",
            "description": "One per line: a profile link (https://www.douyin.com/user/MS4wLjABAAAA...), a video link or id (https://www.douyin.com/video/7709904111285587242), a short share link (v.douyin.com/...), a sound link (douyin.com/music/<id>), the word trending (hot search board; trending:entertainment, trending:society, trending:seeding or trending:challenge for one board), or a keyword (creator search). Up to 20. Empty = the trending example.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Posts of a profile (Douyin shows visitors the latest ~40), videos of a sound, trends per board or creators per keyword. 1 to 1,000.",
            "default": 30
          },
          "maxComments": {
            "title": "Comments per video link",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "For video queries: how many comments to return (0 = none). Up to 1,000.",
            "default": 0
          },
          "includeRelated": {
            "title": "Related videos for video links",
            "type": "boolean",
            "description": "For video queries: also return the videos Douyin recommends next to it (up to Max results).",
            "default": false
          },
          "maxDanmaku": {
            "title": "Danmaku (bullet comments) per video link",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "For video queries: how many on-screen bullet comments (弹幕) to return, each with the second of the video it appears at (0 = none). Up to 1,000.",
            "default": 0
          },
          "trendBoards": {
            "title": "Trending boards",
            "type": "array",
            "description": "Which hot-search boards the word trending returns: hot topics (热点榜), entertainment (娱乐榜), society (社会榜), product picks (种草榜) and challenges (挑战榜). Each topic carries its board. Empty = hot topics.",
            "items": {
              "type": "string",
              "enum": [
                "hot",
                "entertainment",
                "society",
                "seeding",
                "challenge"
              ],
              "enumTitles": [
                "Hot topics 热点榜",
                "Entertainment 娱乐榜",
                "Society 社会榜",
                "Product picks 种草榜",
                "Challenges 挑战榜"
              ]
            },
            "default": [
              "hot"
            ]
          },
          "includeTrendVideos": {
            "title": "Lead video of each trending topic",
            "type": "boolean",
            "description": "For trending: also return the video Douyin opens for each topic, with full stats (charged as a video).",
            "default": false
          },
          "recentDays": {
            "title": "Profile posts from the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "For profile queries: only posts published in the last N days (0 = no limit).",
            "default": 0
          },
          "oldestPostDate": {
            "title": "Profile posts published on or after",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "For profile queries: only posts published on or after this date (YYYY-MM-DD, China time)."
          },
          "excludePinned": {
            "title": "Exclude pinned posts",
            "type": "boolean",
            "description": "For profile queries: skip the posts the creator pinned to the top.",
            "default": false
          },
          "downloadVideos": {
            "title": "Download MP4 videos",
            "type": "boolean",
            "description": "Save each video's MP4 (no watermark) to the run's key-value store; the link goes in videoFile. Charged per stored file. Every video also carries videoUrl, a no-watermark link that does not expire, at no extra cost.",
            "default": false
          },
          "downloadCovers": {
            "title": "Download cover images",
            "type": "boolean",
            "description": "Save each video's cover image to the key-value store (coverFile). $0.0025 per cover saved.",
            "default": false
          },
          "downloadImages": {
            "title": "Download photo-post images",
            "type": "boolean",
            "description": "Save every image of photo posts to the key-value store (imageFiles). $0.0025 per image saved.",
            "default": false
          },
          "kvStoreName": {
            "title": "Key-value store name",
            "type": "string",
            "description": "Optional named key-value store for the downloads (kept after the run). Empty = the run's own store."
          },
          "searchType": {
            "title": "Keyword search",
            "enum": [
              "users"
            ],
            "type": "string",
            "description": "What keywords search. Creators (users) for now.",
            "default": "users"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}