Reference · Tools
Grok Web Search
Search the web using xAI Grok models with live search capabilities.
Grok Web Search answers questions from the live internet rather than training data, returning a synthesized response and an array of citation objects you can check. Search mode and domain allow/deny filtering are configurable. Use it where freshness matters — monitoring what is being published about a competitor and posting a daily digest with sources.
- Node type
- Action
- Parameters
- 7
- Outputs
- Output, Error
- Credentials
- xAI
Grok Web Search
Search the web using xAI Grok models with live search capabilities.
Overview
Grok Web Search asks a Grok model a question and lets it search the web while answering. The search runs on xAI’s servers; Grok decides when to use it and comes back with a synthesized answer plus the sources it cited. Search can be left to the model’s judgement, attached to every request, or switched off so the node behaves like ordinary chat. Returns the response text, an array of sources, model name, token usage, and status.
Category: AI
Tool Name: grok_web_search
Version: 1
Appearance: Icon: brain | Color: #000000
Node Type
Action — processes input items and produces output
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires xAI credentials. See the Credentials Guide for setup instructions.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Model | options | No | Platform default | The Grok model to use for web search. |
| Options: the Grok chat models currently available — the dropdown tracks the model catalog, so it changes as xAI’s line-up changes. | ||||
| System Prompt | string | No | — | Optional system prompt to set the behavior and context for the model. Supports expressions like {{ $json.persona }}. |
| User Message | string | Yes | — | The search query or prompt to send to Grok. If empty, falls back to the input item’s “message” or “prompt” field. Supports expressions. |
| Search Mode | options | No | auto | Controls when the model performs a web search. |
Options: auto (model decides when to search the web based on the query), on (always perform a web search for every query), off (never search the web — behaves like regular chat) | ||||
| Options | collection | No | {} | Optional generation and output settings — add only the fields you want to override. |
| — Max Tokens | number | No | 4096 | Maximum number of tokens to generate in the response. |
| — Temperature | number | No | 1 | Controls randomness. Lower values make output more focused; higher values more creative. Range: 0-2. |
| — Return Citations | boolean | No | true | Whether to include source citations in the response. |
| — Allowed Domains | string | No | — | Restrict search to these domains. Comma-separated. Cannot be combined with Excluded Domains — if both are set, Allowed Domains wins. |
| — Excluded Domains | string | No | — | Exclude these domains from search. Comma-separated. Ignored when Allowed Domains is set. |
| — Response Field Name | string | No | response | The output field name where the AI response text will be stored. |
| Include Input | boolean | No | false | Whether to include the original input item fields in the output alongside the AI response. |
| Max Concurrency | number | No | 10 | Maximum number of items to process concurrently. |
Output Data
One output item per input item. The answer text is written to the field named by Response Field Name (response by default). The rest of the input JSON is carried over only when Include Input is on; binary data from the input item is forwarded.
response— the synthesized answer, under whatever name Response Field Name is set to.sources— an array of the pages the answer cited, each{ "url": "...", "title": "..." }.titleis an empty string when the source did not supply one. The array is always present, and is empty when the model answered without citing anything (including every run with Search Mode set tooff).model— the model that produced the answer.usage— the token counts reported by xAI for the request.finishReason— the status xAI reported for the request.
Reference the result downstream by expression, e.g. {{ $json.response }} or {{ $json.sources[0].url }}. To fan out one item per source, follow this node with a Split Out node on sources.
Usage Examples
- Search the web for current news using Grok
- Research a topic with live web search and citations
- Restrict a search to a trusted set of domains
- Get up-to-date answers from Grok with source citations
- Query the web using Grok with auto search mode
Example Configuration
Ask a question and let the model decide whether to search:
{
"type": "grok_web_search",
"parameters": {
"userMessage": "What are the latest breakthroughs in quantum computing?"
}
}
Force a search on every item and keep the answer short:
{
"type": "grok_web_search",
"parameters": {
"userMessage": "{{ $json.query }}",
"searchMode": "on",
"maxConcurrency": 5,
"options": {
"maxTokens": 512,
"temperature": 0.2,
"responseFieldName": "answer"
}
}
}
Use the node as plain chat, with search disabled:
{
"type": "grok_web_search",
"parameters": {
"systemPrompt": "You explain technical concepts simply.",
"userMessage": "Explain how transformer attention mechanisms work.",
"searchMode": "off",
"options": {
"maxTokens": 4096,
"responseFieldName": "explanation"
}
}
}
Confine the search to a trusted allow-list (comma-separated, and mutually exclusive with Excluded Domains):
{
"type": "grok_web_search",
"parameters": {
"userMessage": "Summarize major AI policy developments in the EU",
"searchMode": "on",
"options": {
"allowedDomains": "europa.eu, consilium.europa.eu",
"responseFieldName": "policyDigest"
}
}
}
Error Handling
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes failed items to Error output port |
Tips
Grok Web Search queries the live internet using xAI Grok models with configurable search modes and optional domain allow/deny filtering to retrieve real-time synthesized answers. There is no date-range parameter — express recency in the user message and check the returned source URLs. Use it when your workflow requires current facts, breaking news, or time-sensitive data that a static model cannot accurately provide. It outputs a synthesized response text and an array of citation objects on the main channel, or an error object on the error channel.
Frequently asked questions
How do I restrict results to a date range?
There is no date-range parameter. Express recency in the user message — asking for the last week, for instance — and verify using the source URLs that come back with the answer.
Can I limit which sites it searches?
Yes. Domain allow and deny filtering is configurable, so you can confine a search to trusted publications or exclude sites you do not want cited.
What comes back besides the answer?
An array of citation objects. Because the model synthesizes across sources, the citations are how you verify a claim rather than taking the summary on trust.
Why use this instead of a search API plus a separate LLM node?
It collapses two steps into one and the model does the retrieval and synthesis together. A separate search node gives you raw results and more control over what the model is allowed to see.
Build with the Grok Web Search node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need xAI credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.