{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper – Hot Search, Posts, Comments & Profiles",
    "description": "Extract Weibo hot search (微博热搜), posts, comments, replies, user profiles and keyword search results as JSON or CSV. No login, cookies or browser needed. A cheap Weibo API alternative for China trend monitoring, brand listening and KOL research. From $1 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "PNJpyIaBcXn5WvRdS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/phantom-x64~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-phantom-x64-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/phantom-x64~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-phantom-x64-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/phantom-x64~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-phantom-x64-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": {
          "includeHotSearch": {
            "title": "Hot search list (微博热搜)",
            "type": "boolean",
            "description": "Scrape the live Weibo hot search ranking (about 50 topics plus the pinned topic) with rank, heat, label (新/热/沸/爆) and category. If you give no profiles, posts or keywords, the hot search list is scraped anyway.",
            "default": false
          },
          "hotSearchPostsPerTopic": {
            "title": "Posts per hot search topic",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Also return up to this many top posts for every hot search topic (0 = only the ranking). Each topic adds one or two requests.",
            "default": 0
          },
          "profiles": {
            "title": "Profiles (users)",
            "type": "array",
            "description": "Weibo users to scrape: numeric user id (1669879400), profile links (https://weibo.com/u/1669879400, https://m.weibo.cn/u/1669879400, https://weibo.com/rmrb) or a screen name (@人民日报). Returns one profile row and the newest posts of each user.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerProfile": {
            "title": "Max posts per profile",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Newest posts to save per profile (0 = only the profile row). Without login Weibo shows the 10 newest posts of any kind plus the full history of posts that contain photos or videos.",
            "default": 20
          },
          "includeProfileInfo": {
            "title": "Include profile info row",
            "type": "boolean",
            "description": "Add one row per profile: followers, following, post count, verification, bio, location, IP location, registration date, total likes/comments/reposts and more.",
            "default": true
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Single Weibo posts to scrape, with their comments. Accepts https://weibo.com/<uid>/<id>, https://m.weibo.cn/status/<id>, https://m.weibo.cn/detail/<mid> or a bare id.",
            "items": {
              "type": "string"
            }
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Find posts that mention these words, brands or #hashtags#. Without login Weibo shows the first page of each search tab, so expect up to about 80 unique posts per keyword with \"All tabs\".",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search tabs",
            "enum": [
              "all",
              "general",
              "hot",
              "realtime"
            ],
            "type": "string",
            "description": "Which Weibo search tabs to read for each keyword. \"All tabs\" combines general, hot, real-time and more results (deduplicated) for the widest coverage.",
            "default": "all"
          },
          "maxPostsPerSearch": {
            "title": "Max posts per keyword",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum posts saved per search keyword.",
            "default": 30
          },
          "maxTrendingPosts": {
            "title": "Trending posts (热门微博)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Also scrape up to this many posts from Weibo's public trending feed (0 = off).",
            "default": 0
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Top-level comments to save for each post from \"Post URLs\" (and for every other post if \"Comments for all posts\" is on). 0 = no comments.",
            "default": 20
          },
          "commentsForAllPosts": {
            "title": "Comments for all posts",
            "type": "boolean",
            "description": "Also download comments for posts found through profiles, search, hot search and trending (not only for \"Post URLs\"). Can multiply the number of rows and the cost.",
            "default": false
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "hot",
              "time"
            ],
            "type": "string",
            "description": "\"Hot\" returns the most-liked comments first (like the Weibo app); \"Time\" returns the newest first.",
            "default": "hot"
          },
          "includeReplies": {
            "title": "Include replies to comments",
            "type": "boolean",
            "description": "Also download replies (sub-comments) of each comment. Replies are comment rows with is_reply = true and the root comment id.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum replies saved for each comment when replies are on.",
            "default": 10
          },
          "dateFrom": {
            "title": "Oldest post date",
            "type": "string",
            "description": "Only posts published on or after this date (profiles, search, trending). Accepts YYYY-MM-DD (China time), an ISO date-time, or a relative value such as \"7 days\" or \"24 hours\". Profile scraping stops once it reaches older posts."
          },
          "dateTo": {
            "title": "Newest post date",
            "type": "string",
            "description": "Only posts published on or before this date (a plain YYYY-MM-DD includes the whole day, China time). Same formats as the oldest date."
          },
          "fetchFullText": {
            "title": "Fetch full text of long posts",
            "type": "boolean",
            "description": "Weibo truncates long posts (\"全文\"). When on, the full text is downloaded with one extra request per long post.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Inputs in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many profiles, posts or keywords are processed at the same time. Each one is read at a polite pace with its own session.",
            "default": 3
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Minimum pause between two requests of the same session, in milliseconds (a small random jitter is added).",
            "default": 1000
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed request (network error, rate limit, HTTP 5xx or expired visitor cookie) is retried with a new session and exponential backoff.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is recommended. If Weibo starts rate-limiting, switch to residential proxies (country CN or HK works best).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}