{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper API: Posts, Comments, Hot Search & Profiles (微博)",
    "description": "Scrape Weibo (微博) with no login: keyword posts, hot search, comments, and public profiles (text, counts, author). Unsigned search returns about the first page per tab. For social listening and scheduled monitoring.",
    "version": "0.4",
    "x-build-id": "PdTTYgZUX19KP3ZaI"
  },
  "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: our lossless, token-optimized copy of the same rows, cheaper to hand to an LLM.",
            "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. The actor handles the site's access protections automatically and is maintained against site changes. Pick RESIDENTIAL to use residential IPs 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
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "all",
              "changesOnly"
            ],
            "type": "string",
            "description": "Default 'all' exports every row, every run. 'changesOnly' remembers the last run and exports only posts, comments, users, or hot-search keywords that are new, changed, or no longer found — handy on a schedule. Example: 'changesOnly' to track a hashtag or user's latest posts day over day instead of re-exporting everything.",
            "default": "all"
          },
          "monitorKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Only used with 'changesOnly'. Names the saved baseline so scheduled runs compare against the right one. Leave blank to derive it automatically from your other inputs. Example: 'xiaomi-daily' if you run several monitors."
          },
          "includeRemoved": {
            "title": "Report removed items",
            "type": "boolean",
            "description": "Only used with 'changesOnly'. When true (default), items no longer found are reported once as removed. Example: false to only see new/changed items.",
            "default": true
          },
          "ignoreFields": {
            "title": "Fields to ignore when detecting changes (optional)",
            "type": "array",
            "description": "Only used with 'changesOnly'. Field names that should not, by themselves, trigger a 'changed' result. Example: [\"likesCount\", \"repostsCount\", \"commentsCount\"] to ignore engagement-count drift and only react to text/other edits.",
            "items": {
              "type": "string"
            }
          },
          "labels": {
            "title": "Add AI labels",
            "type": "boolean",
            "description": "Adds AI brand-relevance and spam filtering to each post row (search, post_detail, user_posts — not comments/hot-search/profiles): a brandRelevant flag (only when 'Brand to match' is set) and a spam flag, each with a confidence score. Below a label's confidence cutoff it returns 'low_confidence' instead of a guess. Billed per post actually labeled, in addition to that row's own charge — see pricing.",
            "default": false
          },
          "brandQuery": {
            "title": "Brand to match",
            "type": "string",
            "description": "Only used when 'Add AI labels' is on. Describe the brand/topic to check relevance against, e.g. 'Xiaomi (phones, Redmi, HyperOS)'. Leave blank to skip brand relevance and only check spam/ad."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}