Bilibili Video Search Scraper
Pricing
from $0.02 / 1,000 item extracteds
Bilibili Video Search Scraper
Export public Bilibili video search results and video metadata with authors, thumbnails, engagement counts, tags, and publish dates.
Pricing
from $0.02 / 1,000 item extracteds
Rating
0.0
(0)
Developer
Hanna Nosova
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
Export public Bilibili video search results and BVID metadata for research, marketing analysis, creator discovery, and video trend monitoring. The actor saves structured video records with titles, URLs, authors, publish dates, thumbnails, categories, tags, and engagement metrics such as views, danmaku, likes, favorites, coins, shares, and replies.
Bilibili is a major Chinese video platform with communities around animation, games, music, education, technology, and creator content. This scraper helps turn public Bilibili video search pages and known video IDs into clean datasets that can be filtered, joined, exported, and consumed by downstream workflows.
What it does
- Searches Bilibili videos by one or more keywords.
- Fetches direct video metadata from BVIDs or Bilibili video URLs.
- Optionally enriches results with detail and tag endpoints.
- Deduplicates videos across keywords/pages.
- Saves tabular video records to the default dataset.
- Writes a
RUN_SUMMARYkey-value record with saved item count and partial-failure details. - Stops safely near the configured run time limit.
Who is it for
This actor is useful for analysts, agencies, researchers, and data teams that need public Bilibili video metadata without manually copying search results. Typical users include:
- Social media analysts tracking creator or topic performance.
- Marketing teams researching Chinese video trends.
- Creator discovery teams building prospect lists.
- Academic researchers sampling public video metadata.
- SEO and content teams comparing titles, categories, tags, and engagement.
- Data engineers feeding Bilibili records into BI dashboards or enrichment pipelines.
Input options
You can scrape by keyword, by direct BVID/video URL, or by combining both modes in one run.
keywords- search terms to query on Bilibili video search.bvids- direct Bilibili BVIDs or video URLs.maxItems- maximum videos to save across all input modes.sort- Bilibili search ordering such as relevance, newest, views, danmaku, or favorites.maxPagesPerKeyword- maximum search result pages per keyword.includeDetails- fetch extra detail and tag metadata when available.requestDelayMillis- delay between requests to reduce rate limiting.maxRequestRetries- retries for transient Bilibili request failures.runTimeSecs- soft runtime deadline.proxyConfiguration- optional Apify Proxy settings.
Input recipes
These example inputs can be copied into the Apify Console, API client, or CLI. Start with a small maxItems value while you validate your keyword, then increase it for larger exports.
Examples
Search one keyword
{"keywords": ["anime music"],"maxItems": 10,"maxPagesPerKeyword": 1,"includeDetails": true}
Search multiple keywords
{"keywords": ["travel vlog", "game review", "study with me"],"maxItems": 50,"maxPagesPerKeyword": 2,"sort": "pubdate"}
Fetch direct video URLs or BVIDs
{"bvids": ["BV1xx411c7mD"],"maxItems": 5,"includeDetails": true}
Quick health-check run
{"bvids": ["BV1xx411c7mD"],"maxItems": 1,"includeDetails": false,"requestDelayMillis": 0,"runTimeSecs": 60}
API usage
You can run the actor through the Apify API by sending the same JSON input shown in the examples. After the run succeeds, download the default dataset as JSON, CSV, Excel, or through the dataset API.
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('fetch_cat/bilibili-video-search-scraper').call({keywords: ['anime music'],maxItems: 10,maxPagesPerKeyword: 1,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python
from apify_client import ApifyClientimport osclient = ApifyClient(os.environ['APIFY_TOKEN'])run = client.actor('fetch_cat/bilibili-video-search-scraper').call(run_input={'keywords': ['anime music'],'maxItems': 10,'maxPagesPerKeyword': 1,})items = client.dataset(run['defaultDatasetId']).list_items().itemsprint(items)
cURL
curl -X POST "https://api.apify.com/v2/acts/fetch_cat~bilibili-video-search-scraper/runs?token=$APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"keywords":["anime music"],"maxItems":10,"maxPagesPerKeyword":1}'
Output fields
Each dataset item represents one Bilibili video. Common fields include:
keyword- search keyword that found the result.rank- result rank within the keyword.page- search result page.sort- search sort used for the item.sourceType-searchordirect.title- video title.bvidandaid- Bilibili video identifiers.url- canonical video URL.author,mid, andauthorAvatarUrl- creator details.description- public video description when available.publishedAtandpublishTimestamp- publish date values.thumbnailUrl- cover image URL.categoryandparentCategory- Bilibili category labels.durationSecondsanddurationText- video duration.viewCount,danmakuCount,likeCount,coinCount,favoriteCount,shareCount, andreplyCount- engagement metrics.tags- video tags when detail enrichment is enabled.pages- multi-part video page data when available.scrapedAt- extraction timestamp.
Cost and limits
The actor uses pay-per-event pricing: a small start charge plus one item charge for each saved video. Use maxItems, maxPagesPerKeyword, and runTimeSecs to keep runs bounded.
For quick tests, set maxItems to 1-10 and keep maxPagesPerKeyword at 1. For larger exports, increase limits gradually and review the output quality before running broad keyword batches.
MCP
You can use this actor from MCP-compatible assistants through the Apify MCP server. After connecting the server, ask your assistant to run fetch_cat/bilibili-video-search-scraper with a JSON input and then inspect the default dataset.
Claude Desktop / Claude Code setup
$claude mcp add apify -- npx -y @apify/actors-mcp-server --actors fetch_cat/bilibili-video-search-scraper
If your MCP client uses JSON configuration, add an Apify server entry similar to this and provide your Apify token through the environment:
{"mcpServers": {"apify": {"command": "npx","args": ["-y","@apify/actors-mcp-server","--actors","fetch_cat/bilibili-video-search-scraper"],"env": {"APIFY_TOKEN": "YOUR_APIFY_TOKEN"}}}}
Example prompts showing MCP usage
Prompt: "Run the Bilibili Video Search Scraper for anime music, save 10 videos, and summarize the top authors."
Prompt: "Fetch metadata for BVID BV1xx411c7mD and return the title, author, URL, views, and publish date."
Prompt: "Compare Bilibili search results for travel vlog and study with me using maxItems 20."
The dataset is the main output for automation workflows, while RUN_SUMMARY is useful for checking whether a run completed fully or partially.
Tips for reliable runs
- Use specific keywords for better Bilibili search relevance.
- Keep
includeDetailsenabled when you need tags and full engagement statistics. - Disable
includeDetailsfor faster broad search sampling. - Lower
maxPagesPerKeywordfor quick checks and raise it only after the query works. - Use direct BVID input when you already know the videos to inspect.
- Add a request delay if Bilibili starts rate-limiting requests.
- Consider Apify Proxy configuration if direct requests are unreliable from your location.
Legality and responsible use
This actor is designed for public Bilibili video metadata. It does not log into Bilibili, bypass access controls, or collect private account data. You are responsible for using the output in a lawful way, respecting Bilibili's terms, applicable privacy rules, and any restrictions that apply to your use case.
Do not use scraped data for spam, harassment, credential collection, or any activity that violates platform rules or applicable law. If you are unsure whether your use case is allowed, consult your legal or compliance team before running large exports.
FAQ
Why did my run save no items?
The keyword may have no public video results, the BVID may be unavailable, or Bilibili may be temporarily rate-limiting requests. Try a known BVID, lower request volume, or retry later.
Can I scrape comments?
This actor focuses on video search results and video metadata. Comment extraction is not included in this actor.
Can I search by creator?
Use Bilibili keywords that include the creator name or provide known BVIDs. Dedicated creator-profile crawling is outside this actor's current scope.
Why are some fields null?
Bilibili does not return every field for every video or endpoint. Search results may include less detail than direct video metadata, and private/deleted/restricted videos may not expose full details.
Related actors
Use this actor alongside other video, social media, and creator-discovery scrapers when building cross-platform trend reports. Related workflows often combine Bilibili data with YouTube, TikTok, Instagram, Google Trends, or general web search exports.
Support
If you need a missing field or a run does not match the documented behavior, open an issue from the actor page and include the run ID and input. Include whether the problem happened with keyword search, direct BVID mode, or detail enrichment so it can be reproduced quickly.