# Bilibili Search by Type API

> Returns categorized search results from Bilibili based on a target query string. Supports filtering by search type, adjusting sort order, and cursor-based pagination.

Source: https://www.sandbase.ai/apis/bilibili/app/search-by-type
API reference: https://www.sandbase.ai/apis/bilibili/app/search-by-type/docs

## Facts

- Provider: Bilibili
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/bilibili/app/search-by-type`
- Price: $0.0015 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, bilibili
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/bilibili/app/search-by-type` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `keyword` | string | yes |  |
| `cursor` | string | no |  |
| `order` | integer | no |  |
| `page_size` | integer | no |  |
| `search_type` | string | no |  |

## FAQ

### How do I use the Bilibili Search by Type API?

Send a POST request to https://api.sandbase.ai/v1/api/bilibili/app/search-by-type with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Bilibili Search by Type API cost?

$0.0015 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Bilibili Search by Type API accept?

Required: keyword (string). Optional: cursor (string), order (integer), page_size (integer) and search_type (string). The Parameters table and the Playground on this page list every field.

### What does the Bilibili Search by Type API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a Bilibili developer account or API key?

No. Bilibili Search by Type runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Bilibili API access separately.

## README

### Bilibili Search by Type API

Query Bilibili content categorized by type using the required `keyword` parameter. You can optionally filter by `search_type`, apply an `order` index, and paginate through results.

#### Use cases

- Search for specific video items matching a keyword on Bilibili.
- Filter platform search results by specified category types.
- Paginate through Bilibili catalog queries using cursor tokens.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/app/search-by-type" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "OpenAI"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `keyword` | string | Yes | Search keyword (required) |
| `order` | integer | No | Sort order |
| `cursor` | string | No | Pagination cursor. |
| `page_size` | integer | No | Results per page |
| `search_type` | string | No | Search type |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "data": {
    "items": [
      {
        "av": {
          "author": "红客官方账号",
          "duration": "9:29",
          "ptime": "1788174347",
          "title": "全球首例！700个AI失控组团攻击，全程无人参与，OpenAI都懵了",
          "view_content": "5.9万"
        }
      }
    ]
  }
}
```

#### Notes

- Leave `cursor` empty for the initial request, then pass the returned cursor string for subsequent pages.
- `keyword` is required for every search request.
- Use `search_type` to define the target category such as video.

#### Related APIs

- [Bilibili App Bangumi Tab](/model/bilibili/app/bangumi-tab): Returns Bilibili app bangumi tab data, providing curated anime recommendations, feed items, and category listings for mobile clients.
- [Bilibili App Cinema Tab](/model/bilibili/app/cinema-tab): Returns cinema tab content from the Bilibili app, featuring curated movies, TV shows, and entertainment recommendations without requiring additional query para…
- [Bilibili App Home Feed](/model/bilibili/app/home-feed): Returns recommended video items from the Bilibili app home feed.
