[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [Bilibili video search](https://spiral.ai/integrations/codex/bilibili-video-search)

# How to Use Bilibili video search in Codex

Returns keyword matches with video links, uploaders, publication dates and engagement counts. Use it to discover videos across Bilibili before checking individual records.

|  |  |
| --- | --- |
| Model | Bilibili video search |
| Available through | Alexandria |
| Category | Social Media |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Bilibili video search in Codex

- Use Bilibili video search to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from Bilibili video search and tell me what changed since last week.
- Check Bilibili video search and summarize what you find in three bullet points.
- Pull the newest data from Bilibili video search and give me the result as a table.
- Check Bilibili video search every morning and tell me only when something changed.

## How to set up Bilibili video search in Codex

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**

```bash
codex mcp add spiral --url https://api.spiral.ai/mcp
```

2. **Sign in**: Codex opens the browser: sign in to Spiral and click Authorize. No API key. `codex mcp list` then shows Spiral.

```bash
codex mcp login spiral
```

### Use the Spiral skill

1. **Send Codex this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Bilibili video search**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "bilibili-com/videos/search_videos",
    "input": {
      "keyword": "<keyword>"
    }
  }'
```

Then paste one of the prompts above: Codex finds Bilibili video search on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/codex

## Bilibili video search tools and prices

- [Bilibili · Search videos](https://spiral.ai/tools/alexandria/bilibili-com/videos/search_videos) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| page | 1 to 50 | 1 | 1-based page; the site serves at most 1000 hits in total. |
| tids | 1 to … | — | Restrict to a partition id (30 = VOCALOID·UTAU, 3 = music, 193 = MV). Omit for all. |
| order | totalrank, click, pubdate, dm, stow | totalrank | Sort: totalrank (relevance, default), click (plays), pubdate (newest), dm (danmaku), stow (favourites). |
| page_size | 1 to 50 | 20 | Hits per page, 1 to 50 (the site itself uses 42). |

## What can you do with Bilibili video search in Codex?

Build a research panel for Bilibili music releases or Chinese-language tutorials. Have the coding agent turn retrieved Bilibili results into searchable records and review screens in your project.

### Prepare a music release brief

Expand a song's search wording, identify the public artist account, inspect its profile and uploads, and find related videos. Verify the selected video records and summarize recurring questions in their comments.

### Check attribution in a music catalog

Try original-language song names, resolve creator accounts, and compare their profiles and upload archives with keyword matches. Verify a saved list of video IDs before assigning creator credit in a catalog.

### Curate a Chinese-language tutorial collection

Expand topic keywords, find public educational creators, and review their profiles and upload catalogs. Check selected videos for titles, duration and publication dates, then use viewer questions to identify prerequisites worth explaining.

### Compare product announcements with public reviews

Expand a product's Chinese search terms, identify business and public reviewer accounts, and inspect their profiles and uploads. Verify announcement and review videos, compare their engagement counts, and summarize questions appearing in the comments.

### Prepare an authorized translation review

Find a candidate video, check the public creator profile and video description for attribution, and obtain temporary playback URLs for a permitted language review.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Codex guides](https://spiral.ai/integrations/codex)

## Bilibili video search in other agents

- [Amp](https://spiral.ai/integrations/amp/bilibili-video-search)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/bilibili-video-search)
- [Claude](https://spiral.ai/integrations/claude-desktop/bilibili-video-search)
- [Claude Code](https://spiral.ai/integrations/claude-code/bilibili-video-search)
- [Cline](https://spiral.ai/integrations/cline/bilibili-video-search)
- [Cursor](https://spiral.ai/integrations/cursor/bilibili-video-search)
- [Devin](https://spiral.ai/integrations/devin/bilibili-video-search)
- [dots](https://spiral.ai/integrations/dots/bilibili-video-search)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/bilibili-video-search)
- [Gemini](https://spiral.ai/integrations/gemini/bilibili-video-search)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/bilibili-video-search)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/bilibili-video-search)
- [goose](https://spiral.ai/integrations/goose/bilibili-video-search)
- [Grok](https://spiral.ai/integrations/grok/bilibili-video-search)
- [Grok Build](https://spiral.ai/integrations/grok-build/bilibili-video-search)
- [Hermes](https://spiral.ai/integrations/hermes/bilibili-video-search)
- [Instinct](https://spiral.ai/integrations/instinct/bilibili-video-search)
- [Manus](https://spiral.ai/integrations/manus/bilibili-video-search)
- [Muse](https://spiral.ai/integrations/muse/bilibili-video-search)
- [Muse Code](https://spiral.ai/integrations/muse-code/bilibili-video-search)
- [n8n](https://spiral.ai/integrations/n8n/bilibili-video-search)
- [Notion](https://spiral.ai/integrations/notion/bilibili-video-search)
- [OpenClaw](https://spiral.ai/integrations/openclaw/bilibili-video-search)
- [opencode](https://spiral.ai/integrations/opencode/bilibili-video-search)
- [Perplexity](https://spiral.ai/integrations/perplexity/bilibili-video-search)
- [Raycast](https://spiral.ai/integrations/raycast/bilibili-video-search)
- [VS Code](https://spiral.ai/integrations/vscode/bilibili-video-search)
- [Windsurf](https://spiral.ai/integrations/windsurf/bilibili-video-search)
- [Zapier](https://spiral.ai/integrations/zapier/bilibili-video-search)

## More Codex guides

- [Bilibili video playback URLs](https://spiral.ai/integrations/codex/bilibili-video-playback-urls)
- [Blizzard forum categories](https://spiral.ai/integrations/codex/blizzard-forum-categories)
- [Bilibili video details](https://spiral.ai/integrations/codex/bilibili-video-details)
- [Blizzard forum discussion](https://spiral.ai/integrations/codex/blizzard-forum-discussion)
- [Bilibili video comments](https://spiral.ai/integrations/codex/bilibili-video-comments)
- [Blizzard forum latest posts](https://spiral.ai/integrations/codex/blizzard-forum-latest-posts)

## Questions about Bilibili video search in Codex

**Can Codex use Bilibili video search?**

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Bilibili video search like any built-in tool.

**How much does Bilibili video search cost in Codex?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.

**Do I need an Alexandria account to use Bilibili video search in Codex?**

No. Spiral runs Bilibili video search on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Bilibili video search in Codex?**

About two minutes: add the hosted server, then sign in.

**Does Codex wait while Bilibili video search runs?**

Bilibili video search runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.

**What Bilibili content does this data cover?**

The documented coverage is public bilibili.com video data: uploader profiles and archives, video metadata, comments and temporary DASH playback links.

**Can Bilibili search return every matching video?**

Bilibili serves at most 1,000 hits for a video query. A broad search cannot establish the full number of matching videos across the site.

**Which languages can Bilibili autocomplete help with?**

The web autocomplete documentation includes Chinese, English and Japanese, plus suggestions from full Chinese pinyin. It describes a maximum of 10 candidate keywords.

**Do video records distinguish publication time from retrieval time?**

The documented video detail response includes a publication timestamp and a separate observation timestamp. The publication date describes the upload, while the observation timestamp identifies when its data was observed.

