Grok search
기준일: 2026-07-26
난이도: 중급
공식 기준: Grok search
개요
이 페이지는 OpenClaw Grok search 도구(파라미터, 권한, 설정, CLI)를 공식 문서 기준으로 정리합니다.
공식 요약: Grok web search via xAI web-grounded responses
도구 가시성은 profile / allow·deny policy / sandbox / channel 권한에 따라 달라집니다. 최신 스키마는 항상 공식 문서를 우선합니다.
공식 문서 기반 상세
아래는 공식 tools/grok-search 문서를 정리한 내용입니다. 코드 블록, 파라미터 이름, 기본값은 원문 그대로입니다.
OpenClaw supports Grok as a web_search provider, using xAI web-grounded
responses to produce AI-synthesized answers backed by live search results
with citations.
Grok web search prefers an existing xAI OAuth sign-in when one is available.
If no OAuth profile exists, the same xAI API key also powers the built-in
x_search tool for X (formerly Twitter) post search and the code_execution
tool. Storing the key at plugins.entries.xai.config.webSearch.apiKey also
lets OpenClaw reuse it as a fallback for the bundled xAI model provider.
For post-level X metrics (reposts, replies, bookmarks, views), use
x_search with the exact post URL or status ID
instead of a broad search query.
Onboarding and configure
Choosing Grok during openclaw onboard or openclaw configure --section web lets OpenClaw reuse an existing xAI OAuth profile without prompting for
a separate web-search key. Without OAuth, it falls back to xAI API-key setup.
OpenClaw then offers a follow-up step to enable x_search with the same xAI
credential. That follow-up:
- only appears after you choose Grok for
web_search - is not a separate top-level web-search provider choice
- can optionally set the
x_searchmodel in the same flow
Skip it to enable or change x_search later in config.
Sign in or get an API key
Use xAI OAuth
If you already signed in with xAI during onboarding or model auth, choose
Grok as the `web_search` provider. No separate API key is required:
```bash
openclaw onboard --auth-choice xai-oauth
openclaw config set tools.web.search.provider grok
```
Use an API key fallback
Get an API key from [xAI](https://console.x.ai/) when OAuth is unavailable
or you intentionally want key-backed web-search config.
Store the key
Set `XAI_API_KEY` in the Gateway environment, or configure via:
```bash
openclaw configure --section web
```
Config
{
plugins: {
entries: {
xai: {
config: {
webSearch: {
apiKey: "xai-...", // optional if xAI OAuth or XAI_API_KEY is available
baseUrl: "https://api.x.ai/v1", // optional Responses API proxy/base URL override
},
},
},
},
},
tools: {
web: {
search: {
provider: "grok",
},
},
},
}
Credential alternatives: openclaw models auth login --provider xai --method oauth, XAI_API_KEY in the Gateway environment, or
plugins.entries.xai.config.webSearch.apiKey. For a gateway install, put env
vars in ~/.openclaw/.env.
동작 방식
Grok uses xAI web-grounded responses to synthesize answers with inline citations, similar to Gemini's Google Search grounding approach.
Supported parameters
Grok search supports query. count is accepted for shared web_search
compatibility, but Grok always returns one synthesized answer with citations
rather than an N-result list. Provider-specific filters are not supported.
Grok defaults to a 60 second timeout because xAI Responses web-grounded
searches can run longer than the shared web_search default. Override it
with tools.web.search.timeoutSeconds.
Base URL overrides
Set plugins.entries.xai.config.webSearch.baseUrl to route Grok web search
through an operator proxy or xAI-compatible Responses endpoint. OpenClaw
posts to <baseUrl>/responses after trimming trailing slashes. x_search
falls back to the same webSearch.baseUrl unless
plugins.entries.xai.config.xSearch.baseUrl is set.
관련 문서
- Web Search overview -- all providers and auto-detection
- x_search in Web Search -- first-class X search via xAI
- Gemini Search -- AI-synthesized answers via Google grounding
검증 체크리스트
- 해당 tool이 활성 profile/policy에서 허용되는지 확인
- sandbox / elevated / host 실행 경로 정책을 이해했는지 확인
- 채널·에이전트 권한과 충돌하지 않는지 확인
- 공식 CLI/
--help와 문서 옵션이 버전과 맞는지 확인