{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo search, hot search & post scraper ( 微博 )",
    "description": "Collect Weibo (微博) posts, hot-search board entries, timelines, comments, and user profiles. No login required for search and hot-search modes. Each run produces one dataset item per post or profile row.",
    "version": "0.1",
    "x-build-id": "dezY0kzeXLdXLjvKy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_dino~weibo-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_dino-weibo-search",
        "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/data_dino~weibo-search/runs": {
      "post": {
        "operationId": "runs-sync-data_dino-weibo-search",
        "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/data_dino~weibo-search/run-sync": {
      "post": {
        "operationId": "run-sync-data_dino-weibo-search",
        "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": "Mode",
            "enum": [
              "search",
              "post_details",
              "post_comments",
              "user_profile",
              "hot_search",
              "hot_search_delta",
              "hot_timeline",
              "user_posts"
            ],
            "type": "string",
            "description": "What to scrape: keyword search (default), post details/ids, post comment threads, a user's profile, the real-time hot-search board, a hot-search delta (new entries since the last run), the hot timeline, or one user's posts (needs a logged-in cookie).",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search keyword",
            "type": "string",
            "description": "Keyword to search (mode=search). Latin brand names are automatically given a Chinese alias (e.g. Nike → 耐克).",
            "default": "人工智能"
          },
          "searchAliases": {
            "title": "Extra search terms / aliases",
            "type": "array",
            "description": "Extra terms to merge into the search (when mode=search), each as its own string.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "autoLocalize": {
            "title": "Auto-localize Latin terms",
            "type": "boolean",
            "description": "Automatically add a Chinese alias for Latin brand names so search matches the local Weibo vocabulary.",
            "default": true
          },
          "searchDateFrom": {
            "title": "Search date from",
            "type": "string",
            "description": "Earliest post date to search, Beijing time (YYYY-MM-DD). Optional."
          },
          "searchDateTo": {
            "title": "Search date to",
            "type": "string",
            "description": "Latest post date to search, Beijing time (YYYY-MM-DD). Pages are walked back from this date. Optional."
          },
          "userIds": {
            "title": "User IDs",
            "type": "array",
            "description": "Weibo user IDs or profile URLs (mode=user_profile / user_posts).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "postIds": {
            "title": "Post IDs",
            "type": "array",
            "description": "Weibo post IDs, short codes, or URLs (mode=post_details / post_comments).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows. The search window is capped by Weibo at ~1000 posts per query.",
            "default": 10
          },
          "maxComments": {
            "title": "Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum comments to fetch per post when comments are enabled.",
            "default": 20
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Also fetch each post's comment thread and emit one row per comment.",
            "default": false
          },
          "includeReplies": {
            "title": "Include comment replies",
            "type": "boolean",
            "description": "With includeComments, also fetch replies to comments.",
            "default": false
          },
          "fetchFullText": {
            "title": "Fetch full text",
            "type": "boolean",
            "description": "Expand truncated long posts to their full text.",
            "default": true
          },
          "adFilter": {
            "title": "Promoted-post handling",
            "enum": [
              "all",
              "exclude",
              "promo_only"
            ],
            "type": "string",
            "description": "Keep all posts, exclude promoted posts, or keep only promoted posts.",
            "default": "all"
          },
          "includeAuthorProfiles": {
            "title": "Include author profiles",
            "type": "boolean",
            "description": "Also emit a profile row for each post author.",
            "default": false
          },
          "sentimentAnalysis": {
            "title": "Sentiment analysis",
            "type": "boolean",
            "description": "Tag each post row with a lightweight sentiment score and label.",
            "default": false
          },
          "deltaMode": {
            "title": "Delta mode",
            "type": "boolean",
            "description": "Only emit rows no earlier run has delivered (state is kept per actor).",
            "default": false
          },
          "delay": {
            "title": "Delay (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Seconds to wait between requests. A small delay keeps runs stable.",
            "default": 0.5
          },
          "maxSearchPages": {
            "title": "Max search pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum Weibo search pages to walk (mode=search).",
            "default": 40
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}