{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper: Posts, Comments & Hot Search",
    "description": "Scrape public Weibo (微博) posts by keyword or account, full comment threads with commenter region and floor number, public profiles and the live hot search list. Video play counts, edit counts, AI labels and expanded links included. No login. Export CSV, Excel or JSON.",
    "version": "0.1",
    "x-build-id": "cqmsXEW7cwFR17Y16"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sz022~weibo-posts-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sz022-weibo-posts-comments-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/sz022~weibo-posts-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sz022-weibo-posts-comments-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/sz022~weibo-posts-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sz022-weibo-posts-comments-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": "Search keywords",
            "type": "array",
            "description": "Words or #topics# to search Weibo for, one per line, in Chinese or any other language. Results come newest first, as Weibo's real-time search returns them. Weibo's search window reaches about 1,000 posts per keyword; for a busy keyword that is the last few hours.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerKeyword": {
            "title": "Max posts per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop each keyword after this many posts. Weibo serves 20 to 50 posts per page.",
            "default": 50
          },
          "includeReposts": {
            "title": "Include reposts",
            "type": "boolean",
            "description": "Weibo's search also returns reposts whose comment mentions the keyword. Turn off to keep original posts only. Reposts that are skipped are not charged.",
            "default": true
          },
          "users": {
            "title": "Accounts",
            "type": "array",
            "description": "Weibo accounts as a numeric user ID (1669879400), a profile URL (https://weibo.com/u/1669879400, m.weibo.cn/profile/1669879400) or @screen name. Custom addresses such as weibo.com/name cannot be resolved logged out: open the profile and copy the numeric ID instead.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerUser": {
            "title": "Max posts per account",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Recent posts to read for each account, newest first. Set 0 to read profiles only. Logged out, Weibo serves an account's posts from its search index, which can skip some posts; see the README.",
            "default": 20
          },
          "includeProfiles": {
            "title": "Include account profiles",
            "type": "boolean",
            "description": "One profile row per account: followers, following, post count, verification, bio, location, total likes, comments and reposts received, and Weibo's influence labels.",
            "default": true
          },
          "postUrls": {
            "title": "Post URLs or IDs",
            "type": "array",
            "description": "Posts to read in full, with their comments: https://weibo.com/1669879400/RlZog45UR, https://m.weibo.cn/detail/5352408760976057, or the bare ID.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Read the comments of each post above. Each comment is one row, charged separately.",
            "default": true
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Top-level comments to read for each post.",
            "default": 50
          },
          "commentsSort": {
            "title": "Comment order",
            "enum": [
              "hot",
              "latest"
            ],
            "type": "string",
            "description": "Weibo's own two orders: most liked first, or newest first.",
            "default": "hot"
          },
          "includeReplies": {
            "title": "Include all replies to comments",
            "type": "boolean",
            "description": "Off: each comment carries the first two replies Weibo shows under it, nested and free. On: replies are read in full, each as its own comment row (charged as a comment).",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Only used when all replies are included.",
            "default": 20
          },
          "includeHotSearch": {
            "title": "Include the hot search list (微博热搜)",
            "type": "boolean",
            "description": "The live top-50 hot search list with heat values and labels, plus the pinned entry. Ads are included and marked isAd.",
            "default": false
          },
          "postedAfter": {
            "title": "Only posts published on or after",
            "type": "string",
            "description": "Optional, YYYY-MM-DD in Beijing time. Applies to keyword and account posts. Paging stops at the first page that is entirely older."
          },
          "expandLongText": {
            "title": "Expand long posts",
            "type": "boolean",
            "description": "Weibo cuts long posts short in feeds with a 全文 link. On: the full text is fetched (one small extra request per long post, no extra charge).",
            "default": true
          },
          "scrapeAuthorProfiles": {
            "title": "Add author profiles to posts",
            "type": "boolean",
            "description": "Feeds do not include an author's follower count. On: each distinct author's profile is read once, written as a profile row (charged as a profile) and its follower count is copied into author.followersCount on their posts.",
            "default": false
          },
          "maskContactInfo": {
            "title": "Mask emails and phone numbers",
            "type": "boolean",
            "description": "On: email addresses and mainland Chinese phone numbers in post, comment and bio text are replaced with [email removed] / [phone removed]. Turn off only if you have a lawful basis to process contact details (see Privacy in the README).",
            "default": true
          },
          "abortAfterConsecutiveFailures": {
            "title": "Stop after this many refused inputs in a row",
            "minimum": 0,
            "type": "integer",
            "description": "Ends the run early when Weibo stops answering. Posts or accounts that do not exist do not count. 0 never stops early.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify's datacenter proxy by default. If Weibo keeps refusing datacenter IPs, the run moves to Apify's residential proxy (see below), at no extra charge to you.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Fall back to residential proxies when blocked",
            "type": "boolean",
            "description": "Only applies with Apify Proxy. After two refusals in a row on datacenter IPs, the rest of the run uses residential IPs. Turn off to stay on datacenter IPs only.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}