{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Index 巨量算数 [From $2] Keyword Trends, Audience & Topics",
    "description": "[From $2 per 1000 rows] Douyin Index (巨量算数) data: daily keyword trends with search, content and consumption indices, audience by age, gender and city, related words, hot topics, plus topic, video and creator search. Also Toutiao. No login. Lists $2, keyword indices $30 per 1,000.",
    "version": "0.1",
    "x-build-id": "WDesCNnE3fHmkueYH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~douyin-index-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-douyin-index-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/memo23~douyin-index-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-douyin-index-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/memo23~douyin-index-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-douyin-index-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keywords to get the index for (usually Chinese). Each returns a `keyword-index` row: the daily composite index, the search, content and consumption indices, and their change against the previous period and a year ago.",
            "items": {
              "type": "string"
            }
          },
          "timeRangeDays": {
            "title": "Time range",
            "minimum": 7,
            "maximum": 365,
            "type": "integer",
            "description": "How many days of daily index to return. The index lags two days.",
            "default": 30
          },
          "platform": {
            "title": "Platform",
            "enum": [
              "douyin",
              "toutiao"
            ],
            "type": "string",
            "description": "Which platform's index to read.",
            "default": "douyin"
          },
          "includeAudience": {
            "title": "Audience",
            "type": "boolean",
            "description": "For each keyword, add a `keyword-audience` row: age, gender, province, city, city tier and interests of the people behind the keyword, each with an index against the platform average, for the last full week.",
            "default": false
          },
          "includeRelatedWords": {
            "title": "Related words",
            "type": "boolean",
            "description": "For each keyword, add `related-word` rows: the words that go with it in content and in search, with relation score, search index and sample videos, for the last full week.",
            "default": false
          },
          "maxRelatedWords": {
            "title": "Max related words per keyword",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Upper bound on related-word rows per keyword.",
            "default": 50
          },
          "includeHotWords": {
            "title": "Hot words",
            "type": "boolean",
            "description": "Return the current hot search words with their index and growth, as `hot-word` rows.",
            "default": false
          },
          "includeHotTopics": {
            "title": "Hot topics",
            "type": "boolean",
            "description": "Return Douyin's real-time hot topics and the fastest rising ones, 30 each, as `hot-topic` rows with index, video count and plays.",
            "default": false
          },
          "topicKeywords": {
            "title": "Topic search keywords",
            "type": "array",
            "description": "Find hashtags by keyword. Each result is a `topic` row with its index, video count, likes and plays for the last full week.",
            "items": {
              "type": "string"
            }
          },
          "maxTopicsPerKeyword": {
            "title": "Max topics per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Upper bound on topic rows per keyword.",
            "default": 50
          },
          "videoKeywords": {
            "title": "Video search keywords",
            "type": "array",
            "description": "Find videos in the index library by keyword. Each result is a `video` row with likes, video index, creator followers and flags for low-follower hits, high like rate, high completion and high follower growth.",
            "items": {
              "type": "string"
            }
          },
          "videoCategory": {
            "title": "Video category",
            "enum": [
              "",
              "628",
              "629",
              "634",
              "624",
              "612",
              "626",
              "610",
              "632",
              "631",
              "607",
              "604",
              "613",
              "633",
              "614",
              "605",
              "615",
              "635",
              "606",
              "621",
              "602",
              "619",
              "611",
              "627",
              "641",
              "623",
              "638",
              "616",
              "622",
              "625",
              "603",
              "617",
              "636",
              "601",
              "618",
              "642",
              "620",
              "643",
              "608"
            ],
            "type": "string",
            "description": "Limit video search to one content category.",
            "default": ""
          },
          "videoPublishedWithin": {
            "title": "Videos published within",
            "enum": [
              "any",
              "3d",
              "7d",
              "30d"
            ],
            "type": "string",
            "description": "Limit video search by publish date.",
            "default": "any"
          },
          "maxVideosPerKeyword": {
            "title": "Max videos per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on video rows per keyword.",
            "default": 100
          },
          "creatorKeywords": {
            "title": "Creator search keywords",
            "type": "array",
            "description": "Find creators by nickname. Each result is a `creator` row with followers, total likes, video count, category and profile link (up to 20 per keyword).",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video links or IDs",
            "type": "array",
            "description": "Douyin video links or video IDs. Each returns a `video-index` row: the video's daily index over the time range, likes, comments and shares gained with the change against the period before, its percentile against all indexed videos, and the age, gender, region and interests of its viewers.",
            "items": {
              "type": "string"
            }
          },
          "creators": {
            "title": "Creators (numeric user ID or one of their video links)",
            "type": "array",
            "description": "Numeric Douyin user IDs (uid), or a link to any video of the creator. Each returns a `creator-index` row: totals, what the last 7 days added, daily averages by week and month, the followers' age, gender, region, interests and phone brand, 20 similar creators and the best videos of the time range.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Content categories",
            "type": "array",
            "description": "Each chosen category returns a `category-insight` row for the last 30 days: publishing, viewing and interaction trends, which video lengths work (with example videos), and the profile of the category's creators and viewers.",
            "items": {
              "type": "string",
              "enum": [
                "601",
                "602",
                "603",
                "604",
                "605",
                "606",
                "607",
                "608",
                "609",
                "610",
                "611",
                "612",
                "613",
                "614",
                "615",
                "616",
                "617",
                "618",
                "619",
                "620",
                "621",
                "622",
                "623",
                "624",
                "625",
                "626",
                "627",
                "628",
                "629",
                "631",
                "633",
                "634",
                "635"
              ],
              "enumTitles": [
                "Drama 剧情",
                "Celebrity 明星",
                "Variety show 综艺",
                "Movie 电影",
                "TV series 电视剧",
                "Music 音乐",
                "Anime 二次元",
                "Games 游戏",
                "Society & politics 社会时政",
                "Public welfare 公益",
                "Casual shots 随拍",
                "Dance 舞蹈",
                "Animals 动物",
                "Agriculture 三农",
                "Technology 科技",
                "Finance 财经",
                "Mother & baby 母婴",
                "Parent-child 亲子",
                "Lifestyle & home 生活家居",
                "Law 法律",
                "Health 医疗健康",
                "Popular science 科普",
                "Emotion 情感",
                "Culture 文化",
                "Career 职场",
                "Education 教育校园",
                "Photography 摄影摄像",
                "Food 美食",
                "Travel 旅行",
                "Fashion 时尚",
                "Sports 体育",
                "Entertainment 休闲娱乐",
                "Cars 汽车"
              ]
            }
          },
          "includeReports": {
            "title": "Trend reports",
            "type": "boolean",
            "description": "Return the industry and trend reports published on the Index site, newest first: title, industries, introduction, view and download counts and the PDF link.",
            "default": false
          },
          "reportKeywords": {
            "title": "Report search keywords",
            "type": "array",
            "description": "Search the reports by keyword (for example 美妆 or 汽车). Leave empty to list the latest reports.",
            "items": {
              "type": "string"
            }
          },
          "maxReports": {
            "title": "Max reports per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on report rows per keyword, or in total when no keyword is given. A page holds 16.",
            "default": 16
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}