{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Scraper ✅ Xingtu Influencer Analytics",
    "description": "Scrape Douyin (抖音) by keyword or URL: video search with likes, comments and shares; full profiles; single video detail; comments; danmaku; real-time trends; plus Xingtu influencer analytics and creator advertising rate cards. No cookies, no login. Pay only for results returned.",
    "version": "1.0",
    "x-build-id": "Q6fLsKgjXvcQIfciR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atomus~douyin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atomus-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/atomus~douyin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-atomus-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/atomus~douyin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-atomus-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": [
          "searchType"
        ],
        "properties": {
          "searchType": {
            "title": "🎯 What to scrape: mode ($ per result) / 抓取模式（按结果计费）",
            "enum": [
              "search",
              "video-detail",
              "profile",
              "user-posts",
              "comments",
              "danmaku",
              "trends",
              "creator-search",
              "xingtu-analytics",
              "rate-card"
            ],
            "type": "string",
            "description": "Choose the mode. Each mode is a PAID event billed per result at the price shown in its name below. Failed or empty lookups are free. Gold and higher Apify plans get 20% off. // 选择模式；每个模式都是按结果计费的付费事件，价格见下方各选项名称；查询失败或为空免费，Gold 及以上套餐 8 折。",
            "default": "search"
          },
          "keywords": {
            "title": "🔍 Keywords / 关键词",
            "type": "array",
            "description": "Used by \"Keyword search\" and \"Xingtu creator search\". One or more terms, e.g. \"美食\" (food), \"旅行\" (travel). // 用于「关键词搜索」和「星图达人搜索」，可填写一个或多个关键词。",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "🔗 Video URLs or IDs / 视频链接或ID",
            "type": "array",
            "description": "Used by \"Video detail\", \"Video comments\", and \"Danmaku\". Paste Douyin video URLs (https://www.douyin.com/video/...), share links, or bare numeric aweme IDs. // 用于「视频详情」「视频评论」「弹幕」，可粘贴抖音视频链接、分享链接或数字视频ID。",
            "items": {
              "type": "string"
            }
          },
          "userUrls": {
            "title": "👤 Profile URLs or sec_user_id / 用户主页链接或ID",
            "type": "array",
            "description": "Used by \"User profile\" and \"User's posts\". Paste Douyin profile URLs (https://www.douyin.com/user/MS4w...) or bare sec_user_id values. // 用于「用户主页」和「用户作品」，可粘贴抖音主页链接或 sec_user_id。",
            "items": {
              "type": "string"
            }
          },
          "creatorHandles": {
            "title": "⭐ Creator handles (抖音号) / 达人抖音号",
            "type": "array",
            "description": "Used by \"Xingtu creator analytics\" and \"Xingtu creator rate card\". Paste Douyin handles (unique_id, e.g. \"XiaoZhenlla\"); the actor resolves each to its Xingtu KOL id. // 用于「星图达人数据」和「星图达人报价」，填写抖音号（unique_id），系统自动解析为星图达人ID。",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "💯 Max results per keyword/target ($ scales with this) / 每个关键词或目标的最大结果数（数量越大费用越高）",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many results to return per keyword or target (search, comments, danmaku, trends). Each result is billed at the mode's price, so a higher number costs more. Detail / profile / analytics / rate-card return one record per target. // 每个关键词或目标返回的最大结果数（搜索/评论/弹幕/榜单）；每条结果按模式价格计费，数量越大费用越高。详情/主页/达人数据/报价每个目标返回一条记录。",
            "default": 20
          },
          "sortType": {
            "title": "📊 Sort order (search) / 排序方式",
            "enum": [
              "综合排序",
              "最多点赞",
              "最新发布"
            ],
            "type": "string",
            "description": "Only for \"Keyword search\". // 仅用于「关键词搜索」。",
            "default": "综合排序"
          },
          "publishTime": {
            "title": "🕒 Time filter (search) / 发布时间筛选",
            "enum": [
              "不限",
              "一天内",
              "一周内",
              "半年内"
            ],
            "type": "string",
            "description": "Only for \"Keyword search\". Restrict results by publish time. // 仅用于「关键词搜索」，按发布时间筛选。",
            "default": "不限"
          },
          "duration": {
            "title": "⏱️ Duration filter (search) / 时长筛选",
            "enum": [
              "不限",
              "一分钟以内",
              "一到五分钟",
              "五分钟以上"
            ],
            "type": "string",
            "description": "Only for \"Keyword search\". Restrict results by video length. // 仅用于「关键词搜索」，按视频时长筛选。",
            "default": "不限"
          },
          "contentType": {
            "title": "🎬 Content type filter (search) / 内容类型筛选",
            "enum": [
              "不限",
              "视频",
              "图片",
              "文章"
            ],
            "type": "string",
            "description": "Only for \"Keyword search\". Restrict results to a content type. // 仅用于「关键词搜索」，按内容类型筛选。",
            "default": "不限"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}