{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper - Posts, Comments, Hot Search & Profiles",
    "description": "Weibo scraper for 微博 posts by keyword, user timelines, post comments and replies, user profiles and the hot search board. No login or cookies. Date filters, only-new monitoring, clean English fields, JSON/CSV/Excel.",
    "version": "1.0",
    "x-build-id": "7mwqMtGSmRJeik6cs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/groupoject~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-groupoject-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/groupoject~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-groupoject-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/groupoject~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-groupoject-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": "What to scrape",
            "enum": [
              "search",
              "userPosts",
              "posts",
              "users",
              "hotSearch"
            ],
            "type": "string",
            "description": "Pick one: posts by keyword search, posts from user timelines, single posts by URL (with comments and replies), user profiles, or the Weibo hot search board (微博热搜).",
            "default": "search"
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keyword search mode. One search per keyword. Chinese keywords return far more posts than English ones (e.g. 咖啡 rather than coffee). Hashtags work too: #话题#.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "top",
              "latest",
              "hot"
            ],
            "type": "string",
            "description": "Top = Weibo's default relevance ranking (综合). Latest = newest first (实时), best for monitoring. Hot = most popular (热门).",
            "default": "top"
          },
          "contentFilter": {
            "title": "Content type",
            "enum": [
              "all",
              "images",
              "videos"
            ],
            "type": "string",
            "description": "Only posts with images, or only posts with video.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Optional. YYYY-MM-DD (Beijing time) or an ISO date-time. Works in keyword search (uses Weibo advanced search) and user posts."
          },
          "dateTo": {
            "title": "Posted on or before",
            "type": "string",
            "description": "Optional. YYYY-MM-DD (Beijing time, whole day included) or an ISO date-time."
          },
          "authorFilter": {
            "title": "Author type (search)",
            "enum": [
              "all",
              "verified",
              "media"
            ],
            "type": "string",
            "description": "Keyword search only: limit to verified accounts or media accounts. Uses Weibo advanced search.",
            "default": "all"
          },
          "originalOnly": {
            "title": "Original posts only",
            "type": "boolean",
            "description": "Skip reposts. In keyword search this uses Weibo advanced search; in user posts it reads the user's original posts only.",
            "default": false
          },
          "enrichSearchResults": {
            "title": "Full data for date-filtered searches",
            "type": "boolean",
            "description": "Weibo's advanced search (used when you set dates, an author type or original-only) returns posts without like/comment/repost counts or follower numbers. On: each post is looked up once to fill them in (billed as a detail lookup). Off: cheaper, counts stay empty.",
            "default": true
          },
          "excludeAds": {
            "title": "Skip promoted posts",
            "type": "boolean",
            "description": "Drop promoted posts (广告) from search results and paid entries from the hot search board.",
            "default": true
          },
          "userIds": {
            "title": "User IDs or profile URLs",
            "type": "array",
            "description": "User posts and user profiles modes. Numeric UID (1682207150), profile URL (https://weibo.com/u/1682207150, https://m.weibo.cn/u/1682207150) or custom profile URL (https://weibo.com/nfrb).",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs or IDs",
            "type": "array",
            "description": "Post details mode. Post URL (https://weibo.com/6860967627/RoNs9kE4B, https://m.weibo.cn/detail/5359099734920605), numeric post ID or short ID (RoNs9kE4B).",
            "items": {
              "type": "string"
            }
          },
          "hotSearchBoard": {
            "title": "Hot search board",
            "enum": [
              "realtime",
              "social",
              "entertainment",
              "technology",
              "life",
              "sports",
              "games"
            ],
            "type": "string",
            "description": "Which trending list to read in hot search mode. Realtime is the main 微博热搜 board (about 50 topics with heat values).",
            "default": "realtime"
          },
          "maxResults": {
            "title": "Max posts per keyword / user",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on posts per keyword (search), per user (user posts), in total (post details), or topics (hot search). Comments are capped separately below. Your run's maximum charge also caps the output.",
            "default": 100
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Also save the comments of every post found (keyword search, user posts or post details). Each comment is one row.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Top-level comments per post, in Weibo's hot order.",
            "default": 20
          },
          "includeReplies": {
            "title": "Include replies to comments",
            "type": "boolean",
            "description": "Also save replies (楼中楼) under each comment. Needs 'Include comments'.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Replies saved under each comment.",
            "default": 10
          },
          "fetchFullText": {
            "title": "Full text of long posts",
            "type": "boolean",
            "description": "Weibo cuts long posts (长微博) in lists. On: each cut post is looked up once to get the whole text (billed as a detail lookup). Off: those rows have textTruncated = true.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new posts (monitoring)",
            "type": "boolean",
            "description": "Keyword search and user posts: return only posts that earlier runs with the same state key did not deliver. Schedule the actor for an alert-style feed. The first run returns the current posts as the baseline.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the memory used by 'Only new posts'. Use a different key for each separate monitor.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}