{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Analytics 抖音数据分析 - Audience, Trends & Keywords",
    "description": "Douyin analytics without login: follower and audience insight for accounts and creators, video performance and comment words, keyword heat index (巨量算数), related words, hot topics, category trends and search suggestions. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "lmfbYpMUJkkU0hDF1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clover_folktale~douyin-analytics-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clover_folktale-douyin-analytics-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-analytics-scraper/runs": {
      "post": {
        "operationId": "runs-sync-clover_folktale-douyin-analytics-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-analytics-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-clover_folktale-douyin-analytics-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": [
              "accountInsight",
              "videoInsight",
              "creatorIndex",
              "similarCreators",
              "keywordTrend",
              "keywordAudience",
              "relatedWords",
              "keywordSuggestions",
              "hotTopics",
              "indexVideos",
              "categoryInsight",
              "reports",
              "creatorActivities",
              "creatorCourses",
              "creatorCourseList",
              "creatorCompare",
              "reportDetail",
              "reportRecommendations"
            ],
            "type": "string",
            "description": "What to fetch: an analysis record per account, video, creator, keyword or content category; or rows of similar creators, related words, suggestions, hot topics, videos and trend reports, and the creator center's activities and courses; a creator's period comparison; the full record of a trend report; the reports recommended next to a report.",
            "default": "accountInsight"
          },
          "accounts": {
            "title": "Accounts (modes: accountInsight)",
            "type": "array",
            "description": "Douyin profile links (https://www.douyin.com/user/...) or sec_uid values (they start with MS4wLjAB). Each account is one insight record. Works for accounts the source tracks; an unknown account returns nothing. Falls back to a sample account when empty.",
            "items": {
              "type": "string"
            }
          },
          "videos": {
            "title": "Videos (mode: videoInsight)",
            "type": "array",
            "description": "Douyin video links (https://www.douyin.com/video/...) or video IDs (long numbers). Short share links are not supported. Videos from the last weeks that have drawn attention work best; an old or unknown video returns nothing.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (modes: keywordTrend, keywordAudience, relatedWords, keywordSuggestions, indexVideos, reports, hotTopics)",
            "type": "array",
            "description": "Keywords or topic names, in Chinese. keywordTrend, keywordAudience: one record per keyword. relatedWords, keywordSuggestions, indexVideos: rows per keyword. reports: optional, searches the reports (empty lists the recommended ones). hotTopics: needed only for the topicSearch and topicDetail lists.",
            "items": {
              "type": "string"
            }
          },
          "days": {
            "title": "Days (modes: videoInsight, creatorIndex, keywordTrend, keywordAudience, creatorActivities)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Length of the period that ends yesterday. Default: 7 days for videoInsight, 14 for keywordTrend and keywordAudience, 30 for creatorIndex. creatorActivities: how many days ahead to list activities for (default 30)."
          },
          "region": {
            "title": "Region (mode: keywordTrend)",
            "enum": [
              "all",
              "北京",
              "天津",
              "河北",
              "山西",
              "内蒙古",
              "辽宁",
              "吉林",
              "黑龙江",
              "上海",
              "江苏",
              "浙江",
              "安徽",
              "福建",
              "江西",
              "山东",
              "河南",
              "湖北",
              "湖南",
              "广东",
              "广西",
              "海南",
              "重庆",
              "四川",
              "贵州",
              "云南",
              "西藏",
              "陕西",
              "甘肃",
              "青海",
              "宁夏",
              "新疆",
              "台湾",
              "香港",
              "澳门"
            ],
            "type": "string",
            "description": "Show the keyword trend for one province instead of the whole country. Default: nationwide. Not available for keywordAudience, whose source has no region filter.",
            "default": "all"
          },
          "hotList": {
            "title": "Hot list (mode: hotTopics)",
            "enum": [
              "realtime",
              "rising",
              "hotWords",
              "recommendedWords",
              "topicSearch",
              "topicDetail"
            ],
            "type": "string",
            "description": "realtime: the live hot topics (30). rising: fastest-rising topics (30). hotWords: popular keywords (20). recommendedWords: recommended trending words (5). topicSearch: topics matching each keyword (up to 100). topicDetail: the best videos under each hot topic name (up to 50).",
            "default": "realtime"
          },
          "suggestionType": {
            "title": "Suggestion source (mode: keywordSuggestions)",
            "enum": [
              "topic",
              "video",
              "searchBox"
            ],
            "type": "string",
            "description": "topic: matching topics (up to 20 rows per keyword). video: matching trending videos (up to 20 rows). searchBox: what Douyin's search box suggests, one record per keyword with the phrases in a list (often only a few).",
            "default": "topic"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of records or rows to return in total for this run. You are charged per record or row returned.",
            "default": 20
          },
          "creators": {
            "title": "Creators (modes: creatorIndex, similarCreators, creatorCompare)",
            "type": "array",
            "description": "Douyin user IDs (numbers), sec_uid values, Douyin profile links, or creator names (the best match of a name search is used, so prefer an ID or link). Each creator is one record (creatorIndex) or up to 20 rows (similarCreators). Works for creators the source tracks. creatorCompare takes Douyin user IDs (numbers) only; each ID is one record and is looked up on its own.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories (mode: categoryInsight)",
            "type": "array",
            "description": "Content categories, one record per category for the last full week (Monday to Sunday). Empty means food. One of: drama, celebrity, variety, movies, tv-series, music, anime, games, society, public-welfare, casual-shots, dance, animals, agriculture, tech, finance, mom-baby, parenting, home-life, law, health, science, emotion, culture, workplace, education, photography, food, travel, fashion, art, sports, entertainment, auto, life-records.",
            "items": {
              "type": "string"
            }
          },
          "videoCategory": {
            "title": "Video category (mode: indexVideos)",
            "enum": [
              "any",
              "drama",
              "celebrity",
              "variety",
              "movies",
              "tv-series",
              "music",
              "anime",
              "games",
              "society",
              "public-welfare",
              "casual-shots",
              "dance",
              "animals",
              "agriculture",
              "tech",
              "finance",
              "mom-baby",
              "parenting",
              "home-life",
              "law",
              "health",
              "science",
              "emotion",
              "culture",
              "workplace",
              "education",
              "photography",
              "food",
              "travel",
              "fashion",
              "art",
              "sports",
              "entertainment",
              "auto",
              "life-records"
            ],
            "type": "string",
            "description": "Only videos of this content category.",
            "default": "any"
          },
          "publishedWithin": {
            "title": "Published within (mode: indexVideos)",
            "enum": [
              "any",
              "3days",
              "7days",
              "30days"
            ],
            "type": "string",
            "description": "Only videos published in this period.",
            "default": "any"
          },
          "videoLabel": {
            "title": "Video type (mode: indexVideos)",
            "enum": [
              "any",
              "lowFollowerHit",
              "highCompletionRate",
              "highFollowerGrowth",
              "highLikeRate"
            ],
            "type": "string",
            "description": "Only videos flagged by the source: a hit from a low-follower account, a high completion rate, high follower growth or a high like rate.",
            "default": "any"
          },
          "videoDuration": {
            "title": "Video length (mode: indexVideos)",
            "enum": [
              "any",
              "0-15s",
              "15-60s",
              "60-120s",
              "120-180s",
              "180s+"
            ],
            "type": "string",
            "description": "Only videos of this length.",
            "default": "any"
          },
          "courseOrder": {
            "title": "Course order (modes: creatorCourses, creatorCourseList)",
            "enum": [
              "recommended",
              "popular",
              "latest"
            ],
            "type": "string",
            "description": "recommended: the source's own order. popular: most popular first. latest: newest first.",
            "default": "recommended"
          },
          "courseCategoryId": {
            "title": "Course category ID (mode: creatorCourseList)",
            "minimum": 1,
            "type": "integer",
            "description": "Number of the creator-center course category to list (180 is a large one). creatorCourses lists the hot courses across all categories and ignores it.",
            "default": 180
          },
          "comparePeriod": {
            "title": "Compare period (mode: creatorCompare)",
            "enum": [
              "7days",
              "30days"
            ],
            "type": "string",
            "description": "Length of the period that ends yesterday: the creator's gains in it are compared with the period before.",
            "default": "7days"
          },
          "reportIds": {
            "title": "Report IDs (modes: reportDetail, reportRecommendations)",
            "type": "array",
            "description": "Report IDs, as the reports mode returns them in reportId (numbers such as 1081). reportDetail gives each report as one record (older reports are not available and return nothing); reportRecommendations gives the reports recommended next to each (about 4 rows).",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}