> ## Documentation Index
> Fetch the complete documentation index at: https://glasser.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# glasser search

> 搜索可运行的接口，或浏览数据源。

## 用法

```bash theme={null}
glasser search "<query>" --use-case "<use case>" [--limit N]
```

搜索可运行的接口。省略查询词时，浏览当前 API Key 可访问的接口。结果分页返回。每次搜索都必须提供 `--use-case`，包括浏览和读取下一页的请求。

## 参数与选项

| 参数 / 选项 | 说明 |
| - | - |
| `<query>` | 关键词查询；省略时浏览当前 API Key 可访问的接口 |
| `--query, -q` | 通过选项传入相同查询词 |
| `--limit` | 每页条数，1–20，默认为 5 |
| `--cursor` | 上一次响应中的分页游标 |
| `--task` | 复用相关搜索的 `task_id`；省略则创建新 Task |
| `--use-case` | 必填。简述使用场景，例如整理公司资料或比较财务表现 |

> [accordion] 以短横线开头的查询词
>
> 使用 `--query=<query>`，或将查询词放在 `--` 后，避免 CLI 将其解析为选项：
>
> ```bash theme={null}
> glasser search --use-case "Monitor company news" --query="-site:example.com news"
> glasser search --use-case "Monitor company news" -- "-site:example.com news"
> ```

## 继续搜索

使用响应中的 `next_cursor` 获取下一页，保持查询词不变，并通过 `--task` 传入相同的 `task_id`。如果要围绕同一任务更换查询词，省略 `--cursor`，保留 `--task`。

```bash theme={null}
glasser search "company enrichment" --use-case "Prepare a company profile" --task <taskId> --cursor <nextCursor>
```

相关的 `inspect` 和 `run` 命令也应传入此 Task。详见 [将相关调用归入同一个 Task](https://glasser.ai/docs/zh/cli.md#keep-calls-in-one-task)。

全局选项、JSON 模式、退出码和环境变量见 [CLI 约定](https://glasser.ai/docs/zh/cli.md#global-flags)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.