{
  "openapi": "3.0.1",
  "info": {
    "title": "Weibo Scraper: Search, Posts, Comments & Profiles",
    "description": "Scrape Weibo with no cap per run: search posts by keyword and date, read any account without a cookie, comments, profiles and the hot search. Exact counters, watch mode, webhook. From $2.50 per 1,000 posts.",
    "version": "0.1",
    "x-build-id": "kLlwKZ9GJwpO6pOwp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alexmorain~weibo-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alexmorain-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/alexmorain~weibo-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alexmorain-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/alexmorain~weibo-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alexmorain-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",
              "user_posts",
              "post_comments",
              "post_details",
              "user_profile",
              "hot_search"
            ],
            "type": "string",
            "description": "<b>search</b>: posts by keyword and date. <b>user_posts</b>: the timeline of accounts, no cookie needed. <b>post_comments</b>: comments of posts. <b>post_details</b>: one row per post. <b>user_profile</b>: profiles. <b>hot_search</b>: the hot search ranking now.",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords (search)",
            "type": "array",
            "description": "One keyword per line, Chinese or other, for example <code>英伟达</code>. Hashtags work too: <code>#英伟达#</code>.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Posts from (search, user posts)",
            "type": "string",
            "description": "Optional, <code>YYYY-MM-DD</code>, Beijing time. Search default: the last 7 days. For user posts, reading stops as soon as older posts are reached."
          },
          "dateTo": {
            "title": "Posts until (search, user posts)",
            "type": "string",
            "description": "Optional, <code>YYYY-MM-DD</code>, Beijing time, included. Search default: today."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "all",
              "hot",
              "original",
              "verified",
              "media",
              "viewpoint"
            ],
            "type": "string",
            "description": "Which posts a search returns.",
            "default": "all"
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "all",
              "pic",
              "video",
              "music",
              "link"
            ],
            "type": "string",
            "description": "Only posts with this kind of content.",
            "default": "all"
          },
          "maxPostsPerKeyword": {
            "title": "Max posts per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Stop a keyword after this many posts, newest first. A busy keyword gives about 480 posts per hour; the run summary lists hours that were fuller than Weibo shows.",
            "default": 100
          },
          "userIds": {
            "title": "Users (user posts, profile)",
            "type": "array",
            "description": "One numeric user id or profile link per line, for example <code>2121863747</code> or <code>https://weibo.com/u/2121863747</code>. Unknown accounts are skipped and not charged.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerUser": {
            "title": "Max posts per user",
            "minimum": 1,
            "type": "integer",
            "description": "Stop an account after this many posts, newest first.",
            "default": 100
          },
          "postIds": {
            "title": "Posts (comments, details)",
            "type": "array",
            "description": "One post id, short id or link per line, for example <code>5364811984014247</code>, <code>Rrc3sgQhV</code> or <code>https://weibo.com/2121863747/Rrc3sgQhV</code>.",
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 1,
            "type": "integer",
            "description": "Weibo shows about 300 comments per sort order to visitors, whatever the post announces. The run summary gives announced and delivered comments per post.",
            "default": 100
          },
          "commentSort": {
            "title": "Comment sort",
            "enum": [
              "both",
              "hot",
              "time"
            ],
            "type": "string",
            "description": "<b>both</b> merges the most liked and the newest comments without duplicates, which reaches the most comments.",
            "default": "both"
          },
          "includeComments": {
            "title": "Add comments to posts (search, user posts)",
            "type": "boolean",
            "description": "Also reads up to <code>maxCommentsPerPost</code> comments of every delivered post. Comments are charged as comments.",
            "default": false
          },
          "exactCounts": {
            "title": "Exact counters and dates (search)",
            "type": "boolean",
            "description": "Search lists give no counters and only relative dates. This reads each post once more for exact reposts, comments, likes, a precise date and the full text. No extra charge.",
            "default": true
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on rows for the whole run, all types together. Only delivered rows are charged.",
            "default": 1000
          },
          "newOnly": {
            "title": "Watch mode: only new posts",
            "type": "boolean",
            "description": "Search and user posts only. Returns the posts you have not received in an earlier run with the same watch name. The first run sets the starting point and delivers the posts it reads.",
            "default": false
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Memory of what was already delivered. Use one name per list and per purpose, for example <code>competitors</code>.",
            "default": "default"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. When the run ends with rows, a summary and the latest rows are sent there by POST (Slack, Discord, Zapier, your own endpoint). The URL is never written to a log."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}