{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Video Scraper",
    "description": "Find public Bilibili videos by keyword, URL or ID, popular category, or creator. Get titles, descriptions, tags, dates, creator details, engagement counts, media links, and available comments, danmaku, and sentiment in structured data.",
    "version": "0.0",
    "x-build-id": "PkXM0MKXRvfR6hOM2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~bilibili-video-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-bilibili-video-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/maximedupre~bilibili-video-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-bilibili-video-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/maximedupre~bilibili-video-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-bilibili-video-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": [
          "discoveryMethod"
        ],
        "properties": {
          "discoveryMethod": {
            "title": "Find videos by",
            "enum": [
              "keyword",
              "videoUrlsOrIds",
              "popular",
              "creator"
            ],
            "type": "string",
            "description": "Choose keyword search, video URLs or IDs, popular or trending videos, or a creator."
          },
          "keyword": {
            "title": "Keyword",
            "minLength": 1,
            "type": "string",
            "description": "Enter one keyword to find matching public Bilibili videos. Use one keyword in each run."
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "recency",
              "views",
              "comments",
              "favorites",
              "danmaku"
            ],
            "type": "string",
            "description": "Choose how keyword results are ordered.",
            "default": "relevance"
          },
          "durationFilter": {
            "title": "Duration filter",
            "type": "object",
            "description": "Optionally set a video length range in seconds. Leave the minimum or maximum blank to set no limit.",
            "properties": {
              "minSeconds": {
                "title": "Minimum duration (seconds)",
                "type": "integer",
                "description": "Keep videos at least this many seconds long.",
                "minimum": 0
              },
              "maxSeconds": {
                "title": "Maximum duration (seconds)",
                "type": "integer",
                "description": "Keep videos no longer than this many seconds.",
                "minimum": 0
              }
            }
          },
          "dateRange": {
            "title": "Publication date range",
            "type": "object",
            "description": "Optionally filter by publication date. Use YYYY-MM-DD. Dates are read in UTC.",
            "properties": {
              "startDate": {
                "title": "Start date",
                "type": "string",
                "description": "Include videos published on or after this date.",
                "editor": "datepicker",
                "dateType": "absolute",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "endDate": {
                "title": "End date",
                "type": "string",
                "description": "Include videos published on or before this date.",
                "editor": "datepicker",
                "dateType": "absolute",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              }
            }
          },
          "videoUrlsOrIds": {
            "title": "Video URLs or IDs",
            "minItems": 1,
            "type": "array",
            "description": "Enter one or more public Bilibili video URLs or identifiers. Each item is processed separately, so one bad item does not stop the others.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "popularCategory": {
            "title": "Category",
            "type": "string",
            "description": "Optionally keep popular or trending videos from one Bilibili category. Leave blank to include all categories."
          },
          "creatorUid": {
            "title": "Creator UID",
            "pattern": "^[0-9]+$",
            "minLength": 1,
            "type": "string",
            "description": "Enter one numeric Bilibili creator ID (UID) to find that creator's recent public videos."
          },
          "newOnly": {
            "title": "New-only monitoring",
            "type": "boolean",
            "description": "Use this for recurring runs. In Keyword and Popular or trending videos, it returns only videos not seen in an earlier run with the same monitoring input. It is ignored for Video URLs or IDs and Creator.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "type": "integer",
            "description": "Optional positive limit for Keyword, Popular or trending videos, and Creator. Leave it empty to return all available results until the source is exhausted. This does not limit submitted Video URLs or IDs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}