{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper — Search, Hot Search, Posts & Comments",
    "description": "Scrape Weibo (微博) with no login or cookie. Input: a mode plus a keyword, post IDs or user IDs. Modes: keyword search with a date window, hot-search board, hot posts, an account's newest posts, post details, comments, user profiles. Output: one row per post, topic, comment or profile.",
    "version": "0.1",
    "x-build-id": "H46oXxPy5OVEIDnJP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/istmobot~weibo-scraper-cheap/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-istmobot-weibo-scraper-cheap",
        "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/istmobot~weibo-scraper-cheap/runs": {
      "post": {
        "operationId": "runs-sync-istmobot-weibo-scraper-cheap",
        "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/istmobot~weibo-scraper-cheap/run-sync": {
      "post": {
        "operationId": "run-sync-istmobot-weibo-scraper-cheap",
        "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": "Mode",
            "enum": [
              "search",
              "hot_search",
              "hot_timeline",
              "user_posts",
              "user_profile",
              "post_details",
              "post_comments",
              "hot_search_delta",
              "complaints"
            ],
            "type": "string",
            "description": "What to get, one mode per run, all with no login. search: posts for a keyword, newest first. hot_search: the trending board (微博热搜). hot_timeline: the posts Weibo is pushing right now. user_posts: the newest posts of each account in userIds. user_profile: one row per account in userIds. post_details: one row per post in postIds. post_comments: each post in postIds plus its comments. Example: \"search\".",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword for the search mode, in Chinese or English. Chinese keywords find more posts. Examples: \"人工智能\", \"新能源汽车\", \"iPhone\"."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of results. In search, hot_timeline and post_details it caps the posts of the run; in hot_search the topics (the board has about 50); in user_posts the posts per account. user_profile returns one row per user ID. Comment rows come on top (see Max comments per post). Example: 25.",
            "default": 100
          },
          "userIds": {
            "title": "User IDs or profile URLs",
            "type": "array",
            "description": "For user_posts and user_profile. Numeric Weibo user IDs or profile links, one per line, e.g. \"2803301701\" or \"https://weibo.com/u/1642634100\". Custom addresses such as weibo.com/name are not resolved: use the numeric ID. Without a login Weibo shows only the newest posts of an account (about 10).",
            "items": {
              "type": "string"
            }
          },
          "postIds": {
            "title": "Post IDs or URLs",
            "type": "array",
            "description": "For post_details and post_comments. One per line: the numeric post ID (\"5346708137705813\"), the short code from a post link (\"RjB5HwkDj\"), or a link such as \"https://weibo.com/7087906569/RjB5HwkDj\" or \"https://m.weibo.cn/detail/5346708137705813\". The same post given twice is fetched and charged once. Leave empty to get 3 of the current hot posts as a sample.",
            "items": {
              "type": "string"
            }
          },
          "searchAliases": {
            "title": "Search aliases",
            "type": "array",
            "description": "Search mode: other terms to search and merge with the query, one per line, e.g. \"耐克\" next to \"Nike\". The terms take turns and share Max results; a post found twice is returned once.",
            "items": {
              "type": "string"
            }
          },
          "searchDateFrom": {
            "title": "Search date window — start (Beijing time)",
            "type": "string",
            "description": "Search mode: earliest post date to return, e.g. \"2026-09-01\" (00:00:00 that day) or \"2026-09-01T08:00:00\". Beijing time (UTC+08:00) unless you write an offset such as \"Z\". The search goes back in time from the end date and stops at this date. Posts before it are not returned and not charged. On a schedule, set it to get only recent posts."
          },
          "searchDateTo": {
            "title": "Search date window — end (Beijing time)",
            "type": "string",
            "description": "Search mode: latest post date to return, e.g. \"2026-09-03\" (23:59:59 that day) or \"2026-09-03T18:00:00\". Beijing time (UTC+08:00) unless you write an offset. Leave empty to start from now."
          },
          "includeComments": {
            "title": "Also scrape comments for each post",
            "type": "boolean",
            "description": "In search, hot_timeline and user_posts: after each post, also return its comments, one row per comment (mode \"post_comment\", linked by postId), up to Max comments per post. Posts with no comments add nothing. Each comment row is charged like a post. Example: true.",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit of comments per post, in post_comments mode and with Also scrape comments. Top-level comments, most liked first. Example: 20.",
            "default": 20
          },
          "fetchFullText": {
            "title": "Full text of long posts",
            "type": "boolean",
            "description": "Weibo's lists send only the first 140 characters or so of a long post. With this on, each cut-off post is fetched in full at no extra charge. Turn it off for the fastest run; cut-off posts then have isTruncated: true.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy for the requests to Weibo. The default (Apify datacenter proxy) works and is the cheapest. Keep a proxy on: in a test with no proxy, Weibo did not answer requests from Apify's servers. Example: {\"useApifyProxy\": true}.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}