Enter a keyword to search videos across all of Bilibili; searching automatically batch-retrieves high-definition download links, making video collection no longer cumbersome
Introduction
Bilibili Search Batch Download is a Bilibili video collection tool designed specifically for content creators, brand operators, and market researchers. Just enter a keyword to quickly search video works across all of Bilibili, flexibly sort and filter by dimensions such as play count, number of likes, and publish time; after the search is complete, it automatically batch-retrieves all high-definition download links, saying goodbye to the inefficient operation of opening web pages one by one and downloading manually.
- Core Value: combines the three steps of "search → filter → download" into one, completing the entire process from discovery to collection in a single conversation, greatly improving the efficiency of video material collection
- Target Users: content creators, social media operators, marketing planners, MCN agencies, video editors, competitive analysis personnel
- Technical Foundation: based on the Bilibili work search and video parsing capabilities of the Honghu Data Platform
Features
Core Capabilities
| Feature | Description |
|---|---|
| Keyword Search | Enter any keyword to search Bilibili video works across the entire site, with support for paging to view more results |
| Multi-dimensional Sorting | By default, sorted by comprehensive ranking; also supports latest published and most liked, and can filter publish time by the last 7 days/30 days/90 days/unlimited |
| Flexible Paging | Search results are displayed in pages, with support for forward and backward paging, up to 50 results per page |
| One-click Batch Download | After searching, automatically batch-retrieves the high-definition download links and cover images of all results, completing collection in one search |
| High-definition Resources | Automatically parses the highest available video quality, and returns multiple resource types such as video, audio, and cover images at the same time |
| Credit Protection | Before searching, proactively prompts with an estimate of credit consumption, and executes after user confirmation; downloads execute directly without requiring secondary confirmation |
Highlights
- One-sentence Operation: say "search Bilibili for videos about XX" to get results, with no need to memorize complex commands
- Integrated Search and Download: after searching, automatically parses all video download links and cover images, with no need to manually retrieve them one by one
- Zero-cache Design: results are displayed only in the conversation and are not cached to disk, making data secure and controllable
- Multi-resource Parsing: the same video can simultaneously obtain video streams, audio streams, and cover images, satisfying different usage scenarios
One-click Installation
This skill is a standard Skill file package and is compatible with all AI Agent platforms that support the Skill mechanism.
Prerequisites
- Python 3.6+ installed
Qoder Platform
- Place the skill folder into Qoder's Skills directory
- Restart Qoder or refresh the skill list
- Configure data service access credentials (see the Usage Guide below - Authentication Configuration)
OpenClaw Platform
- Import the skill folder into the OpenClaw skill library
- Enable the skill in settings
- Configure data service access credentials
WorkBuddy Platform
- Add the skill folder to WorkBuddy's skills path
- Reload the skill configuration
- Configure data service access credentials
Codex Platform
- Place the skill folder into Codex's skills directory
- Restart Codex to load the new skill
- Configure data service access credentials
Claude Code Platform
- Add the skill folder to Claude Code's skills configuration path
- Restart the Claude Code session
- Configure data service access credentials
Usage Guide
Authentication Configuration
Before using this skill, you need to configure the Red Fox API key REDFOX_API_KEY:
- Visit Red Fox Hub official website to learn about the service details
- Go to registration page to register an account (new users receive free credits)
- After logging in, create a key on the API key management page, in the format
ak_xxxxxxxx - Set the key as the environment variable
REDFOX_API_KEY
Environment variable setup methods:
- macOS/Linux: In the terminal, run
export REDFOX_API_KEY=ak_xxxx, or append to~/.zshrc/~/.bashrcthensource - Windows: In PowerShell, run
[Environment]::SetEnvironmentVariable("REDFOX_API_KEY", "ak_xxxx", "User"), restart the terminal for it to take effect
Trigger Methods
Automatically activated when the user mentions any of the following keywords:
- "Bilibili search", "bilibili search", "search Bilibili videos", "search Bilibili"
- "Bilibili download", "download Bilibili videos", "Bilibili video download"
- "find materials on Bilibili", "Bilibili collection"
- Directly send a Bilibili video link and request a download
Common Commands Quick Reference
| Intent | Example Phrasing | Effect |
|---|---|---|
| Search videos | "Search Bilibili for down jacket review videos" | Prompts for credit consumption before searching; after confirmation, searches by keyword and automatically obtains download links |
| Sorted search | "Search Bilibili for phone reviews sorted by latest release" | Searches and sorts by the specified dimension, with an optional time range |
| Pagination | "Next page" | Gets the next page of search results (consumes one credit) |
| Direct download | "Download https://www.bilibili.com/video/BVxxx/」 | Directly obtains the download address via the link |
Usage Examples
Example 1: Search and browse
User: Search Bilibili for review videos about Huawei Mate 80, sorted by most likes AI: ⚠️ The skill includes a video download feature. Each video download consumes about 0.6 credits. A single query returns 10 items, consuming about 10×0.6 ≈ 6 credits. Execute? Reply "yes" to query the relevant data immediately User: Yes AI: Executes the search → automatically obtains download links → displays the complete table with download links
Example 2: Search with a specific sort
User: Search for Bilibili AI drawing tutorials, sort by latest published AI: ⚠️The skill includes a video download function... Execute? User: Yes AI: Execute search → automatically obtain download links → display a complete table containing download links
Example 3: Direct download
User: Download this video https://www.bilibili.com/video/BV1AmSSBMEqo/ AI: Directly parse the video, return the title, cover, and download link
Example 4: No search results
User: Search Bilibili xyzabc123456 AI: No search results yet. Please try changing the keyword or adjusting the filter conditions
Output format specification
Search results output
Search results are displayed in a Markdown table format, with a top information bar + data table:
Top query information bar:
- Keyword: "{keyword}"
- Total query results: {total} videos
- Sort method: default comprehensive sort
- Publish time: default last 7 days
- Current page: page {page}
- Prompt: "The detailed data is as follows:"
Data table:
| # | Video title | Uploader | Play count | Like count | Comment count | Favorite count | Publish time | Download link |
|---|---|---|---|---|---|---|---|---|
| 1 | Video title | Uploader name | 447.9w | 18.5w | 8301 | 32.7w | July 31 | Cover image / Video download |
- The video title is a clickable link that jumps to the Bilibili video detail page
- The uploader name is a clickable link that jumps to the Bilibili uploader's personal space
- Special characters in the video title and uploader fields must be replaced with empty strings
- If play count/like count/favorite count >= 10000, use
x.xwformat - The download link column contains the cover image link and the video download link, automatically obtained after the search is completed
- After displaying, proactively ask: "Reply "Next page" to view more videos. A query consumes about 6 credits. Please confirm whether you have enough credits."
⚠️ Credit confirmation before search: Before executing the search, you must first prompt the user: "⚠️The skill includes a video download function. Each video download consumes about 0.6 credits. A single query retrieves 10 items of data, consuming about 10×0.6 ≈ 6 credits. Execute? Reply "Yes" to query the relevant data immediately." Execute the search only after the user confirms. After the search is completed, automatically call the download interface to obtain the download links for all results.
Download results output
Download results are directly integrated into the "Download Link" column of the search data table, in the format:
[封面图]({cover_url}) / [视频下载]({download_url})
For the detailed execution process, output format template, and error handling, see Core workflow; for API fields and call details, see API interface guide
Use cases
Scenario 1: Rapid material collection
Requirement: Video creators need to quickly collect Bilibili video materials on a certain topic
How to use:
- Enter a topic keyword to search for related videos
- Sort by play count to find the most popular content
- Automatically obtain the download links and cover images for all videos
Expected benefits: Material collection time is shortened from hours to minutes, completing the entire process in one conversation
Scenario 2: Competitor content monitoring
Requirement: Brand operations need to continuously track competitors' content publishing on Bilibili
How to use:
- Regularly search for competitor brand keywords
- Sort by publish time to view the latest videos
- Download competitor marketing videos for analysis
Expected benefits: Stay informed of competitors' content strategies in a timely manner, providing reference for your own content planning
Scenario 3: Trending topic research
Requirement: Marketers want to understand the popularity and content direction of a certain topic on Bilibili
How to use:
- Search for industry trending keywords
- Sort by play count or like count
- Download top videos to study their content structure and expression style
Expected benefits: Quickly grasp the platform's content trends and provide data support for topic planning
Scenario 4: Video secondary creation
Requirement: Editors need to download Bilibili videos as material for secondary creation
How to use:
- Search for the target video
- Directly obtain the video download link and cover image
- Import into editing software for secondary creation
Expected benefits: Save the time of manual screen recording or using third-party tools, and directly obtain high-definition source files
FAQ
Installation related
Q1: What should I do if it prompts "REDFOX_API_KEY not found"?
A: Please refer to the authentication configuration instructions in the usage guide above to set the environment variable. If you don't know how to configure it, just tell the Agent and it will do it for you.
Q2: What dependencies need to be installed?
A: None. The script uses the Python standard library urllib, and can run directly in a Python 3.6+ environment.
Usage related
Q3: How many results can one search return?
A: Each search returns one page of results, with 10 per page by default and a maximum of 50. You can view more results by paging (each page consumes one credit).
Q4: What quality are the downloaded videos?
A: The system automatically parses the highest available quality of the video, depending on the highest resolution supported by the video itself.
Q5: How long are download links valid?
A: Download links are time-sensitive, so it is recommended to download as soon as possible after obtaining them. If a link expires, simply run the download again to get a new link.
Q6: Can multiple videos be downloaded at the same time?
A: After the search is completed, download links for all search results are automatically obtained, with no need for manual selection. Each search returns at most 10 results.
Q7: Which sorting methods and time filters are supported?
A: Three sorting methods are supported: comprehensive sorting (by play count), latest published, and most liked. The default is by play count in descending order. Time ranges: last 7 days (default), last 30 days, last 90 days, and unlimited.
Troubleshooting
Q8: Can't find the video you want?
A: Possible reasons: the keyword is too obscure; try changing to a more common keyword or adjusting the sorting method and retry.
Q9: What should I do if the download fails?
A: Possible reasons: the video link is incorrect; the video has been deleted or set to private; network fluctuations. Please check the link and retry.
Q10: Prompt says insufficient credits?
A: Each search and download consumes one credit. Please go to Red Fox Hub to check your credit balance or top up.
Project Architecture
Directory Structure
bilibili-search-download/
├── SKILL.md # 技能说明文档(本文件)
├── scripts/
│ ├── bilibili_search.py # 关键词搜索脚本
│ └── bilibili_download.py # 视频下载脚本
└── references/
├── api_guide.md # API 接口说明
└── core_workflow.md # 核心工作流(Agent执行参考)
Tech Stack
| Component | Technology |
|---|---|
| Runtime Environment | Python 3.6+ (zero dependencies) |
| Data Source | Red Fox Data Platform |
| Output Format | Markdown (in conversation) |
| Request Method | HTTP POST(JSON) |
Core Modules
| Module | Responsibility |
|---|---|
| Search Script | Receive keywords → call search service → output structured results |
| Download Script | Receive video link → call parsing service → return download address and resource list |
Get Help
- Red Fox Hub official website:https://redfox.hk?source=github
- Enterprise Services (full database):https://redfox.hk/dashboard/enterprise?source=github
- Skill implementation details: see Core Workflow and API Interface Guide