{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Scraper & API - Videos, Comments, Danmaku 哔哩哔哩",
    "description": "[Limited Launch Offer $1.5/1K] Bilibili video search, comments and danmaku without login: keyword search, video details by URL/BV, UP主 creators and uploads, popular and ranking lists. B站 data API.",
    "version": "0.1",
    "x-build-id": "LGo9nsbLLG1Kp2onZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kalilfagundes.w~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kalilfagundes.w-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/kalilfagundes.w~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kalilfagundes.w-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/kalilfagundes.w~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kalilfagundes.w-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",
        "properties": {
          "searchQueries": {
            "title": "Search keywords (searchQueries)",
            "type": "array",
            "description": "Videos matching each keyword, Chinese or English (e.g. 人工智能, \"Genshin Impact\"). Bilibili returns up to 1,000 videos per keyword.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video URLs or BV ids (videoUrls)",
            "type": "array",
            "description": "Links like https://www.bilibili.com/video/BV1nyeGz6EVs, BV ids, av ids or b23.tv short links. Returns full details for each video.",
            "items": {
              "type": "string"
            }
          },
          "creators": {
            "title": "Creators (creators)",
            "type": "array",
            "description": "Creator (UP主) UIDs like 946974, space links like https://space.bilibili.com/946974, or exact names. Returns a profile row and the latest uploads.",
            "items": {
              "type": "string"
            }
          },
          "trending": {
            "title": "Trending list (trending)",
            "enum": [
              "none",
              "popular",
              "ranking"
            ],
            "type": "string",
            "description": "Also scrape Bilibili's popular feed or the all-site top-100 ranking.",
            "default": "none"
          },
          "searchSort": {
            "title": "Search sort (searchSort)",
            "enum": [
              "relevance",
              "views",
              "newest",
              "danmaku",
              "favorites",
              "comments"
            ],
            "type": "string",
            "description": "Order of search results.",
            "default": "relevance"
          },
          "searchDuration": {
            "title": "Video length (searchDuration)",
            "enum": [
              "any",
              "under10",
              "10to30",
              "30to60",
              "over60"
            ],
            "type": "string",
            "description": "Only videos of this length (search only).",
            "default": "any"
          },
          "publishedAfter": {
            "title": "Published after (publishedAfter)",
            "type": "string",
            "description": "Search only: videos published on or after this date, YYYY-MM-DD (Beijing time)."
          },
          "publishedBefore": {
            "title": "Published before (publishedBefore)",
            "type": "string",
            "description": "Search only: videos published on or before this date, YYYY-MM-DD."
          },
          "maxVideosPerSearch": {
            "title": "Videos per keyword (maxVideosPerSearch)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Up to 1,000 (Bilibili's cap per keyword).",
            "default": 100
          },
          "maxVideosPerCreator": {
            "title": "Videos per creator (maxVideosPerCreator)",
            "minimum": 0,
            "type": "integer",
            "description": "Latest uploads per creator. 0 = only the profile row.",
            "default": 30
          },
          "maxTrendingVideos": {
            "title": "Trending videos (maxTrendingVideos)",
            "minimum": 0,
            "type": "integer",
            "description": "Videos from the trending list (ranking has 100).",
            "default": 50
          },
          "fullVideoDetails": {
            "title": "Full details for search & creator videos (fullVideoDetails)",
            "type": "boolean",
            "description": "Adds coins, shares, all tags, parts and cid to search and creator results (one extra request per video). Video URLs and trending lists always have them.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Comments per video (maxCommentsPerVideo)",
            "minimum": 0,
            "type": "integer",
            "description": "Comments for every video found: top and newest comments plus their replies (without login Bilibili shows up to about 40 top-level comments and 20 replies each). 0 = no comments.",
            "default": 0
          },
          "includeReplies": {
            "title": "Include replies (includeReplies)",
            "type": "boolean",
            "description": "Also save replies to each comment.",
            "default": true
          },
          "maxDanmakuPerVideo": {
            "title": "Danmaku per video (maxDanmakuPerVideo)",
            "minimum": 0,
            "type": "integer",
            "description": "Bullet comments (弹幕) for every video found, in video-time order: text, second in the video, color, sent time. Bilibili serves up to 1,500-8,000 per video. 0 = no danmaku.",
            "default": 0
          },
          "includeCreatorProfile": {
            "title": "Creator profile rows (includeCreatorProfile)",
            "type": "boolean",
            "description": "One row per creator: followers, following, videos, likes, level, verification, bio.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum rows in total (maxItems)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows (videos + comments + danmaku + creators). 0 = no limit.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy (proxyConfiguration)",
            "type": "object",
            "description": "Used when Bilibili rate-limits a session: the session restarts on a new proxy IP.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}