{
  "openapi": "3.0.1",
  "info": {
    "title": "Douyin Video Search Scraper: Video Stats & Metadata (抖音搜索)",
    "description": "Search Douyin (抖音) videos and photo posts by keyword: title, caption, hashtags, categories, likes, comments, shares, saves, duration, cover, author with followers, sound. Chinese or English keywords, filters by date, likes and type. No login or API key needed.",
    "version": "0.1",
    "x-build-id": "ivscrX3ZRz5upJPfb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/quarra~douyin-video-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-quarra-douyin-video-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/quarra~douyin-video-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-quarra-douyin-video-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/quarra~douyin-video-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-quarra-douyin-video-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": "Keywords",
            "maxItems": 500,
            "type": "array",
            "description": "One keyword per line, in Chinese or English (咖啡, 露营, iPhone, travel). A Douyin search link (https://www.douyin.com/search/咖啡) works too. Each keyword is searched like in the app, most relevant results first.",
            "items": {
              "type": "string",
              "maxLength": 2000
            }
          },
          "maxResultsPerKeyword": {
            "title": "Max results per keyword",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Results per keyword. Douyin's web search shows about 50 to 200 videos per keyword (measured); turn on 'Search related keywords' to go further.",
            "default": 100
          },
          "searchRelatedKeywords": {
            "title": "Search related keywords",
            "type": "boolean",
            "description": "When a keyword runs out before its limit, also search the related keywords Douyin suggests for it (up to 5), and count their results for that keyword. Each result keeps the keyword actually searched in searchedAs.",
            "default": false
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only videos published after this date (2026-09-01, or relative: 30 days)."
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at least this many likes."
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "all",
              "videos",
              "photos"
            ],
            "type": "string",
            "description": "Douyin search mixes videos and photo posts (图文); keep both or one of them.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Total number of results delivered by the run, all keywords together, counted exactly.",
            "default": 1000
          },
          "searchType": {
            "title": "Search type",
            "type": "string",
            "description": "Set by the Actor.",
            "default": "videos"
          },
          "deliveryConnector": {
            "title": "Send results to your app (MCP connector: Notion, Slack…)",
            "type": "string",
            "description": "Pick one of your Apify MCP connectors: at the end of each run, a summary of the results (count, the first 25 with their links, a link to the full dataset) is posted there. With a schedule and 'Only new', you get each day's new results where your team works. Nothing is sent when a run finds nothing. Notion connects in one click; Slack and Google need your own OAuth app in Apify, or use the webhook field below."
          },
          "deliveryTarget": {
            "title": "Where in the app (channel, page or sheet ID)",
            "type": "string",
            "description": "Slack channel ID (C0123…), Notion page ID, Google Sheet ID… Leave empty if the app needs no target (a new Notion page is then created at the top of your workspace)."
          },
          "deliveryWebhookUrl": {
            "title": "Or a webhook URL (Slack, Discord, Make, Zapier, n8n)",
            "type": "string",
            "description": "No connector needed. A Slack Incoming Webhook (hooks.slack.com/…) gets a message, a Discord channel webhook gets a message, any other URL receives the summary as JSON (title, text, count, datasetUrl, items)."
          },
          "deliveryTool": {
            "title": "Connector tool (advanced)",
            "type": "string",
            "description": "Name of the connector's tool to call. Leave empty: the best tool that posts a message, creates a page or appends rows is picked, and the run log lists every tool the connector offers."
          },
          "deliveryArguments": {
            "title": "Connector tool arguments (advanced)",
            "type": "object",
            "description": "Extra arguments for the tool, merged last, for example {\"channel\": \"#reddit-leads\"} or {\"parent\": {\"database_id\": \"…\"}}."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}