{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo 微博 Scraper",
    "description": "Scrape Weibo (微博) posts, user profiles, timelines, comments and the realtime hot-search list by keyword, user or post ID — no login. Rows carry kind, text_raw, created_at, user_screen_name, reposts_count, comments_count and attitudes_count. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "QudfiAVhmwWRtohVM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/herus13~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-herus13-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/herus13~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-herus13-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/herus13~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-herus13-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "hot_search",
              "search",
              "profile",
              "timeline",
              "post",
              "comments"
            ],
            "type": "string",
            "description": "What to collect: `hot_search` the realtime hot-search list (needs no other input); `search` posts by keyword; `profile` user profiles; `timeline` a user's recent posts; `post` specific posts with full text; `comments` comments and replies on specific posts. Each mode reads only its own fields — a field filled in for another mode is rejected, not ignored, so clear it when you switch. Default hot_search, the one mode that runs with nothing else filled in.",
            "default": "hot_search"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, one per entry — for example `咖啡` (coffee) or `#新能源#` for a topic. Each term returns up to `max_items` posts; a post matching two terms is returned once. Terms that differ only in surrounding spaces are searched, and billed, once. Required when `mode` is search; used ONLY by search — leave empty for every other mode.",
            "items": {
              "type": "string"
            }
          },
          "users": {
            "title": "Users",
            "type": "array",
            "description": "Weibo users, one per entry: a numeric user id (`2803301701`), a screen name (`人民日报`), a custom domain (`rmrb`), or a profile URL such as `https://weibo.com/u/2803301701` or `https://m.weibo.cn/u/2803301701`. The same user given in two forms is scraped, and billed, once. Required when `mode` is profile or timeline; used ONLY by those two — leave empty for every other mode.",
            "items": {
              "type": "string"
            }
          },
          "post_ids": {
            "title": "Posts",
            "type": "array",
            "description": "Weibo posts, one per entry: a numeric post id (mid, 16 digits), the short code after the user id in a weibo.com post URL (mblogid), or the post URL itself. The same post given in two forms is scraped, and billed, once. Required when `mode` is post or comments; used ONLY by those two — leave empty for every other mode.",
            "items": {
              "type": "string"
            }
          },
          "max_items": {
            "title": "Max results per target",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many records to return per keyword, user or post, from 1 to 10000. Replies count toward a post's total like any comment. For hot_search it caps the whole run (the list holds about 50 entries). Default 50.",
            "default": 50
          },
          "search_type": {
            "title": "Search ordering",
            "enum": [
              "top",
              "latest"
            ],
            "type": "string",
            "description": "Which search results to read. `top` (综合, used when this is left empty) reads Weibo's relevance-ranked pages, which end after about 2,000 posts per keyword — often fewer. `latest` (实时) reads newest-first and keeps going back in time past that point, so it goes deeper; it also includes related posts that do not contain the literal keyword. A date range always searches the latest ordering, so do not combine `top` with dates. Used ONLY when `mode` is search — leave empty for every other mode."
          },
          "start_date": {
            "title": "Posts from date",
            "type": "string",
            "description": "Keep only posts published on or after this date, written as YYYY-MM-DD in Beijing time, for example 2026-09-01. Through the API a full timestamp such as 2026-09-01T08:00:00+08:00 also works. Leave empty for no lower bound. Setting a date searches the latest ordering, back through time, and drops posts outside the range. Used ONLY when `mode` is search — leave empty for every other mode."
          },
          "end_date": {
            "title": "Posts to date",
            "type": "string",
            "description": "Keep only posts published on or before this date (the whole day counts), written as YYYY-MM-DD in Beijing time, for example 2026-09-15. Leave empty for no upper bound. Must not be before `start_date`. Used ONLY when `mode` is search — leave empty for every other mode."
          },
          "comment_sort": {
            "title": "Comment order",
            "enum": [
              "hot",
              "time"
            ],
            "type": "string",
            "description": "Which comments come first: `hot` (most-liked first, the default) or `time` (newest first). Used ONLY when `mode` is comments; any other mode must keep the default.",
            "default": "hot"
          },
          "include_replies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also walk each comment's reply thread and return the replies as rows marked `is_reply`, linked to their comment by `root_id`. Replies count toward `max_items`. Default false. Used ONLY when `mode` is comments; any other mode must leave it off.",
            "default": false
          },
          "proxyUrls": {
            "title": "Your own proxy URLs (optional)",
            "type": "array",
            "description": "Leave empty and the run uses the residential proxy this actor ships with, included in the price of the run. To route the run through your own account instead, add one gateway URL per entry, for example http://user:pass@host:port — works with DataImpulse, Bright Data, Oxylabs, Smartproxy or any provider that issues URLs. When set, only these URLs are used.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}