{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Trending Scraper",
    "description": "Collect Douyin's official hot.douyin.com trend boards: overall, rising, and city hot topics, hot videos, hashtags, search terms, and content words, plus rankings for small-account hits and high like, follow, and completion-rate videos. This data normally needs a Douyin login to see.",
    "version": "0.1",
    "x-build-id": "fipR0L7hRd9GJsbNV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/toolzerhub~douyin-billboard-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-toolzerhub-douyin-billboard-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/toolzerhub~douyin-billboard-scraper/runs": {
      "post": {
        "operationId": "runs-sync-toolzerhub-douyin-billboard-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/toolzerhub~douyin-billboard-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-toolzerhub-douyin-billboard-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": [
          "scraperType"
        ],
        "properties": {
          "scraperType": {
            "title": "What to collect",
            "enum": [
              "hotBoard",
              "risingBoard",
              "cityBoard",
              "challengeBoard",
              "videoBoard",
              "lowFollowerHits",
              "highLikeRate",
              "highFollowRate",
              "highCompletionRate",
              "topicBoard",
              "risingTopics",
              "searchBoard",
              "risingSearches",
              "contentWords",
              "contentWordDetail",
              "categories",
              "cityCodes",
              "contentTags"
            ],
            "type": "string",
            "description": "Choose the dataset for this run.",
            "default": "hotBoard"
          },
          "range_type": {
            "title": "Reading",
            "enum": [
              "snapshot",
              "range"
            ],
            "type": "string",
            "description": "Read the board at one moment, or aggregated over a date range.",
            "default": "snapshot"
          },
          "snapshot_time": {
            "title": "Snapshot time",
            "type": "string",
            "description": "The exact moment to read the board at, as YYYYMMDDHHMMSS, e.g. 20260815120000. Leave empty for the latest reading."
          },
          "start_date": {
            "title": "Start date",
            "type": "string",
            "description": "First day of the range to read, as YYYYMMDD, e.g. 20260801."
          },
          "end_date": {
            "title": "End date",
            "type": "string",
            "description": "Last day of the range to read, as YYYYMMDD, e.g. 20260815."
          },
          "tag": {
            "title": "Category tags (advanced)",
            "type": "string",
            "description": "One or more hot-topic categories to read, separated by commas — copy them from a Categories reference run's output."
          },
          "keyword": {
            "title": "Search term",
            "type": "string",
            "description": "Words or phrase to search for. Chinese terms return the most results."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum rows to save. Set 0 to keep collecting until the source is exhausted.",
            "default": 100
          },
          "order": {
            "title": "Order",
            "enum": [
              "rank",
              "trending"
            ],
            "type": "string",
            "description": "Ranking order for the board.",
            "default": "rank"
          },
          "city_code": {
            "title": "City code (advanced)",
            "type": "string",
            "description": "Copy this from a City Codes reference run's output — Douyin doesn't publish these codes anywhere else."
          },
          "date_window": {
            "title": "Time window",
            "enum": [
              "1",
              "24",
              "168",
              "720"
            ],
            "type": "string",
            "description": "How far back the board is measured.",
            "default": "24"
          },
          "sub_type": {
            "title": "Board section",
            "type": "string",
            "description": "Which section of the video board to read. The default (1001) is the right value for almost every run.",
            "default": "1001"
          },
          "addonVideoDetails": {
            "title": "Add video details",
            "type": "boolean",
            "description": "Fetch full video detail for every video found. This makes one extra request per video and adds a charge per enriched row.",
            "default": false
          },
          "word_id": {
            "title": "Content word ID (advanced)",
            "type": "string",
            "description": "A hot-content-word id, copied from a Content Words board run's output. Only needed for that board's own detail lookup."
          },
          "query_day": {
            "title": "Day",
            "type": "string",
            "description": "The single day to read, as YYYYMMDD, e.g. 20260815."
          },
          "billboard_type": {
            "title": "Board type",
            "enum": [
              "total",
              "city",
              "rise"
            ],
            "type": "string",
            "description": "Which board the categories belong to.",
            "default": "total"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}