{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper 微博热搜/搜索/正文/评论/博主采集器 — Posts, Trends & Comments",
    "description": "微博一站式数据采集器：批量抓取实时热搜榜、关键词搜索微博、长文完整正文与图片视频、热门评论及博主主页资料与博文，自动清理HTML标签，失败条目不收费，导出干净 JSON/CSV/Excel。Scrape Weibo hot search trends, keyword posts, full long-text details, comments & user profiles from $0.75/1k.",
    "version": "0.1",
    "x-build-id": "AQMNiGKnoN8lcEC99"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alias_md5~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alias_md5-weibo-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/alias_md5~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alias_md5-weibo-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/alias_md5~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alias_md5-weibo-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scraping Mode / 采集模式",
            "enum": [
              "hot_search",
              "search",
              "user_posts",
              "post_detail",
              "comments"
            ],
            "type": "string",
            "description": "Choose what Weibo data to extract / 选择需要采集的微博数据类型。",
            "default": "hot_search"
          },
          "keywords": {
            "title": "Search Keywords / 搜索关键词",
            "type": "array",
            "description": "Keywords for Keyword Post Search mode (e.g. '人工智能', 'NVIDIA', '新能源汽车') / 关键词搜微博模式下的搜索词列表。",
            "items": {
              "type": "string"
            },
            "default": [
              "人工智能",
              "NVIDIA"
            ]
          },
          "searchChannel": {
            "title": "Search Channel / 搜索频道",
            "enum": [
              "comprehensive",
              "realtime",
              "hot"
            ],
            "type": "string",
            "description": "Sort channel for keyword search results / 关键词搜索的频道分类。",
            "default": "comprehensive"
          },
          "maxItemsPerQuery": {
            "title": "Max Items Per Query or Hot List / 每词或热搜榜最多抓取条数",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum hot search topics (50+ available) or posts per keyword. Without an optional cookie, Weibo returns page 1 (~10–15 posts/keyword); supply an optional cookie to paginate deeper / 热搜榜最多抓取条数（默认可完整获取 50+ 实时热搜）或每个关键词最多抓取博文数（不填 cookie 时微博限流返回第 1 页约 10–15 条/词，填写可选 cookie 可继续翻页）。",
            "default": 50
          },
          "userTargets": {
            "title": "User Profile URLs or UIDs / 博主主页链接或 UID 列表",
            "type": "array",
            "description": "Accepts full Weibo profile URLs (https://weibo.com/u/1749127163, https://m.weibo.cn/u/1749127163) or numeric UIDs (1749127163), automatically deduplicated / 支持直接粘贴微博博主主页链接或数字 UID，自动提取并去重。",
            "items": {
              "type": "string"
            },
            "default": [
              "https://weibo.com/u/1749127163"
            ]
          },
          "maxPostsPerUser": {
            "title": "Max Posts Per User / 每位博主最多抓取微博数",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum timeline posts per user in User Posts mode (set to 0 to extract profile only). Without an optional cookie, Weibo returns page 1 (~10–11 latest posts/user); supply an optional cookie for deeper history / 每位博主最多抓取的微博条数（设为 0 则仅抓取博主主页资料；不填 cookie 时微博返回第 1 页约 10–11 条最新微博，填写可选 cookie 可继续翻页）。",
            "default": 20
          },
          "shouldIncludeUserProfile": {
            "title": "Include User Profile Record / 同时输出博主完整主页资料",
            "type": "boolean",
            "description": "Emit a structured user_profile record (exact follower count, bio, verification, IP location, registration date) for each user in User Posts mode / 在博主模式下为每位博主输出一条包含精确粉丝数、简介、认证头衔、IP属地与注册时间的主页资料记录。",
            "default": true
          },
          "postTargets": {
            "title": "Post URLs, BIDs, or Numeric MIDs / 微博链接、短链 BID 或数字 MID 列表",
            "type": "array",
            "description": "Accepts full Weibo post URLs (https://weibo.com/1749127163/RtaifuS3L, https://m.weibo.cn/detail/5369510837357649), alphanumeric BIDs (RtaifuS3L), or numeric MIDs, automatically deduplicated / 支持直接粘贴完整微博链接、字母短码 BID 或数字 MID，自动提取并去重。",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxCommentsPerPost": {
            "title": "Max Comments Per Post / 单条微博最多抓取评论数",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum comments per post in Comments mode (supports deep multi-page extraction of 100+ comments per post out of the box, up to 1,000/post) / 单条微博最多抓取评论条数（开箱即支持自动多页深度抓取单条微博 100+ 条乃至最高 1,000 条评论）。",
            "default": 100
          },
          "commentSort": {
            "title": "Comment Sort Order / 评论排序与抓取策略",
            "enum": [
              "all",
              "hot",
              "latest"
            ],
            "type": "string",
            "description": "Choose comment ordering: 'all' grabs top hot comments first then seamlessly paginates chronological comments with automatic deduplication; 'latest' paginates chronologically from newest; 'hot' prioritizes top hot comments and continues chronologically when requesting more than 20 comments / 评论抓取策略：'all' 先抓取热门精选再无缝按时间翻页补全并自动去重（推荐）；'latest' 按发布时间从新到旧深度翻页；'hot' 热门优先并在需求超过 20 条时自动按时间续抓。",
            "default": "all"
          },
          "shouldExpandLongText": {
            "title": "Automatically Expand Long Posts / 自动展开长微博全文",
            "type": "boolean",
            "description": "Automatically fetch the complete un-truncated text whenever a post is flagged as long text / 当微博被折叠为长文时自动补全完整正文，避免出现“...全文”截断。",
            "default": true
          },
          "shouldIncludeCommentsPreview": {
            "title": "Include Free Top Comments with Post Details / 微博详情免费附赠热门评论",
            "type": "boolean",
            "description": "Attach up to 5 top comments at no extra cost when scraping Post Details / 抓取微博全文详情时免费附带最多 5 条热门评论，不另计评论费用。",
            "default": false
          },
          "shouldIncludePinnedTopics": {
            "title": "Include Pinned Top Topics in Hot Search / 热搜榜包含置顶话题",
            "type": "boolean",
            "description": "Include pinned top topics (rank 0) alongside the numbered real-time Hot Search list / 在实时热搜榜结果中包含顶部置顶话题（排名为 0）。",
            "default": true
          },
          "cookie": {
            "title": "Optional Weibo Session Cookie / 可选微博 Cookie（用于搜索与博主深度翻页）",
            "type": "string",
            "description": "Optional encrypted Cookie string to unlock multi-page pagination in Keyword Search and User Timeline modes. Strictly encrypted and never logged or written to datasets / 可选加密字段，用于解锁关键词搜索与博主历史博文的多页深度翻页；严格加密，绝不写入日志、错误报告或输出数据。"
          },
          "requestMinIntervalMs": {
            "title": "Delay Between Requests (ms) / 请求间隔（毫秒）",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum wait in milliseconds between consecutive requests / 连续请求之间的最小等待毫秒数。",
            "default": 300
          },
          "proxyConfiguration": {
            "title": "Network Routing Settings / 网络连接设置",
            "type": "object",
            "description": "Managed connection settings enabled automatically for stable runs / 默认已开启稳定连接配置，一般无需修改。",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}