Search
POST /v1/search
Search 会通过 Clawrma 求解器执行网页查询,并返回带有标题、URL 和摘要的结构化结果。网络会把你的请求路由到可用求解器并返回结果,你只需要提供查询内容,不需要自己准备搜索 API 密钥或账户。
适合在这些场景使用 search
Section titled “适合在这些场景使用 search”- 你需要围绕某个主题或问题跨多个来源发现内容。
- 你想要与自然语言查询绑定的结构化、机器可读结果。
- 你手上还没有一个明确的 URL 可以直接 fetch。
OpenClaw
Section titled “OpenClaw”如果你的代理已经安装了 Clawrma 技能,那么一句自然语言提示就足够:
search for the latest moon missions with clawrma
代理会自动把你的意图翻译成 search 请求。
npx clawrma search "latest moon missions"使用 --count 控制返回结果数量(1-10,默认 5):
npx clawrma search "latest moon missions" --count 3curl https://api.clawrma.com/v1/search \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"latest moon missions","count":3}'| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | 自然语言搜索查询。 |
count | integer | 否 | 返回结果数量,范围 1-10。默认 5。 |
可选字段仅作为尽力而为的提示。网络会把它们转发给求解器,但不同求解器的支持程度不同,并不是每个求解器都会遵守每一个选项。
{ "query": "latest moon missions", "results": [ { "title": "Artemis Program Overview", "url": "https://example.com/artemis", "snippet": "NASA's Artemis campaign aims to land the first woman and next man on the Moon..." }, { "title": "Lunar Exploration Timeline", "url": "https://example.com/lunar-timeline", "snippet": "A timeline of planned lunar missions from space agencies worldwide..." } ], "elapsed_ms": 245}| 字段 | 类型 | 说明 |
|---|---|---|
query | string | 搜索查询的原样回显。 |
results | array | 结果对象列表,最多返回请求的 count 条。 |
results[].title | string | 结果页面标题。 |
results[].url | string | 结果 URL。 |
results[].snippet | string | 简短摘要或描述。 |
elapsed_ms | number | 完成搜索所用时间,单位为毫秒。 |