{
  "openapi": "3.0.1",
  "info": {
    "title": "Xigua 西瓜视频 Search Scraper - Keyword + Comments + MP4 下载",
    "description": "Search Xigua (西瓜视频) by keyword or hashtag — up to 1,000 videos with title, author, engagement stats, 1080p/720p/480p MP4 download URLs, hashtags, covers, optional comments and replies. Cross-app linkage to Douyin (抖音). 西瓜视频下载 / 爬虫.",
    "version": "0.0",
    "x-build-id": "Ekk0AurEZrUxnnhlK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zen-studio~xigua-video-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zen-studio-xigua-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/zen-studio~xigua-video-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zen-studio-xigua-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/zen-studio~xigua-video-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zen-studio-xigua-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "搜索词 / Search queries",
            "type": "array",
            "description": "Add one or more plain keywords or hashtags. Each query runs as a separate search.<br><br><b>Examples:</b><br>• Keyword: <code>旅行</code>, <code>美食</code>, <code>英语学习</code><br>• Hashtag (with <code>#</code>): <code>#中文字幕</code>, <code>#搞笑</code><br><br>Direct Xigua video URLs are <b>not</b> supported — use the keyword that brings up the video on the app.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "搜索类型 / Search type",
            "enum": [
              "auto",
              "keyword",
              "hashtag"
            ],
            "type": "string",
            "description": "How queries are interpreted:<br><br>• <b>Auto</b> — queries starting with <code>#</code> run as hashtag searches, everything else as keyword search. Works for most cases.<br>• <b>Keyword</b> — forces keyword search even for <code>#</code>-prefixed queries.<br>• <b>Hashtag</b> — forces hashtag search regardless of <code>#</code> prefix.",
            "default": "auto"
          },
          "maxResultsPerQuery": {
            "title": "每个搜索词最大结果数 / Max results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of videos to return per query. Higher values cost more — we recommend starting with <b>10</b> to preview the output, then raising for real runs.<br><br>Xigua's search typically has a practical depth of several hundred results per popular query before repeating.",
            "default": 20
          },
          "sortBy": {
            "title": "排序 / Sort by",
            "enum": [
              "relevance",
              "newest",
              "mostPlayed"
            ],
            "type": "string",
            "description": "How search results are ordered. Matches the filter options inside the Xigua app.<br><br>• <b>Relevance</b> — default ranking, mixes popular and recent videos the algorithm thinks match your query best.<br>• <b>Newest</b> — sort by publish time, newest first. Useful for tracking fresh content on a topic.<br>• <b>Most played</b> — sort by play count, highest first. Surfaces already-viral content.",
            "default": "relevance"
          },
          "duration": {
            "title": "时长 / Duration",
            "enum": [
              "any",
              "under3m",
              "3to5m",
              "5to10m",
              "10to30m",
              "30to60m",
              "over60m"
            ],
            "type": "string",
            "description": "Filter results by video length. Matches the native Xigua duration buckets:<br><br>• <b>< 3 min</b> — shorts and quick clips<br>• <b>3–5 min</b> — typical short-form entertainment<br>• <b>5–10 min</b> — standard informational or vlog content<br>• <b>10–30 min</b> — long-form video essays<br>• <b>30–60 min</b> / <b>> 60 min</b> — full episodes or live recaps<br><br>Leave as <b>Any</b> to include all durations.",
            "default": "any"
          },
          "includeComments": {
            "title": "包含评论 / Include comments",
            "type": "boolean",
            "description": "Include top-level comments for each video. Enabled by default because most users want comment data.<br><br>Disable for metadata-only runs to reduce cost.",
            "default": true
          },
          "maxCommentsPerVideo": {
            "title": "每个视频最多评论数 / Max comments per video",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Number of top-level comments to include per video (up to <b>500</b>). Lower values reduce cost; raise for deeper comment coverage on viral videos.<br><br>Set to <code>0</code> to skip comments even when the toggle above is on.",
            "default": 50
          },
          "includeReplies": {
            "title": "包含回复 / Include replies",
            "type": "boolean",
            "description": "Fetch full reply threads for comments that have replies. <b>Disabled by default</b> because it meaningfully increases request count.<br><br>Enable when you need nested conversation data; leave off for simpler analysis.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "每条评论最多回复数 / Max replies per comment",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of replies to include for each top-level comment when replies are enabled (up to <b>500</b>). Raise for deeper reply coverage on popular comments.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}