{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper",
    "description": "Scrape Bilibili videos, danmaku text, comment threads with replies, creator catalogs and live room status by keyword, URL or creator ID. Get views, likes, coins, favorites, danmaku with timestamps, sentiment and contact handles across eight modes. No login or API key. Export JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "rublIYxMGHIhnzedN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/silentflow~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-silentflow-bilibili-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/silentflow~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-silentflow-bilibili-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/silentflow~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-silentflow-bilibili-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",
              "search_users",
              "video_detail",
              "video_comments",
              "video_danmaku",
              "user_videos",
              "live_info",
              "popular"
            ],
            "type": "string",
            "description": "What to scrape from Bilibili.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword to search. Works in Chinese (人工智能) and English (AI tutorial). Used in 'Search videos' and 'Search creators' modes."
          },
          "autoLocalize": {
            "title": "Auto-localize brand names",
            "type": "boolean",
            "description": "When on, a Latin brand name (e.g. 'Nike') also searches its Chinese name ('耐克') and results are merged, so you get full native recall even when searching in English. Add your own variants below.",
            "default": true
          },
          "searchAliases": {
            "title": "Search aliases",
            "type": "array",
            "description": "Extra term variants to also search and merge with your query (e.g. add '耐克' for Nike).",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "Sort order (search)",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow",
              "scores"
            ],
            "type": "string",
            "description": "How to sort video search results.",
            "default": "totalrank"
          },
          "durationFilter": {
            "title": "Duration filter (search)",
            "enum": [
              "any",
              "short",
              "medium",
              "long",
              "verylong"
            ],
            "type": "string",
            "description": "Filter video search results by length.",
            "default": "any"
          },
          "pubtimeBegin": {
            "title": "Published after (search)",
            "type": "string",
            "description": "Only videos published on or after this date (YYYY-MM-DD). Leave empty for no filter."
          },
          "pubtimeEnd": {
            "title": "Published before (search)",
            "type": "string",
            "description": "Only videos published on or before this date (YYYY-MM-DD). Leave empty for no filter."
          },
          "videoUrls": {
            "title": "Video URLs or BVIDs",
            "type": "array",
            "description": "Bilibili video URLs or BV IDs. Used in 'Video details', 'Video comments', and 'Video danmaku' modes. Example: https://www.bilibili.com/video/BV1GJ411x7h7 or BV1GJ411x7h7",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "title": "Creator IDs (mid)",
            "type": "array",
            "description": "Bilibili creator numeric IDs (mid). Used in 'Creator videos' and 'Live status' modes. Find a creator's mid in their profile URL: space.bilibili.com/{mid}",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category (popular)",
            "enum": [
              "all",
              "animation",
              "music",
              "dance",
              "game",
              "knowledge",
              "tech",
              "sports",
              "car",
              "life",
              "food",
              "animal",
              "fashion",
              "entertainment"
            ],
            "type": "string",
            "description": "Filter trending videos by category. Used in 'Popular / trending' mode.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of results to return, across all inputs combined.",
            "default": 100
          },
          "maxComments": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum comments to return per video. Used in 'Video comments' mode.",
            "default": 20
          },
          "maxDanmaku": {
            "title": "Max danmaku per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum danmaku (弹幕) to return per video. Used in 'Video danmaku' mode. 0 uses a sensible default.",
            "default": 0
          },
          "sortComments": {
            "title": "Sort comments by",
            "enum": [
              "hot",
              "likes",
              "time"
            ],
            "type": "string",
            "description": "How to sort comments (Hot recommended). Used in 'Video comments' mode.",
            "default": "hot"
          },
          "deltaMode": {
            "title": "Delta mode (only new videos since last run)",
            "type": "boolean",
            "description": "Turn a search into a recurring monitor: each run returns only videos not seen before (deduped across runs). Pair with an Apify Schedule for a hands-off daily feed. Used in 'Search videos' mode.",
            "default": false
          },
          "deltaStateKey": {
            "title": "Delta state key",
            "type": "string",
            "description": "Names the saved 'already-seen' state so independent monitors do not collide. Use a distinct key per query you track. Only used when Delta mode is on.",
            "default": "default"
          },
          "sentimentAnalysis": {
            "title": "Sentiment analysis",
            "type": "boolean",
            "description": "Tag each video, comment, and danmaku with Chinese sentiment: polarity (positive / neutral / negative) and a score from -1.0 to +1.0.",
            "default": false
          },
          "debugMode": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Enable verbose diagnostic logging.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}