{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper 微博 (Sina Weibo): Posts, Comments, Users",
    "description": "Scrape public Sina Weibo (微博) posts by keyword, #hashtag#, user or URL, plus comments and an optional sentiment score. No login. Clean JSON for AI agents and Apify MCP. $3 per 1,000 posts; failed and duplicate items are free.",
    "version": "1.0",
    "x-build-id": "8DDFS081IFfJ3LIWw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexsyin~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexsyin-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/alexsyin~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alexsyin-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/alexsyin~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alexsyin-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": {
          "searchQueries": {
            "title": "Search keywords or #hashtags#",
            "type": "array",
            "description": "Keywords or hashtags to search on Sina Weibo (微博), e.g. \"华为\", \"iPhone 17\" or \"#双十一#\". Each query is searched across Weibo's latest, top, hot, topic, video and picture tabs and results are de-duplicated. Leave empty if you only want user timelines or specific posts. The sample keyword 华为 returns real public posts.",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "User IDs, profile URLs or screen names",
            "type": "array",
            "description": "Public Weibo (微博) accounts whose latest posts to scrape. Accepts a numeric UID (\"1669879400\"), a profile URL (\"https://weibo.com/u/1669879400\", \"https://m.weibo.cn/u/1669879400\") or a screen name (\"@人民日报\").",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs or IDs",
            "type": "array",
            "description": "Specific public Weibo posts to fetch (for example to get their comments). Accepts \"https://weibo.com/1669879400/RtAMDa3eO\", \"https://m.weibo.cn/detail/5370529112395730\", a numeric post ID or a 9-character bid.",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "Max posts per search query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of posts to return for each search query. Without a cookie Weibo serves roughly 50-120 unique posts per query; set a cookie for deeper results. A first try of 20 is enough to see real posts at a lower cost.",
            "default": 50
          },
          "maxPostsPerUser": {
            "title": "Max posts per user",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of posts to return for each user. Without a cookie Weibo serves the latest ~10 posts of a timeline; with a cookie the timeline is paginated.",
            "default": 20
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "If true, each post includes a `comments` array with top-level Weibo comments (text, time, likes, author, IP region). Comments are billed separately per comment ($0.002 each). Works without a cookie. Leave off for a cheaper first run.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of comments to fetch for each post when \"Include comments\" is on.",
            "default": 20
          },
          "commentsSort": {
            "title": "Comment order",
            "enum": [
              "hot",
              "latest"
            ],
            "type": "string",
            "description": "\"hot\" returns the most-liked comments first, \"latest\" returns the newest comments first.",
            "default": "hot"
          },
          "dateFrom": {
            "title": "Posted after",
            "type": "string",
            "description": "Only return posts published at or after this time. Use YYYY-MM-DD (China time), an ISO 8601 datetime, or a relative value like \"24 hours\" or \"7 days\". Leave empty for no lower bound."
          },
          "dateTo": {
            "title": "Posted before",
            "type": "string",
            "description": "Only return posts published at or before this time (YYYY-MM-DD is inclusive, China time). Same formats as \"Posted after\"."
          },
          "onlyNew": {
            "title": "Only new posts (incremental)",
            "type": "boolean",
            "description": "If true, posts already returned by an earlier run for the same query/user are skipped and not charged. State is kept in the named key-value store \"weibo-scraper-state\" in your account. Ideal for scheduled monitoring.",
            "default": false
          },
          "fetchFullText": {
            "title": "Fetch full text of long posts",
            "type": "boolean",
            "description": "Weibo truncates long posts in feeds. If true, the full text is fetched for posts marked as long (one extra request each).",
            "default": true
          },
          "sentiment": {
            "title": "Add sentiment score (lexicon-based)",
            "type": "boolean",
            "description": "If true, every post (and every comment when comments are on) gets a `sentiment` object: score from -1 (negative) to 1 (positive), label positive/neutral/negative and the matched terms. Also writes a per-keyword SENTIMENT_SUMMARY record (average score, positive/negative ratio) to the key-value store. Uses a built-in Chinese lexicon, no external API; it is a transparent heuristic that misses sarcasm, so use it for trends rather than single posts. Billed $0.0005 per scored post or comment.",
            "default": false
          },
          "cookie": {
            "title": "Weibo cookie (optional)",
            "type": "string",
            "description": "Optional. The Actor works without login. Paste the Cookie header of a logged-in m.weibo.cn / weibo.com session (must contain SUB=...) to unlock deeper pagination of search results and timelines. Stored encrypted; never logged."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. Not needed in normal use; enable Apify Proxy if you see blocking.",
            "default": {
              "useApifyProxy": false
            }
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Average pause between requests to stay polite and avoid rate limits.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}