{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Video Scraper",
    "description": "Scrape Bilibili videos by keyword, video URL, creator, or popular list and collect titles, descriptions, creator IDs, publish dates, durations, views, likes, and cover URLs. Optionally include top comments and time-synced danmaku; no account is required.",
    "version": "0.1",
    "x-build-id": "e4fd1Vnt9acwaPueO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axiomworks~bilibili-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axiomworks-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/axiomworks~bilibili-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axiomworks-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/axiomworks~bilibili-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axiomworks-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": {
          "searchTerms": {
            "title": "Search keyword list",
            "type": "array",
            "description": "Keywords to search in mode=\"search\", e.g. [\"python tutorial\"] or [\"机器学习\"]. Supply at least one non-empty string. Results stay in their original language; up to about 1000 matching videos per keyword. Ignored in other modes.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Video selection mode",
            "enum": [
              "search",
              "video",
              "creatorUploads",
              "popular"
            ],
            "type": "string",
            "description": "Choose \"search\" for searchTerms, \"video\" for video URLs or IDs in startUrls, \"creatorUploads\" for creator URLs or numeric IDs in startUrls, or \"popular\" with no target. Example: \"search\". Default \"search\".",
            "default": "search"
          },
          "startUrls": {
            "title": "Video URLs or IDs; creator URLs or IDs",
            "type": "array",
            "description": "Targets for mode=\"video\": full www.bilibili.com or m.bilibili.com video URLs, BV IDs such as \"BV1rpWjevEip\", or AV IDs such as \"av113006243481679\". For mode=\"creatorUploads\": \"https://space.bilibili.com/1458132\" or \"1458132\". Supply an array of strings. Ignored in search/popular modes. Default [].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum videos across all targets",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit the total videos returned across all keywords or targets, e.g. 10. Integer 1-10000, default 50. Stops at this limit when enough videos exist; fewer are returned when targets have fewer matches.",
            "default": 50
          },
          "includeComments": {
            "title": "Attach top comment arrays",
            "type": "boolean",
            "description": "Set true to attach top comments in each video's comments array, e.g. true. Default false. Adds paginated requests; commentsPerVideo controls the limit. Leave false for faster video discovery.",
            "default": false
          },
          "commentsPerVideo": {
            "title": "Maximum top comments per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit comments per video when includeComments=true, e.g. 20. Integer 1-1000, default 20. Fewer may be available. Ignored when includeComments=false.",
            "default": 20
          },
          "includeDanmaku": {
            "title": "Attach timed danmaku arrays",
            "type": "boolean",
            "description": "Set true to attach time-synced bullet comments in each video's danmaku array, e.g. true. Default false. Adds requests; danmakuPerVideo controls the limit. Leave false for faster video discovery.",
            "default": false
          },
          "danmakuPerVideo": {
            "title": "Maximum danmaku per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Limit timed danmaku entries per video when includeDanmaku=true, e.g. 100. Integer 1-5000, default 100. Fewer may be available. Ignored when includeDanmaku=false.",
            "default": 100
          },
          "includeDetails": {
            "title": "Attach favorites, coins, shares and part count",
            "type": "boolean",
            "description": "Set true to add favorites, coins, shares and pageCount, e.g. true. Default false. May add a video detail request in search or creatorUploads mode. Leave false for a smaller result record.",
            "default": false
          },
          "includeCreatorProfile": {
            "title": "Attach uploader profile and audience counts",
            "type": "boolean",
            "description": "Set true to add authorFollowers, authorFollowing, authorLevel, authorVerifiedTitle, authorBio, authorVideoCount and authorTotalLikes, e.g. true. Default false. Adds one request per distinct creator; unavailable profile values are null.",
            "default": false
          },
          "enrichWithAI": {
            "title": "Classify video topic with AI",
            "type": "boolean",
            "description": "Set true to classify title and description as tutorial, entertainment, news, gaming, music or other in contentCategory, e.g. true. Default false. Uses a third-party AI processor; an enriched-result event applies only when classification succeeds. Limit 500 AI calls per run.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Apify Proxy or custom proxy settings",
            "type": "object",
            "description": "Provide Apify Proxy settings, e.g. {\"useApifyProxy\":true,\"apifyProxyGroups\":[\"RESIDENTIAL\"]}, or custom proxyUrls. Default uses residential Apify Proxy. If requests stay blocked, check proxy availability and retry later.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}