{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Scraper: Videos, Comments, Search & Hot List",
    "description": "Douyin Scraper for videos by keyword, the videos of any user, single videos by link, comments and the hot list. Likes, comments, shares, favorites, dates and authors. No login, date and likes filters, pay only for real rows.",
    "version": "0.1",
    "x-build-id": "GLT5CdUtDrM4iI0o6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apisamurai~douyin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apisamurai-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/apisamurai~douyin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apisamurai-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/apisamurai~douyin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apisamurai-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": {
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Find videos that match these keywords. One per line. Chinese keywords work best, for example 美食. One search returns up to 1,000 videos from about the last 90 days.",
            "items": {
              "type": "string"
            }
          },
          "searchPostedWithin": {
            "title": "Search: posted within",
            "enum": [
              "any",
              "last3days",
              "last7days",
              "last30days"
            ],
            "type": "string",
            "description": "Only videos posted in this period. If you leave it on any time and set Posted on or after below, the smallest matching period is used.",
            "default": "any"
          },
          "searchVideoType": {
            "title": "Search: video type",
            "enum": [
              "any",
              "lowFollowerHits",
              "highCompletionRate",
              "highFollowerGrowth",
              "highLikeRate"
            ],
            "type": "string",
            "description": "Keep only videos that stand out in one way.",
            "default": "any"
          },
          "searchDuration": {
            "title": "Search: video length",
            "enum": [
              "any",
              "under15s",
              "from15to60s",
              "from1to2min",
              "from2to3min",
              "over3min"
            ],
            "type": "string",
            "description": "Only videos of this length.",
            "default": "any"
          },
          "users": {
            "title": "Users",
            "type": "array",
            "description": "Get the latest videos of these accounts. Profile links like https://www.douyin.com/user/MS4wLjABAAAA..., the bare sec_user_id (it starts with MS4wLjABAAAA), or v.douyin.com short links. One per line.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video links",
            "type": "array",
            "description": "Get these videos with full counts: douyin.com/video/<id> or douyin.com/note/<id> links, iesdouyin.com/share/video/<id> links, bare numeric video IDs, or v.douyin.com short links. One per line.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Also get comments of the videos found",
            "type": "boolean",
            "description": "On: for the videos saved from keyword search, users and video links, also save their comments (up to Max comments per video). A video with no comments costs nothing.",
            "default": false
          },
          "includeHotList": {
            "title": "Add the hot list",
            "type": "boolean",
            "description": "On: also save the current Douyin hot search list (about 50 topics).",
            "default": false
          },
          "maxVideosPerSource": {
            "title": "Max videos per keyword or user",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum videos saved for each keyword and each user. Enforced exactly. Keyword search returns at most 1,000.",
            "default": 100
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum comments saved for each video. Enforced exactly.",
            "default": 20
          },
          "maxTotalItems": {
            "title": "Max rows for the whole run",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Optional hard cap on all rows (videos, comments and hot topics) across the run. Videos are saved before comments. Leave empty for no total cap."
          },
          "postedAfter": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Only videos published on or after this day (UTC). Also accepts relative dates such as 7 days. Applies to videos, not comments. Videos outside the range are skipped and not charged. A user's list stops once its videos are older than this day."
          },
          "postedBefore": {
            "title": "Posted on or before",
            "type": "string",
            "description": "Only videos published on or before this day (UTC, the whole day is included). Videos outside the range are skipped and not charged."
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "type": "integer",
            "description": "Skip videos with fewer likes. Skipped videos are not charged."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}