{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper: Search Posts by Keyword or User (微博)",
    "description": "Weibo scraper for public posts by keyword search or user timeline: full text, ISO dates, likes, reposts, comments, images, video, poster region and author. No Weibo login, no browser, no cookies. $3 per 1,000 posts; export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "ffIHopZS1yHI2cpL3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagleaner~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagleaner-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/datagleaner~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datagleaner-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/datagleaner~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datagleaner-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Weibo search words, Chinese or English (for example 咖啡, 瑞幸, Nike). Each keyword returns up to the number below, at most 1,000 posts (a Weibo limit). Pay per post: $3 per 1,000.",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "Users",
            "type": "array",
            "description": "Optional. Numeric Weibo user IDs or profile URLs such as https://weibo.com/u/1669879400. Returns that user's latest posts (about 10, a Weibo guest limit), newest first.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs or IDs",
            "type": "array",
            "description": "Optional. Single posts to fetch: a weibo.com or m.weibo.cn post link, or a bare post ID. Deleted or private posts are skipped with a warning.",
            "items": {
              "type": "string"
            }
          },
          "hotSearch": {
            "title": "Hot search board (微博热搜)",
            "type": "boolean",
            "description": "Adds the current 微博热搜 board: one row per trend with rank, word, heat, label and link (about 50 rows, $2 per 1,000). Rows have type 'hotSearch'; posts have type 'post'.",
            "default": false
          },
          "maxHotSearchItems": {
            "title": "Max hot-search trends",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "How many trends to keep from the top of the board.",
            "default": 50
          },
          "maxItemsPerQuery": {
            "title": "Max posts per keyword or user",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most posts to collect for each keyword and each user (default 100, up to 1,000). 20 gives a quick, cheap test: $0.06.",
            "default": 100
          },
          "popularFirst": {
            "title": "Most-engaged posts first",
            "type": "boolean",
            "description": "Keyword search only. On: searches posts from a day ago or older, so likes, reposts and comments have built up, and puts the most-engaged first on each result page. Off (default): the newest posts, which mostly have zero engagement yet. A date set in Only posts until overrides the one-day offset.",
            "default": false
          },
          "sinceDate": {
            "title": "Only posts since",
            "type": "string",
            "description": "Optional. Skip posts older than this date (YYYY-MM-DD or ISO 8601, Beijing time if no timezone). For users the run stops at the first older post."
          },
          "untilDate": {
            "title": "Only posts until",
            "type": "string",
            "description": "Skip posts newer than this date (YYYY-MM-DD means through the end of that day, or ISO 8601; Beijing time if no timezone). For keyword search Weibo searches back from this moment, so with sinceDate it reaches older date ranges, still up to 1,000 posts per keyword."
          },
          "includeUserProfile": {
            "title": "Add full author profile",
            "type": "boolean",
            "description": "Adds the author's exact follower count, bio, verified reason, following count, post count, gender and avatar to each post. One extra request per distinct author, so runs are slower. Keyword search rows have no follower count without it.",
            "default": false
          },
          "includeComments": {
            "title": "Add comments",
            "type": "boolean",
            "description": "Adds a `comments` list to each post: top-level comments, hottest first, each with text, likes, reply count, region, author and the first replies Weibo shows. Costs extra requests (about one per 20 comments).",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on top-level comments for each post when comments are on.",
            "default": 20
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0.5,
            "maximum": 30,
            "type": "number",
            "description": "Base pause between requests; the actual pause is randomised up to 1.5x. Raise it if you see throttling.",
            "default": 1.2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Works without a proxy from Apify datacenter IPs; enable if Weibo starts blocking your runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}