{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper — Videos, Comments, Danmaku & Creator Uploads",
    "description": "Scrape Bilibili videos, comments with replies, danmaku (bullet comments), creator uploads, profiles, rankings and trending searches. Search in Chinese or English, get danmaku analytics and creator engagement stats as clean JSON. No account or cookie needed.",
    "version": "1.0",
    "x-build-id": "RtGr4euESfLRWWtGe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insights_data~bilibili-scraper-videos-comments-danmaku-creator-uploads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insights_data-bilibili-scraper-videos-comments-danmaku-creator-uploads",
        "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/insights_data~bilibili-scraper-videos-comments-danmaku-creator-uploads/runs": {
      "post": {
        "operationId": "runs-sync-insights_data-bilibili-scraper-videos-comments-danmaku-creator-uploads",
        "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/insights_data~bilibili-scraper-videos-comments-danmaku-creator-uploads/run-sync": {
      "post": {
        "operationId": "run-sync-insights_data-bilibili-scraper-videos-comments-danmaku-creator-uploads",
        "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": {
          "urls": {
            "title": "🔗 Links, keywords & charts (bulk)",
            "type": "array",
            "description": "Paste anything, one per line: video links or BV/av IDs, creator space links or \"uid:123\", search links, plain search keywords (Chinese or English) and chart names such as popular, weekly or ranking:game. Each entry gets its own limit below.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔎 Search keywords",
            "type": "array",
            "description": "Extra keywords to search, one per line. Same as typing a keyword in the list above.",
            "items": {
              "type": "string"
            }
          },
          "searchAliases": {
            "title": "🔤 Search aliases",
            "type": "array",
            "description": "Extra words searched together with every keyword; the results are merged, duplicates removed, and the Max results limit still applies. Add for example the Chinese name of a brand you search in English.",
            "items": {
              "type": "string"
            }
          },
          "creatorIds": {
            "title": "🧑‍🎤 Creator IDs",
            "type": "array",
            "description": "Numeric creator IDs or space links. Every upload of each creator is collected up to the creator limit.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Max results per input",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum videos (or creators, when searching for creators) for EACH keyword, chart and link list. Three keywords with 100 = up to 300 videos.",
            "default": 10
          },
          "searchType": {
            "title": "🧭 Search for",
            "enum": [
              "video",
              "creator"
            ],
            "type": "string",
            "description": "What the keywords look for. Creators returns channel profiles for outreach and research.",
            "default": "video"
          },
          "charts": {
            "title": "🏆 Charts & trending boards",
            "type": "array",
            "description": "Add public boards: popular, weekly must-watch, precious, rankings by category, or trending search keywords.",
            "items": {
              "type": "string",
              "enum": [
                "popular",
                "weekly",
                "precious",
                "ranking",
                "ranking:origin",
                "ranking:rookie",
                "trending",
                "ranking:douga",
                "ranking:game",
                "ranking:kichiku",
                "ranking:music",
                "ranking:dance",
                "ranking:cinephile",
                "ranking:ent",
                "ranking:knowledge",
                "ranking:tech",
                "ranking:information",
                "ranking:food",
                "ranking:car",
                "ranking:fashion",
                "ranking:sports",
                "ranking:animal",
                "ranking:vlog",
                "ranking:ai",
                "ranking:painting"
              ],
              "enumTitles": [
                "Popular now",
                "Weekly must-watch",
                "Precious (hall of fame)",
                "Ranking - all site",
                "Ranking - original videos",
                "Ranking - rookies",
                "Trending searches (keywords)",
                "Ranking - Animation",
                "Ranking - Games",
                "Ranking - Remixes",
                "Ranking - Music",
                "Ranking - Dance",
                "Ranking - Film & TV",
                "Ranking - Entertainment",
                "Ranking - Knowledge",
                "Ranking - Tech",
                "Ranking - News",
                "Ranking - Food",
                "Ranking - Cars",
                "Ranking - Fashion",
                "Ranking - Sports",
                "Ranking - Animals",
                "Ranking - Vlog",
                "Ranking - AI",
                "Ranking - Painting"
              ]
            }
          },
          "sortOrder": {
            "title": "↕️ Sort search results by",
            "enum": [
              "totalrank",
              "click",
              "pubdate",
              "dm",
              "stow",
              "scores"
            ],
            "type": "string",
            "description": "Order of keyword search results.",
            "default": "totalrank"
          },
          "durationFilter": {
            "title": "⏱️ Video length",
            "enum": [
              "any",
              "under10",
              "10to30",
              "30to60",
              "over60"
            ],
            "type": "string",
            "description": "Keep only videos of this length.",
            "default": "any"
          },
          "categoryId": {
            "title": "🗂️ Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Search only inside one classic category, for example 172 for mobile games. 0 = all categories.",
            "default": 0
          },
          "publishedAfter": {
            "title": "📅 Published after",
            "type": "string",
            "description": "Keep videos published on or after this day. Pick a date or a relative time such as 7 days or 1 month."
          },
          "publishedBefore": {
            "title": "🗓️ Published before",
            "type": "string",
            "description": "Keep videos published on or before this day."
          },
          "deepSearch": {
            "title": "🔭 Search deeper than 1,000 results",
            "type": "boolean",
            "description": "Split a big search into date ranges so one keyword can return more than 1,000 videos.",
            "default": true
          },
          "maxVideosPerCreator": {
            "title": "📼 Max uploads per creator",
            "minimum": 1,
            "type": "integer",
            "description": "Uploads to collect for EACH creator.",
            "default": 10
          },
          "creatorVideosSort": {
            "title": "🔀 Creator uploads order",
            "enum": [
              "pubdate",
              "click",
              "stow"
            ],
            "type": "string",
            "description": "Order of a creator's uploads.",
            "default": "pubdate"
          },
          "includeCreatorProfile": {
            "title": "🪪 Add a profile row for every author",
            "type": "boolean",
            "description": "Adds one creator row (followers, likes, verification, live room, recent-upload averages) for every video author.",
            "default": false
          },
          "includeCreatorPosts": {
            "title": "📝 Include creator posts",
            "type": "boolean",
            "description": "Adds the text and image posts of each creator.",
            "default": false
          },
          "maxPostsPerCreator": {
            "title": "🧾 Max posts per creator",
            "minimum": 1,
            "type": "integer",
            "description": "Posts to collect for each creator when posts are switched on.",
            "default": 10
          },
          "fetchVideoDetails": {
            "title": "📺 Fetch full video details",
            "type": "boolean",
            "description": "Adds coins, shares, tags, parts and honors. Turn off for the fastest run with listing fields only.",
            "default": true
          },
          "includeRelated": {
            "title": "🧩 Include related videos",
            "type": "boolean",
            "description": "Adds the IDs of related videos to each video row.",
            "default": false
          },
          "includeSubtitles": {
            "title": "📜 Include subtitles",
            "type": "boolean",
            "description": "Adds subtitle text. Bilibili serves subtitles only to logged-in viewers, so a login cookie is needed.",
            "default": false
          },
          "subtitleFormat": {
            "title": "🔤 Subtitle format",
            "enum": [
              "text",
              "segments"
            ],
            "type": "string",
            "description": "How subtitles are returned.",
            "default": "text"
          },
          "cookie": {
            "title": "🍪 Bilibili login cookie (optional)",
            "type": "string",
            "description": "The login cookie string of your own Bilibili account unlocks subtitles and commenter locations. Leave empty for everything else."
          },
          "includeComments": {
            "title": "💬 Include comments",
            "type": "boolean",
            "description": "Adds comment rows for every video.",
            "default": false
          },
          "maxComments": {
            "title": "📊 Max comments per video",
            "minimum": 0,
            "type": "integer",
            "description": "Top-level comments for EACH video. 0 = all comments.",
            "default": 10
          },
          "commentSort": {
            "title": "🔥 Comment order",
            "enum": [
              "hot",
              "time"
            ],
            "type": "string",
            "description": "Which comments come first.",
            "default": "hot"
          },
          "includeReplies": {
            "title": "🧵 Include replies",
            "type": "boolean",
            "description": "Adds replies to each comment as their own rows. Turns comments on.",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "💭 Max replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Replies for EACH comment. 0 = all replies.",
            "default": 5
          },
          "danmakuMode": {
            "title": "🌊 Danmaku (bullet comments)",
            "enum": [
              "off",
              "stats",
              "full"
            ],
            "type": "string",
            "description": "Statistics = counts, peak minute, timeline, top phrases and a sample. Full also saves every danmaku as a row.",
            "default": "off"
          },
          "danmakuSampleSize": {
            "title": "🧪 Danmaku sample size",
            "minimum": 0,
            "type": "integer",
            "description": "Sample danmaku kept on the video row.",
            "default": 10
          },
          "danmakuAllParts": {
            "title": "🎼 Every part of multi-part videos",
            "type": "boolean",
            "description": "Read the danmaku of every part, not just the requested one.",
            "default": false
          },
          "danmakuMaxSegments": {
            "title": "🕒 Danmaku time limit (6-minute blocks)",
            "minimum": 1,
            "type": "integer",
            "description": "6-minute blocks read per part when the full pool is not available. 10 = the first hour.",
            "default": 10
          },
          "trackChanges": {
            "title": "📈 Track changes since the last run",
            "type": "boolean",
            "description": "Adds view, like and other growth to each video that an earlier run with the same monitoring name saw.",
            "default": true
          },
          "deltaMode": {
            "title": "🆕 Only new videos",
            "type": "boolean",
            "description": "Skip videos that an earlier run with the same monitoring name already delivered.",
            "default": false
          },
          "skipDatasetId": {
            "title": "🧹 Skip videos from an earlier run",
            "type": "string",
            "description": "Pick a dataset from an earlier run. Videos in it (by video ID) are not collected again."
          },
          "followUpComments": {
            "title": "🔔 Follow-up comments on earlier videos",
            "type": "boolean",
            "description": "Reads new comments on videos delivered by earlier runs. Needs Only new videos and comments.",
            "default": false
          },
          "followUpDays": {
            "title": "⏳ Follow-up window (days)",
            "minimum": 1,
            "type": "integer",
            "description": "How long after delivery a video keeps being followed.",
            "default": 7
          },
          "followUpMaxVideos": {
            "title": "🎯 Max follow-up videos",
            "minimum": 1,
            "type": "integer",
            "description": "Earlier videos re-checked per run.",
            "default": 10
          },
          "stateKey": {
            "title": "🔑 Monitoring name",
            "type": "string",
            "description": "Name of the memory used for change tracking, only-new videos and follow-ups. Use different names for different projects.",
            "default": "default"
          },
          "maxScanned": {
            "title": "🔍 Max results examined per input",
            "minimum": 0,
            "type": "integer",
            "description": "Stops a search whose filters match almost nothing. 0 = no limit.",
            "default": 5000
          },
          "concurrency": {
            "title": "⚡ Videos in parallel",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Videos processed at the same time.",
            "default": 3
          },
          "requestDelay": {
            "title": "🐢 Delay between requests (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Pause between requests. Raise it if Bilibili slows you down.",
            "default": 0.35
          },
          "maxRetries": {
            "title": "🔄 Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Extra attempts when a request is refused.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Starts without a proxy and switches to a proxy by itself when Bilibili refuses requests. Set your own proxy to start there."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}