Bilibili API endpoint
Returns Bilibili search-box suggestions for the partial text in `q`, which is required (up to 100 characters). The response has the `query`, a `count` and deduplicated `suggestions` in Bilibili's order. A query with no matches returns an empty `suggestions` array; invalid input returns 400.
/bilibili/autocompleteq (required): Partial Bilibili search text, up to 100 characters.Returns deduplicated search-box query suggestions in Bilibili's current order. A valid query with no matches returns an empty suggestions array. Invalid input returns 400; an unavailable or changed upstream response returns 503.
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | Yes | Partial search text | 原神 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/bilibili/autocomplete?q=%E5%8E%9F%E7%A5%9E" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "原神",
"count": 3,
"suggestions": [
"原神女角色",
"原神联动",
"原神"
]
}
}Request schema
No body schema
Response schema
#/definitions/bilibili.autocompleteResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | bilibili.AutocompleteResponse | No | ||||
| data.count | integer | No | 10 | |||
| data.query | string | No | 原神 | |||
| data.suggestions | array | No | 原神女角色,原神联动 | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/bilibili/autocomplete?q=%E5%8E%9F%E7%A5%9E" \
-H "x-api-key: $CRAWLORA_API_KEY"