{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Search Scraper",
    "description": "Douyin Search Scraper SD - Douyin Search Scraper is a social media data tool that extracts Douyin (抖音) search results by keyword: full post records with caption, likes, comments, shares, saves, author profile, music, hashtags, video tags, flags and no-watermark MP4, plus optional MP4 / cover downloa",
    "version": "1.0",
    "x-build-id": "X8k0dC15cSmqx2Ygp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~douyin-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-douyin-search-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-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-douyin-search-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-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-douyin-search-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": "Search keywords",
            "type": "array",
            "description": "One keyword per line, in Chinese or English, e.g. 美食, 旅行 vlog, iPhone. Each keyword is searched on its own.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max posts per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most rows per keyword. Logged out Douyin serves the first result page only (9-13 posts after ads, measured), so higher values return the whole first page.",
            "default": 20
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop the run after this many rows.",
            "default": 1000
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "mostLiked",
              "newest"
            ],
            "type": "string",
            "description": "Order of each keyword's results (applied to the returned results).",
            "default": "relevance"
          },
          "publishTime": {
            "title": "Published within",
            "enum": [
              "any",
              "day",
              "week",
              "month",
              "halfYear",
              "year"
            ],
            "type": "string",
            "description": "Keep only posts published within this window (applied to the returned results).",
            "default": "any"
          },
          "duration": {
            "title": "Video length",
            "enum": [
              "any",
              "under1",
              "1to5",
              "over5"
            ],
            "type": "string",
            "description": "Keep only videos of this length (image posts are not filtered).",
            "default": "any"
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "all",
              "video",
              "image"
            ],
            "type": "string",
            "description": "Keep videos, image posts (图文) or both.",
            "default": "all"
          },
          "includeAds": {
            "title": "Include ad cards",
            "type": "boolean",
            "description": "Douyin mixes ads into the results (about 4 of 13 cards). Off = ads are skipped and not charged.",
            "default": false
          },
          "trendBoards": {
            "title": "Add hot list topics",
            "type": "array",
            "description": "Also add Douyin's hot search topics as rows (searchType trend:hotspot / trend:trending, with word, hotValue and rank).",
            "items": {
              "type": "string",
              "enum": [
                "hotspot",
                "trending"
              ],
              "enumTitles": [
                "Hot search (热榜)",
                "Rising topics"
              ]
            }
          },
          "maxTrendTopics": {
            "title": "Max hot topics per board",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most hot-list rows per board when Add hot list topics is used.",
            "default": 50
          },
          "shouldDownloadVideos": {
            "title": "Download MP4 videos",
            "type": "boolean",
            "description": "Save each video's clean MP4 in a key-value store (videoFile).",
            "default": false
          },
          "shouldDownloadCovers": {
            "title": "Download cover images",
            "type": "boolean",
            "description": "Save each post's cover image (coverFile).",
            "default": false
          },
          "shouldDownloadSlideshowImages": {
            "title": "Download image-post images",
            "type": "boolean",
            "description": "Save every image of image posts (slideshowFiles).",
            "default": false
          },
          "videoKvStoreName": {
            "title": "Key-value store name for files",
            "type": "string",
            "description": "Named store of your account for the files, e.g. douyin-files. Empty = the run's own store."
          },
          "maxFileSizeMb": {
            "title": "Largest file to download (MB)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Larger files are skipped (videoFile.error says why).",
            "default": 300
          },
          "maxConcurrency": {
            "title": "Keywords in parallel",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many keywords are searched at the same time, each in its own browser session with its own IP.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is required for the search page (used in every test).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}