{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper: Weibo Search, Hot Search, Comments, Profiles",
    "description": "Weibo (微博) scraper, no login: weibo posts by id or link with the full long text, weibo profiles with exact followers, search by keyword or #topic#, comments and replies, likers, followers and following, the 微博热搜 hot search board with changes between runs. Optional sentiment, translation.",
    "version": "0.1",
    "x-build-id": "es2S3HhlzBGB87Sih"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hyperbach~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hyperbach-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/hyperbach~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hyperbach-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/hyperbach~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hyperbach-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": {
          "posts": {
            "title": "Posts: ids or links",
            "type": "array",
            "description": "Weibo posts, one per line, in any form: the 16-digit id (mid) `5346699644242007`, the 9-character id (bid) `RjAS0hNxt`, or a link such as `https://weibo.com/1642909335/RjAS0hNxt`, `https://m.weibo.cn/detail/5346699644242007`, `https://m.weibo.cn/status/RjAS0hNxt`. One row per post: the same post given several ways is one row. A value that is not a Weibo post id or link comes back as a free row that says why.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "users": {
            "title": "Users: ids, links or names",
            "type": "array",
            "description": "Weibo users, one per line: the numeric id `1642909335`, a profile link `https://weibo.com/u/1642909335`, `https://weibo.com/1642909335`, `https://m.weibo.cn/u/1642909335`, `https://weibo.com/n/微博小秘书`, or a screen name `微博小秘书` / `@微博小秘书`. One exact profile row per user (the exact follower integer, not the rounded \"1.68亿\").",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords or #topics#",
            "type": "array",
            "description": "Search terms, one per line. A plain word or phrase reads page 1 of each tab in `searchTabs` (about 10–15 posts a tab, about 50 on 图片 pictures); `#topic#` reads the topic page instead. Weibo shows a visitor page 1 only and no date window: the rows say so.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchTabs": {
            "title": "Search tabs",
            "type": "array",
            "description": "The search tabs read for each keyword, page 1 each; empty = `all` (综合). A post found in two tabs is one row with both tabs in `search_tabs`. `users` gives `user` rows, `topics` gives up to 10 `hot_item` rows with discussion and read counts, each topic once; the other tabs give `post` rows.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "realtime",
                "hot",
                "users",
                "topics",
                "videos",
                "pictures"
              ],
              "enumTitles": [
                "综合 all",
                "实时 realtime (newest)",
                "热门 hot",
                "用户 users (user rows)",
                "话题 topics (topic rows)",
                "视频 videos",
                "图片 pictures"
              ]
            },
            "default": []
          },
          "maxPostsPerKeyword": {
            "title": "Posts per keyword",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "The most post rows per keyword over its tabs (0 = every post of the pages read: about 90 over the five post tabs).",
            "default": 0
          },
          "hotBoards": {
            "title": "Hot boards",
            "type": "array",
            "description": "The hot-search boards to read, one `hot_item` row per entry: rank, word, heat, label (新 / 热 / 沸), category, time on board, the pinned topic and promoted entries flagged. With the memory on (`stateStoreName` or `onlyNew`), each row says how it moved since the last run (new, rising, falling, steady) and a row is written for each word that dropped off.",
            "items": {
              "type": "string",
              "enum": [
                "realtime",
                "entertainment",
                "topics",
                "social"
              ],
              "enumTitles": [
                "热搜 realtime (50 + the pinned topic)",
                "文娱 entertainment",
                "话题 topics (10, with read and mention counts)",
                "社会 social"
              ]
            },
            "default": []
          },
          "postsPerHotTopic": {
            "title": "Posts per hot topic",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "For each ranked word of the realtime board, the top posts of Weibo's 综合 search for it (one search page per word; the pinned topic and promoted entries are skipped; a post two words share is one row, and the second word takes the next post of its page; needs `realtime` in `hotBoards`); 0 = none.",
            "default": 0
          },
          "hotTimelinePosts": {
            "title": "Hot-timeline posts",
            "minimum": 0,
            "maximum": 300,
            "type": "integer",
            "description": "How many posts of Weibo's hot (trending) timeline to deliver, 10 a page; 0 = none. The walk ends when a page adds nothing new (about 100 posts in practice).",
            "default": 0
          },
          "fetchFullText": {
            "title": "Full long text",
            "type": "boolean",
            "description": "A search, timeline or hot-timeline row cuts a long post at about 140 characters; with this on, each such post is read in full (one request per long post). Off, the row keeps the cut text and `text_truncated` is true.",
            "default": true
          },
          "includeAuthorProfiles": {
            "title": "Author profiles",
            "type": "boolean",
            "description": "After the posts, one exact `user` row per distinct author (the exact follower integer; charged as a profile). Every post row already carries the author's name, id, verification and counts as the post page shows them.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Comments per post",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Comment rows per post row (`comment`: text, time, likes, region, the commenter with exact followers), to the post's own count; 0 = none. Applies to every post row of the run.",
            "default": 0
          },
          "commentsOrder": {
            "title": "Comments order",
            "enum": [
              "time",
              "hot"
            ],
            "type": "string",
            "description": "The order Weibo lists the comments in. Time order reaches more of a big post's comments (98 % of 1,577 in our test); hot order follows Weibo's ranking.",
            "default": "time"
          },
          "includeReplies": {
            "title": "Replies to comments",
            "type": "boolean",
            "description": "Read the replies under each comment that has them (one request per such comment), as `comment` rows with `is_reply` and `parent_comment_id`. Counted in `maxCommentsPerPost`.",
            "default": false
          },
          "maxLikersPerPost": {
            "title": "Likers per post",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Who liked the post, as `user` rows (`list_kind` liker), up to 200 a post (Weibo shows a visitor no more); 0 = none.",
            "default": 0
          },
          "maxPostsPerUser": {
            "title": "Posts per user",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "The newest posts of each user in `users`, as `post` rows; 0 = the profile only. Weibo shows a visitor the newest 10 and no more.",
            "default": 0
          },
          "maxFollowersPerUser": {
            "title": "Followers per user",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "The user's followers (fans) as `user` rows, 10 a request, with the exact total in `list_total`; 0 = none. Weibo serves a visitor the first few thousand of a big account.",
            "default": 0
          },
          "maxFollowingPerUser": {
            "title": "Following per user",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "The accounts the user follows, as `user` rows, 10 a request, to the full count; 0 = none.",
            "default": 0
          },
          "maxVideosPerUser": {
            "title": "Videos per user",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "The user's video posts as `post` rows (video URL, duration, title); 0 = none.",
            "default": 0
          },
          "includeUserDetails": {
            "title": "User details",
            "type": "boolean",
            "description": "One more request per user in `users`: registration date, credit level and the profile labels, and the birthday, company and school where the user shows them. Weibo shows a visitor no IP location.",
            "default": false
          },
          "tagPosts": {
            "title": "Sentiment and kind tags",
            "type": "boolean",
            "description": "Typed tags on every post and comment row from a classification model (Jev, pinned version): `analysis_sentiment` (−1 to 1), `analysis_kind` (news, opinion, promotion, entertainment, personal, complaint, question, other) and the confidence of each. Charged per tagged row.",
            "default": false
          },
          "translateTo": {
            "title": "Translate into",
            "pattern": "^([A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*)?$",
            "type": "string",
            "description": "A language code (`en`, `de`, `ja`, `pt-BR`): a machine translation of each post, comment and hot-board word by an OpenAI model, next to the original (`translation`, with the model named in `translation_note`). Empty = no translation. Charged per translated row.",
            "default": ""
          },
          "includeRaw": {
            "title": "Raw Weibo object",
            "type": "boolean",
            "description": "Keep Weibo's own JSON object on each row (`raw`), for fields this Actor does not name.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new posts",
            "type": "boolean",
            "description": "Deliver only posts no earlier run of the same task delivered (search, topic, timeline, hot-timeline and video rows); turns the memory on. Hot-board rows then carry their change since the last run.",
            "default": false
          },
          "stateStoreName": {
            "title": "Memory name",
            "pattern": "^([A-Za-z0-9._-]{1,100})?$",
            "type": "string",
            "description": "Name of the memory between runs. Given, it turns the memory on: hot-board rows get `change_type`, `previous_rank`, `rank_change`, `heat_change` and dropped words get their own rows; with `onlyNew`, posts delivered before are skipped. Empty = derived from the inputs when `onlyNew` is on.",
            "default": ""
          },
          "maxItems": {
            "title": "Max charged rows",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "The most charged rows this run delivers, all types together. 0 = no limit. Free rows (not found, invalid, empty) do not count.",
            "default": 0
          },
          "proxyUrl": {
            "title": "Your own proxy (optional)",
            "type": "string",
            "description": "`http://user:pass@host:port` — a proxy of yours to read Weibo through, tried before the Actor's own exits. Leave empty: the Actor brings its own proxies and no Chinese exit is needed."
          },
          "runTag": {
            "title": "Run tag",
            "maxLength": 100,
            "type": "string",
            "description": "A label copied onto every row (`run_tag`), to tell runs apart in a shared dataset.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}