{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper: Posts, Comments, Hot Search & Profiles (微博)",
    "description": "Scrape Sina Weibo (新浪微博) without login: keyword search, hot search board (热搜), post details with full long text, paginated comments, user profiles and latest posts. $3 per 1,000 rows.",
    "version": "0.2",
    "x-build-id": "GyeQ9fUHZrrsDyOuk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dheerajitbhu~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dheerajitbhu-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/dheerajitbhu~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dheerajitbhu-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/dheerajitbhu~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dheerajitbhu-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": "Mode",
            "enum": [
              "search",
              "hot_search",
              "post_detail",
              "post_comments",
              "user_profile",
              "user_posts",
              "selftest"
            ],
            "type": "string",
            "description": "What to scrape. No login or cookie is needed in any mode.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Used in 'search' mode. If left empty, the run uses 小米 as a sample keyword.",
            "items": {
              "type": "string"
            }
          },
          "searchTypes": {
            "title": "Search result types",
            "type": "array",
            "description": "Any of: top (综合), realtime (实时), hot (热门). Without login Weibo returns the first page (about 10 posts) of each type; results are merged and deduplicated.",
            "default": [
              "top",
              "realtime",
              "hot"
            ],
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post links or ids",
            "type": "array",
            "description": "Used in 'post_detail' and 'post_comments'. Example: https://weibo.com/1749127163/RnhdwmDmz, a numeric mid, or the short id.",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "User ids",
            "type": "array",
            "description": "Used in 'user_profile' and 'user_posts'. Numeric uid or a weibo.com/u/<uid> link.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max posts per keyword / user (or hot-search rows)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound. Without login Weibo returns about 10 posts per search type and about 10 latest posts per user.",
            "default": 50
          },
          "includeComments": {
            "title": "Also scrape comments",
            "type": "boolean",
            "description": "In 'search' and 'post_detail': also return each post's comments as rows (type 'comment'). Each comment is a billed row.",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Used in 'post_comments' and when 'Also scrape comments' is on. Comments are paged with Weibo's own cursor.",
            "default": 20
          },
          "expandLongText": {
            "title": "Expand long posts",
            "type": "boolean",
            "description": "Fetch the full text of posts Weibo truncates (one extra request per long post, no extra charge).",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "standard",
              "compact"
            ],
            "type": "string",
            "description": "Dataset rows are always pushed and charged the same either way. 'compact' additionally writes OUTPUT_COMPACT to the run's key-value store: a lossless columnar JSON encoding of the same rows that is far cheaper to feed to an LLM and decodes back to the exact same rows.",
            "default": "standard"
          },
          "maxChargeUsd": {
            "title": "Maximum charge per run (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Hard spending cap. The run stops cleanly before going over it; rows already delivered are kept.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Default: Apify datacenter proxy. If Weibo blocks it (HTTP 403/418/429), the run switches once to the RESIDENTIAL group automatically. Pick RESIDENTIAL to use it from the start.",
            "default": {
              "useApifyProxy": true
            }
          },
          "requestIntervalSecs": {
            "title": "Seconds between requests",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Polite pacing. Faster pacing triggers Weibo's 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}