# Search personal vocabulary

Search the current user's personal vocabulary book by phrase, meaning, usage, or learning state. Results are compact and paginated. This is the personal vocabulary module's only catalog-search interface.

- Capability ID: `vocabulary.personal.search`
- Operation: `ielts_vocabulary_personal_search`
- Category: 词汇
- Endpoint: `POST /api/v1/agent/capabilities/ielts_vocabulary_personal_search`
- Authentication: Bearer Token（通过 /api/v1/agent-bindings 绑定账号）
- Required scopes: vocabulary:read
- Side effect: read
- Human documentation: https://ieltsbuddy.igopx.cn/developers/api/ielts_vocabulary_personal_search

## Request parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | number | 否 | limit |
| `learningState` | string | 否 | learningState |
| `offset` | number | 否 | offset |
| `query` | string | 否 | Search phrase, meaning, or usage. |

## Request example

```bash
curl -X POST \
  'https://work.ieltsbuddy.igopx.cn/api/v1/agent/capabilities/ielts_vocabulary_personal_search' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer $IELTS_BUDDY_TOKEN' \
  --data '{"limit":20,"learningState":"","offset":0,"query":""}'
```

## Request schema

```json
{
  "type": "object",
  "properties": {
    "limit": {
      "default": 20,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "learningState": {
      "default": "",
      "type": "string",
      "enum": [
        "",
        "new",
        "learning",
        "review",
        "relearning",
        "mastered"
      ]
    },
    "offset": {
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "query": {
      "default": "",
      "description": "Search phrase, meaning, or usage.",
      "type": "string"
    }
  },
  "required": [
    "limit",
    "learningState",
    "offset",
    "query"
  ],
  "additionalProperties": false
}
```

## Response envelope

```json
{
  "code": 0,
  "data": {},
  "message": "ok"
}
```

## Errors

| HTTP | Code | Meaning |
| --- | --- | --- |
| 400 | `40001` | 请求参数不符合接口契约 |
| 401 | `40101` | 缺少或使用了无效的访问令牌 |
| 403 | `40301` | 访问令牌不包含接口所需权限 |
| 404 | `40401` | 接口或目标资源不存在 |
