{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper - Hot Search, Search Posts, Comments (微博)",
    "description": "Returns Weibo posts with full text, likes, comments, reposts, location and author followers in every row. Keyword search with date range, newest first; hot search (微博热搜) with change tracking; trending posts, comments, user profiles and posts, Black Cat complaints. $2 per 1,000 results. No login.",
    "version": "0.1",
    "x-build-id": "3nmRXQTS63a6ENDc7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/improved_knot_vyk~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-improved_knot_vyk-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/improved_knot_vyk~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-improved_knot_vyk-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/improved_knot_vyk~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-improved_knot_vyk-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": [
              "search",
              "hot_search",
              "hot_search_delta",
              "hot_timeline",
              "post_comments",
              "post_details",
              "user_profile",
              "user_posts",
              "complaints"
            ],
            "type": "string",
            "description": "One mode per run. Only user_posts beyond each account's latest ~10 posts needs your cookie; everything else works without login.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword in Chinese or English, e.g. 人工智能, 新能源汽车, iPhone. Chinese keywords give more results. Search mode."
          },
          "searchQueries": {
            "title": "More search queries",
            "type": "array",
            "description": "Extra keywords searched in the same run, each up to Max results.",
            "items": {
              "type": "string"
            }
          },
          "autoLocalize": {
            "title": "Also search the Chinese brand name",
            "type": "boolean",
            "description": "A Latin brand name (Nike, Apple, Tesla...) also searches its Chinese name (耐克, 苹果, 特斯拉). Results are merged and deduplicated and share Max results.",
            "default": true
          },
          "searchAliases": {
            "title": "Search aliases",
            "type": "array",
            "description": "Other spellings searched together with the query (merged, deduplicated, sharing Max results).",
            "items": {
              "type": "string"
            }
          },
          "searchDateFrom": {
            "title": "Posts from",
            "type": "string",
            "description": "Search mode: earliest post date, YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS. Beijing time (+08:00) unless you write an offset or Z."
          },
          "searchDateTo": {
            "title": "Posts until",
            "type": "string",
            "description": "Search mode: latest post date (a plain date covers the whole day). The search starts here and walks back."
          },
          "postIds": {
            "title": "Post URLs or ids",
            "type": "array",
            "description": "For Post details and Comments: links like https://weibo.com/7087906569/RjB5HwkDj or https://m.weibo.cn/detail/5346708137705813, numeric ids or short codes.",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "User ids or profile URLs",
            "type": "array",
            "description": "For User profiles and Posts of users: numeric ids or links like https://weibo.com/u/2803301701.",
            "items": {
              "type": "string"
            }
          },
          "complaintCompanyIds": {
            "title": "Black Cat company ids",
            "type": "array",
            "description": "Companies on tousu.sina.com.cn: the number after couid= in the company link, or the link itself. Empty = Black Cat's public feed of new complaints.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Posts per search query, posts per user, posts in the hot timeline, topics, post links or complaints per run. Up to 5,000.",
            "default": 100
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Search, hot timeline and user posts: also return the comments of each post, one row each (linked by postId).",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Comments (and replies, when included) per post.",
            "default": 20
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "hot",
              "newest"
            ],
            "type": "string",
            "description": "Order of the comments read.",
            "default": "hot"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also read the replies under each comment (they count toward Max comments).",
            "default": false
          },
          "fetchFullText": {
            "title": "Fetch full text of long posts",
            "type": "boolean",
            "description": "Weibo lists send only the first ~150 characters of long posts. This fetches the full text at no extra charge.",
            "default": true
          },
          "includeAuthorProfiles": {
            "title": "Add author profiles",
            "type": "boolean",
            "description": "Search, hot timeline and user posts: add one profile row per distinct post author (up to 100 per run), charged as a profile.",
            "default": false
          },
          "geoRollup": {
            "title": "Province rollup",
            "type": "boolean",
            "description": "Add one row per province or country the posts were sent from (share of posts, promoted posts, average sentiment). Free. Needs at least 50 located posts.",
            "default": false
          },
          "adFilter": {
            "title": "Promoted posts",
            "enum": [
              "all",
              "organic_only",
              "promo_only"
            ],
            "type": "string",
            "description": "Weibo mixes paid promotion into results. Rows left out are not charged.",
            "default": "all"
          },
          "sentimentAnalysis": {
            "title": "Sentiment",
            "type": "boolean",
            "description": "Add a lexicon-based sentiment (positive, negative or neutral, score -1 to +1) to posts, comments and complaints, for Chinese and English.",
            "default": false
          },
          "deltaMode": {
            "title": "Only new rows (delta)",
            "type": "boolean",
            "description": "For scheduled runs: return only posts, comments and complaints no earlier run with the same state key delivered.",
            "default": false
          },
          "deltaStateKey": {
            "title": "Delta state key",
            "type": "string",
            "description": "Name of an independent tracking stream for Delta mode and Hot search changes.",
            "default": "default"
          },
          "followUpComments": {
            "title": "Follow-up comments",
            "type": "boolean",
            "description": "Search with Delta mode only. A delta search reads posts minutes after they are published, before anyone replies. With this on, each post is remembered and a later run re-reads its comments once, 24 hours to 7 days after posting (newest first, up to 300 threads per run). Only comments never delivered under this key come back, marked isFollowUp.",
            "default": false
          },
          "cookieString": {
            "title": "Weibo cookie (optional)",
            "type": "string",
            "description": "Only for Posts of users beyond the latest ~10 per account: your Cookie request header from weibo.com. Leave empty otherwise."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. Without a proxy, the Actor switches to Apify Proxy by itself if Weibo blocks a request.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}