{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin 抖音 Search Scraper & Video Downloader — 1080p MP4 & Shop",
    "description": "[100% No Cookie / No Login — $4.5/1k] All-in-one Douyin (抖音 / Chinese TikTok) API. Extract keyword videos, 1080p no-watermark MP4 & MP3 links, AI transcripts, comments with English IP provinces, KOL profiles, Douyin Shop products & Top 50 hot search. Ready for n8n & Claude MCP.",
    "version": "0.0",
    "x-build-id": "gX928eiiGvMcSSTAg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axon-studio~douyin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axon-studio-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/axon-studio~douyin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axon-studio-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/axon-studio~douyin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axon-studio-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": {
          "mode": {
            "title": "🎯 1. Scraping Mode (抓取模式)",
            "enum": [
              "search_videos",
              "video_details",
              "video_comments",
              "user_profile",
              "user_videos",
              "search_users",
              "hot_search"
            ],
            "type": "string",
            "description": "Select what to extract from Douyin. All inputs (keywords, video links, share text, or creator links) go directly into Box #2 below!",
            "default": "search_videos"
          },
          "searchQuery": {
            "title": "🔍 2. Keywords, Video URLs, Share Links or Creator URLs (万能输入框)",
            "type": "array",
            "description": "Universal input box:\n• For Video / KOL Search: Enter keywords in English or Chinese (e.g., 'Xiaomi SU7', 'Shanghai travel', '美食')\n• For Video Details / Comments: Paste Douyin video URLs (https://www.douyin.com/video/...), 19-digit awemeIds, or v.douyin.com mobile share links\n• For Creator Profile / Videos: Paste creator profile URLs (https://www.douyin.com/user/...) or sec_uid",
            "default": [
              "Xiaomi SU7",
              "Shanghai travel"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "📺 3. Maximum Results (最大抓取条数)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of records to extract (1 to 5,000; Free plan preview: up to 15 results per run, 5 lifetime preview runs).",
            "default": 30
          },
          "sortBy": {
            "title": "📊 4. Sort Order (排序方式)",
            "enum": [
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Sort matching Douyin videos by relevance ('0'), most liked ('1'), or newest published ('2').",
            "default": "0"
          },
          "publishTime": {
            "title": "📅 5. Published Within (发布时间筛选)",
            "enum": [
              "0",
              "1",
              "7",
              "180"
            ],
            "type": "string",
            "description": "Filter videos by publication window: any time ('0'), last 24 hours ('1'), last 7 days ('7'), or last 6 months ('180').",
            "default": "0"
          },
          "downloadVideos": {
            "title": "📥 6. Download 1080p MP4 Videos to Key-Value Store (下载保存无水印MP4视频文件)",
            "type": "boolean",
            "description": "When enabled, downloads the unwatermarked MP4 video file directly into your Apify Key-Value Store and outputs a permanent 'downloadedVideoUrl' link.",
            "default": false
          },
          "scrapeComments": {
            "title": "💬 7. Also Scrape Comments for Each Video (顺带抓视频评论)",
            "type": "boolean",
            "description": "When enabled, automatically extracts up to 'maxCommentsPerVideo' comments (with IP province geolocation) for each scraped video.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "🔢 8. Max Comments per Video",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum comments to extract per video when 'scrapeComments' is enabled.",
            "default": 10
          },
          "includeCreatorProfiles": {
            "title": "👤 9. Also Scrape Full Creator / KOL Profile for Each Video (顺带抓达人档案)",
            "type": "boolean",
            "description": "When enabled, emits a dedicated 'user_profile' record (followers, total likes, Douyin ID) for each unique video author.",
            "default": false
          },
          "autoLocalize": {
            "title": "🌐 10. Auto-Translate English Queries to Chinese",
            "type": "boolean",
            "description": "Automatically translates English brand or topic queries into native Simplified Chinese Douyin search terms.",
            "default": true
          },
          "onlyNewResults": {
            "title": "🔄 11. Delta Mode — Only Emit New Results Across Scheduled Runs",
            "type": "boolean",
            "description": "Remembers previously scraped IDs in persistent storage so scheduled runs only output new Douyin items.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 12. Proxy Configuration (Optional)",
            "type": "object",
            "description": "Optional proxy settings. Works out-of-the-box without proxies.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}