{
  "openapi": "3.0.1",
  "info": {
    "title": "Bilibili Trending Videos Scraper 哔哩哔哩: Rankings & Hot Searches",
    "description": "Scrape Bilibili 哔哩哔哩 (B站) popular videos, category ranking boards, the all-time must-watch list and hot searches as JSON. Filter by views, category and age, sort by views per hour, and track new entries and rank moves between scheduled runs. Export to CSV, Excel or API.",
    "version": "0.2",
    "x-build-id": "MQdYBOfSB6OTcd3T1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~bilibili-popular-video-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-bilibili-popular-video-intelligence",
        "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/getascraper~bilibili-popular-video-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-bilibili-popular-video-intelligence",
        "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/getascraper~bilibili-popular-video-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-bilibili-popular-video-intelligence",
        "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": {
          "feed": {
            "title": "Feed",
            "enum": [
              "popular",
              "ranking",
              "mustWatch",
              "hotSearches"
            ],
            "type": "string",
            "description": "Which Bilibili list to collect: the live popular feed, the top-100 ranking board, the all-time must-watch list, or the current hot search keywords.",
            "default": "popular"
          },
          "rankingPartition": {
            "title": "Ranking partition",
            "enum": [
              "0",
              "1",
              "3",
              "4",
              "5",
              "11",
              "23",
              "36",
              "119",
              "129",
              "155",
              "160",
              "168",
              "177",
              "181",
              "188",
              "211",
              "217",
              "223",
              "234"
            ],
            "type": "string",
            "description": "Only used when the feed is the ranking board. Pick one top-level partition, or all partitions for the site-wide top 100.",
            "default": "0"
          },
          "rankingType": {
            "title": "Ranking type",
            "enum": [
              "all",
              "origin",
              "rookie"
            ],
            "type": "string",
            "description": "Only used for the ranking board. All content, original uploads only, or rookie creators only.",
            "default": "all"
          },
          "categories": {
            "title": "Only these categories",
            "type": "array",
            "description": "Keep videos in these categories. Accepts English or Chinese partition names such as Gaming or 游戏, sub-category names such as 单机游戏, or numeric category IDs. Leave empty for all categories.",
            "items": {
              "type": "string"
            }
          },
          "excludeCategories": {
            "title": "Skip these categories",
            "type": "array",
            "description": "Drop videos in these categories. Same formats as the category filter.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Title or description contains",
            "type": "array",
            "description": "Keep videos whose title, description or hashtags contain at least one of these words. Not case sensitive.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Title or description does not contain",
            "type": "array",
            "description": "Drop videos whose title, description or hashtags contain any of these words.",
            "items": {
              "type": "string"
            }
          },
          "creators": {
            "title": "Only these creators",
            "type": "array",
            "description": "Keep videos from these creators. Accepts a creator ID, a space.bilibili.com profile link, or part of the creator name.",
            "items": {
              "type": "string"
            }
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Drop videos with fewer views than this. Zero turns the filter off.",
            "default": 0
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Drop videos with fewer likes than this. Zero turns the filter off.",
            "default": 0
          },
          "minEngagementRatePct": {
            "title": "Minimum engagement rate (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Drop videos whose engagement rate is lower. Engagement rate is likes, coins, favorites, shares and comments added together as a percentage of views. Zero turns the filter off.",
            "default": 0
          },
          "minDurationMinutes": {
            "title": "Minimum length (minutes)",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Drop videos shorter than this. Zero turns the filter off.",
            "default": 0
          },
          "maxDurationMinutes": {
            "title": "Maximum length (minutes)",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Drop videos longer than this. Zero turns the filter off.",
            "default": 0
          },
          "publishedWithin": {
            "title": "Published within",
            "enum": [
              "any",
              "6h",
              "12h",
              "24h",
              "3d",
              "7d",
              "14d",
              "30d"
            ],
            "type": "string",
            "description": "Keep only videos uploaded recently. Useful for spotting fresh breakouts instead of long-running hits.",
            "default": "any"
          },
          "contentOrigin": {
            "title": "Original or repost",
            "enum": [
              "any",
              "original",
              "repost"
            ],
            "type": "string",
            "description": "Keep only self-made uploads, or only reposts and licensed uploads.",
            "default": "any"
          },
          "contentKind": {
            "title": "Content type",
            "enum": [
              "any",
              "ugc",
              "ogv"
            ],
            "type": "string",
            "description": "Creator uploads versus official series episodes (anime, drama and similar) that Bilibili lists in its feeds.",
            "default": "any"
          },
          "includeTags": {
            "title": "Add video tags",
            "type": "boolean",
            "description": "Add the creator's tag list to each saved video. Useful for topic analysis.",
            "default": false
          },
          "includeCreatorStats": {
            "title": "Add creator stats",
            "type": "boolean",
            "description": "Add follower count, following count, upload count, total likes, level and verification to each saved video. One lookup per distinct creator.",
            "default": false
          },
          "trackChanges": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Save a snapshot after each run and add fields such as isNew, positionChange and viewsGainedPerHour by comparing with the last snapshot. The first run only creates the baseline.",
            "default": true
          },
          "historyName": {
            "title": "Tracking name",
            "type": "string",
            "description": "A name for this tracking history, so each run compares against the right earlier snapshot. Use a different name for each schedule or filter set that reads the same feed, for example gaming-daily or all-weekly.",
            "default": "default"
          },
          "onlyNewEntries": {
            "title": "Only new entries",
            "type": "boolean",
            "description": "Save only videos that entered the feed since the last run, or came back after leaving. Needs change tracking and an earlier run.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of rows to save after filtering and sorting.",
            "default": 20
          },
          "scanDepth": {
            "title": "Scan depth",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many feed positions to read before filtering (the popular feed goes up to 500, ranking and must-watch lists are shorter). Raise it when filters are tight.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "feed",
              "views",
              "likes",
              "coins",
              "favorites",
              "shares",
              "comments",
              "danmaku",
              "engagementRate",
              "viewsPerHour",
              "newest"
            ],
            "type": "string",
            "description": "Order of the saved rows. Feed order keeps Bilibili's own ranking; the others re-rank the matching videos.",
            "default": "feed"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is a fallback for requests Bilibili refuses. The default datacenter proxy is enough. Turn it off to always connect directly.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}