{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Trending Scraper",
    "description": "Douyin Trending Scraper SD - Douyin Trending Scraper is a social trend tool that extracts Douyin's (抖音) real-time hot search list (热榜) and rising topics: rank, topic, heat value, video count, label, category tag, cover, time on the board, and rank changes between your runs.",
    "version": "1.0",
    "x-build-id": "MlbGg6JH53EjhrOnl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~douyin-trending-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-douyin-trending-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/neuro-scraper~douyin-trending-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-douyin-trending-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/neuro-scraper~douyin-trending-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-douyin-trending-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": {
          "boards": {
            "title": "Boards",
            "type": "array",
            "description": "hotspot = 抖音热榜, the main hot search list (about 50 topics); trending = 实时上升热点, the fast-rising topics (about 5).",
            "items": {
              "type": "string",
              "enum": [
                "hotspot",
                "trending"
              ],
              "enumTitles": [
                "Hot search (热榜)",
                "Rising topics (实时上升热点)"
              ]
            },
            "default": [
              "hotspot",
              "trending"
            ]
          },
          "maxResultsPerBoard": {
            "title": "Max topics per board",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most rows per board. Douyin publishes about 50 hot search topics and 5 rising topics, so higher values return the whole board.",
            "default": 50
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop the run after this many rows.",
            "default": 1000
          },
          "keywords": {
            "title": "Keep topics containing",
            "type": "array",
            "description": "Optional words; only topics whose text contains one of them are kept, e.g. 中国, AI, 足球.",
            "items": {
              "type": "string"
            }
          },
          "minHotValue": {
            "title": "Minimum heat value",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only topics with at least this heat value, e.g. 5000000 (0 = off).",
            "default": 0
          },
          "minRank": {
            "title": "Start at rank",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "First ranking position to include, e.g. 11 skips the top 10 topics of each board. 1 = start at the top.",
            "default": 1
          },
          "includeImages": {
            "title": "Include cover image URLs",
            "type": "boolean",
            "description": "Add the topic's cover image URLs (coverImageUrl, imageUrl, cover_url, wordCover). Off: those columns stay empty.",
            "default": true
          },
          "trackChanges": {
            "title": "Track rank changes between runs",
            "type": "boolean",
            "description": "Remember every topic's rank and heat value in a named key-value store of your account and fill previousRank, rankChange, rising_ratio, rising_speed, isNew, firstSeenAt, timesSeen and interestOverTime on the next runs.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only topics new since the last run",
            "type": "boolean",
            "description": "Skip topics an earlier run with this memory already returned on the same board. Turns rank tracking on.",
            "default": false
          },
          "stateStoreName": {
            "title": "Memory store name",
            "type": "string",
            "description": "Key-value store that keeps the memory for rank tracking, e.g. douyin-hot-hourly. Use one name per schedule.",
            "default": "douyin-trending-state"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (automatic datacenter by default, used in every test).",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}