{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Hot Search, Posts, Comments & User Scraper – 微博热搜榜 API",
    "description": "Weibo scraper API, no login: 微博热搜榜 hot search, Weibo hot posts, trending topics, Weibo posts search 微博搜索 by keyword or #topic# hashtag, Weibo comments 微博评论, replies, reposts 转发, likers, Weibo user profiles 微博用户, user posts, followers 粉丝. Chinese social media JSON for AI agents, MCP. $0.002-0.006/row",
    "version": "2.0",
    "x-build-id": "f7we5rIu5kOge80BS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deadc0dex~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deadc0dex-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/deadc0dex~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deadc0dex-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/deadc0dex~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deadc0dex-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",
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "auto",
              "keywordResearch",
              "hotSearch",
              "hotTopics",
              "hotPosts",
              "search",
              "topic",
              "postDetails",
              "comments",
              "replies",
              "reposts",
              "likers",
              "userProfile",
              "userPosts",
              "userSearch",
              "fans",
              "following",
              "capabilities"
            ],
            "type": "string",
            "description": "auto = detect per input ({} -> hotSearch). keywordResearch = keyword -> top posts -> comments (+replies, reposts) -> free insights. hotSearch = 热搜榜. hotTopics = 话题榜. hotPosts = 热门微博. search = keyword posts. topic = #hashtag# posts. postDetails = posts by URL/id. comments = comments (urls). replies = replies (ids = comment ids). reposts / likers of a post (urls). userProfile / userPosts / fans / following (users). userSearch = find accounts. capabilities = free list.",
            "default": "auto"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, one per item (Chinese or English; English names like BYD, Xiaomi, Lei Jun are translated to Chinese when expandQuery is on). Used by search, topic (#话题#) and userSearch. Example: [\"比亚迪\", \"iPhone 17\", \"#郑钦文#\"]. A Weibo URL placed here is routed by its form. Leave all inputs empty for the live hot search list.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Post / topic URLs or IDs",
            "type": "array",
            "description": "Weibo links or ids, one per item. Posts: https://weibo.com/<uid>/<bid>, https://m.weibo.cn/detail/<mid>, a 16-digit mid or 9-char bid (used by postDetails, comments, reposts, likers). Also accepted: profile URLs (-> userProfile), s.weibo.com search/topic links, hot-list pages. Unusable values return a free INVALID_URL error row.",
            "items": {
              "type": "string"
            }
          },
          "users": {
            "title": "Users",
            "type": "array",
            "description": "Accounts for userProfile / userPosts / fans / following, one per item: numeric uid (1699432410), https://weibo.com/u/<uid>, https://m.weibo.cn/u/<uid>, https://weibo.com/<custom-domain>, or @screen name (exact, e.g. @新华社).",
            "items": {
              "type": "string"
            }
          },
          "ids": {
            "title": "IDs (posts or comments)",
            "type": "array",
            "description": "Numeric ids, one per item. 15-20 digit ids are posts (mid) for postDetails/comments, or comment ids for operation replies; 5-12 digit ids are user ids. Get ids from earlier rows (postId, commentId, userId).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max billable rows",
            "type": "integer",
            "description": "Maximum billable rows in total (posts, comments, users, hot-search rows). Empty = 20 (keywordResearch: keywords × maxPosts × (1 + commentsPerPost)); range 1-10000. Error, plan, insights and summary rows are free and not counted. A full hot search list is 51 rows."
          },
          "maxPosts": {
            "title": "Posts per keyword (keywordResearch)",
            "type": "integer",
            "description": "keywordResearch: how many top posts per keyword to collect comments from (after your post filters and sortBy). Empty = 10; range 1-500. Tip: sortBy mostCommented picks the most-discussed posts."
          },
          "commentsPerPost": {
            "title": "Comments per post (keywordResearch)",
            "type": "integer",
            "description": "keywordResearch: comments returned per post (hot order, or newest with commentSort). Empty = 20; range 0-2000 (0 = posts only). Each comment is a billable comment row; posts with 0 comments cost no request."
          },
          "maxItemsPerInput": {
            "title": "Max rows per input",
            "type": "integer",
            "description": "Cap per keyword / post / user. 0 (default) = split maxItems evenly across inputs so every input gets results. Guest limits: search and topic up to ~1000 posts per keyword, userPosts newest ~10 of all types then photo/video posts, reposts first page (~10-20), likers ~200; comments, fans and userSearch paginate.",
            "default": 0
          },
          "fields": {
            "title": "Return only these fields",
            "type": "array",
            "description": "Projection: return only these output fields (type is always kept). Empty = compact default set. Examples: text, likesCount, commentsCount, repostsCount, createdAt, url, authorName, word, heat, rank, followersCount. Unknown names are ignored with a warning. Full list: operation capabilities.",
            "items": {
              "type": "string"
            }
          },
          "include": {
            "title": "Include extras",
            "type": "array",
            "description": "Extras (fullText, media on by default). author = author followers/bio on posts, commenter name+id on comments. comments = embed commentsPerItem hot comments per post (free). replies = operation comments also returns replies (billed as comments). reposts = keywordResearch also returns first-page reposts per post. raw = original object. videoPlays = exact play count (1 extra request per video).",
            "items": {
              "type": "string",
              "enum": [
                "author",
                "comments",
                "replies",
                "reposts",
                "fullText",
                "media",
                "raw",
                "videoPlays"
              ],
              "enumTitles": [
                "Author details",
                "Top comments on posts",
                "Replies to comments",
                "Reposts of each post (keywordResearch)",
                "Full text of long posts",
                "Images/video",
                "Raw API object",
                "Exact video play counts"
              ]
            }
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "compact",
              "lean",
              "full"
            ],
            "type": "string",
            "description": "compact (default) = flat rows, core fields per row type, null when unknown. lean = token-efficient for LLMs: minimal fields, no null/empty/false keys, no per-row envelope (it is in the summary row), no url (pattern in summary), text cut to maxTextChars, dates YYYY-MM-DDTHH:MMZ; about 55-85 % fewer tokens, same price. full = adds secondary fields, the raw Weibo object and v0.x keys.",
            "default": "compact"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "mostLiked",
              "mostCommented",
              "mostReposted"
            ],
            "type": "string",
            "description": "Order of posts/comments within each input (applied before maxItemsPerInput, so it also picks which rows you get). relevance = Weibo order. newest = newest first (search starts with the real-time tab; comments use time order). mostLiked / mostCommented / mostReposted = highest counts first.",
            "default": "relevance"
          },
          "dateFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "Keep only posts/comments created at or after this time. YYYY-MM-DD (China time), ISO timestamp, or relative: 24h, 7d, 2w, 1m. Filtered rows are not billed. Guests only see recent/top results, so old ranges return few rows."
          },
          "dateTo": {
            "title": "Posted until",
            "type": "string",
            "description": "Keep only posts/comments created at or before this time. Same formats as dateFrom; a plain date includes that whole day."
          },
          "minLikes": {
            "title": "Min likes",
            "type": "integer",
            "description": "Keep only posts/comments with at least this many likes (0 = no filter). Filtered rows are not billed.",
            "default": 0
          },
          "matchTerms": {
            "title": "Match terms (text filter)",
            "type": "array",
            "description": "Keep only rows whose text contains one of these words (case-insensitive): comments in comments/keywordResearch, posts in search/topic/hotPosts/userPosts. Example: [\"续航\", \"电池\"]. Runs after fetching, before billing: fewer billed rows, not fewer requests (Weibo has no server-side comment search).",
            "items": {
              "type": "string"
            }
          },
          "maxCostUsd": {
            "title": "Max cost (USD)",
            "type": "number",
            "description": "Stop before the next billable row would push this run's charges above this amount, e.g. 0.10. Works on top of the platform max charge per run. Leave empty for no extra limit."
          },
          "dryRun": {
            "title": "Dry run (plan only)",
            "type": "boolean",
            "description": "true = scrape nothing and bill no rows: returns a free plan row with the operation detected for each input, queryUsed, estimated rows and estimated cost, plus warnings. Use it to check messy input before paying.",
            "default": false
          },
          "hotSearchBoard": {
            "title": "Hot search board",
            "enum": [
              "realtime",
              "entertainment",
              "news",
              "life",
              "social"
            ],
            "type": "string",
            "description": "Board for operation hotSearch. realtime = main 热搜榜 (pinned topic + top 50). entertainment = 文娱榜. news = 要闻榜 (sometimes empty; returns a free NO_RESULTS row then). life = 生活榜 (~50). social = 社会榜 (~50).",
            "default": "realtime"
          },
          "trendingTopics": {
            "title": "Trending topics to research (0-20)",
            "type": "integer",
            "description": "keywordResearch, search or topic: also run on the top N words of the live realtime hot search 热搜 (ads and the pinned row skipped), so one call answers \"what is trending and what are people saying\". Empty/0 = off; range 1-20. With no other input and operation auto it runs keywordResearch. summary.jobs[].trend gives each word's rank, heat and category."
          },
          "expandQuery": {
            "title": "Translate English keywords",
            "type": "boolean",
            "description": "Translate Latin-script keywords to Chinese with a built-in dictionary (800+ brands, companies, people, places, topics): BYD -> 比亚迪, Xiaomi -> 小米, Lei Jun -> 雷军. Chinese keywords are unchanged. Each row shows queryUsed; the summary lists every expansion.",
            "default": true
          },
          "replyDepth": {
            "title": "Reply depth (keywordResearch)",
            "type": "integer",
            "description": "keywordResearch: 0 (default) = top-level comments only; 1 = also the replies of each comment (up to repliesPerComment each, billed as comment rows)."
          },
          "commentSort": {
            "title": "Comment order (keywordResearch)",
            "enum": [
              "hot",
              "newest"
            ],
            "type": "string",
            "description": "keywordResearch: hot (default) = Weibo hot order (top comments first); newest = newest comments first."
          },
          "insights": {
            "title": "Insights row (free)",
            "type": "boolean",
            "description": "Add one free type=insights row per input: counts, engagement medians, top posts/authors/hashtags, top terms (CJK n-grams) and heuristic lexicon sentiment (labelled, no LLM). On by default for keywordResearch (false = off); true = also for search, topic, comments, hotSearch and others."
          },
          "trackMetrics": {
            "title": "Snapshot mode (track metric changes)",
            "type": "boolean",
            "description": "With deltaKey: compare every row with its last snapshot and add snapshotAt, deltaHours, likesDelta/commentsDelta/repostsDelta (posts), previousRank/rankDelta/heatDelta (hot search), readCountDelta (topics), followersDelta (users). Rows are not skipped. Snapshots: your key-value store weibo-scraper-snapshots, 30 days."
          },
          "maxTextChars": {
            "title": "Max text characters",
            "type": "integer",
            "description": "Cut text fields (post/comment text, topic summary, bio) to this many characters, ending with \"…\", and mark the row truncated: true. Empty = 300 in lean mode, no limit otherwise; 0 = no limit. Range 0-100000."
          },
          "leanFormat": {
            "title": "Lean format",
            "enum": [
              "rows",
              "table"
            ],
            "type": "string",
            "description": "Only with outputMode lean. rows (default) = lean JSON rows. table = the same rows (billing unchanged) plus one tab-separated table per row type with the header once - the most token-efficient form - in the summary row (leanTable, if under 20 KB) and in key-value record LEAN_TABLE.",
            "default": "rows"
          },
          "minComments": {
            "title": "Min comments",
            "type": "integer",
            "description": "Keep only posts with at least this many comments (comments: replies). Empty or 0 = no filter. Filtered rows are not billed."
          },
          "minReposts": {
            "title": "Min reposts",
            "type": "integer",
            "description": "Keep only posts with at least this many reposts. Empty or 0 = no filter. Filtered rows are not billed."
          },
          "originalOnly": {
            "title": "Original posts only",
            "type": "boolean",
            "description": "Posts: skip reposts (转发) and keep only posts the author wrote. Filtered before billing."
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "any",
              "images",
              "videos",
              "text"
            ],
            "type": "string",
            "description": "Posts: any (default) = no filter; images = posts with pictures; videos = posts with a video; text = no pictures or video. Filtered before billing."
          },
          "authorType": {
            "title": "Author type",
            "enum": [
              "any",
              "verified",
              "organization",
              "individual"
            ],
            "type": "string",
            "description": "Posts: any (default); verified = any verified account; organization = organisations, media, companies (blue V); individual = verified people (orange/gold V). Filtered before billing."
          },
          "deltaKey": {
            "title": "Only new rows / snapshot stream (delta key)",
            "type": "string",
            "description": "Name a tracking stream, e.g. \"byd-monitor\". Alone: rows already returned by earlier runs with the same deltaKey are skipped (not billed; ids in your key-value store weibo-scraper-delta). With trackMetrics: nothing is skipped and each row gets change fields vs the last run. For scheduled monitoring."
          },
          "commentsPerItem": {
            "title": "Comments per post (include comments)",
            "type": "integer",
            "description": "With include comments: hot comments embedded per post as topComments, 1-20 (free). For many comments use operation comments instead.",
            "default": 5
          },
          "repliesPerComment": {
            "title": "Replies per comment (include replies)",
            "type": "integer",
            "description": "With operation comments + include replies: replies returned per comment, 1-100 (each billed as a comment row).",
            "default": 5
          },
          "searchTabs": {
            "title": "Search tabs",
            "type": "array",
            "description": "Used by search. Weibo search tabs to collect (results de-duplicated). Default: all five (page 1 of each tab, ~20 posts per tab; then deeper result pages). all = 综合, hot = 热门, realtime = 实时 newest, videos = 视频, images = 图片.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "hot",
                "realtime",
                "videos",
                "images"
              ],
              "enumTitles": [
                "All 综合",
                "Hot 热门",
                "Real-time 实时",
                "Videos 视频",
                "Images 图片"
              ]
            }
          },
          "includePinned": {
            "title": "Include pinned topic",
            "type": "boolean",
            "description": "hotSearch: include the pinned official topic above the list (rank 0, isPinned true).",
            "default": true
          },
          "includeAds": {
            "title": "Include promoted rows",
            "type": "boolean",
            "description": "hotSearch: include paid/promoted rows (isAd true, rank null).",
            "default": false
          },
          "dedupe": {
            "title": "De-duplicate",
            "type": "boolean",
            "description": "Skip rows already returned in this run (same post/comment/user id across inputs). Duplicates are never billed.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Default Apify Proxy (datacenter): guest-cookie requests use the proxy and data requests go direct from the Apify server when that works (faster; see networkMode). Any custom setting (groups, country, own URLs) sends all requests through it. If you get BLOCKED errors repeatedly, use RESIDENTIAL with country CN.",
            "default": {
              "useApifyProxy": true
            }
          },
          "networkMode": {
            "title": "Network mode",
            "enum": [
              "auto",
              "proxy"
            ],
            "type": "string",
            "description": "auto (default) = data requests go direct from the Apify server and fall back to the proxy per host after the first failure; guest-cookie requests always use the proxy. proxy = every request through proxyConfiguration (v1.2 behaviour).",
            "default": "auto"
          },
          "cacheGuestCookies": {
            "title": "Reuse guest cookies",
            "type": "boolean",
            "description": "Keep the anonymous guest (visitor) cookies Weibo issues for up to 12 h in a key-value store named weibo-scraper-cache in your account, so later runs skip that 1-3 s step. No login and no personal data. false = fetch new guest cookies on every run.",
            "default": true
          },
          "hedgeAfterMs": {
            "title": "Hedge slow requests after (ms)",
            "type": "integer",
            "description": "If a Weibo response has not arrived after this many ms, the same request is sent once more on a fresh proxy IP and the first answer wins (cuts slow-IP delays; at most 8 per run). Default 2500; 0 = off; range 0-30000.",
            "default": 2500
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "type": "integer",
            "description": "Retries with a fresh guest session and IP on rate-limit or risk-control responses (0-10).",
            "default": 5
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "type": "integer",
            "description": "Minimum gap in ms between request starts to the same Weibo host (up to 4 requests in flight per host). Default 150; range 0-10000. Raise it (e.g. 400) if you get BLOCKED errors.",
            "default": 150
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}