Reference · Tools

Grok X Search

Search X/Twitter posts using xAI Grok with live data access.

Action AI v1

Grok X Search reads live X/Twitter posts and answers questions about them, restricting results to X content and returning a synthesized response with post citations. Use it for social listening inside a workflow — tracking mentions of a product each morning and summarising the sentiment with links to the actual posts.

Node type
Action
Parameters
6
Outputs
Output, Error
Credentials
xAI

Grok X Search

Search X/Twitter posts using xAI Grok with live data access.

Overview

Grok X Search asks a Grok model a question and lets it search live X/Twitter posts while answering. The search runs on xAI’s servers; Grok decides when to use it and comes back with a synthesized response plus the X posts it cited, along with the model name, token usage, and status.

Category: AI
Tool Name: grok_x_search
Version: 1

Appearance: Icon: brain | Color: #000000

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires xAI credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
ModeloptionsNoPlatform defaultThe Grok model to use for X search.
Options: the Grok chat models currently available — the dropdown tracks the model catalog, so it changes as xAI’s line-up changes.
System PromptstringNoOptional system prompt to guide how the model synthesizes X search results. Supports expressions like {{ $json.persona }}.
Search QuerystringYesThe search query to find relevant X/Twitter posts. If empty, falls back to the input item’s “message” or “query” field. Supports expressions.
OptionscollectionNo{}Optional search and output settings — add only the fields you want to override.
— Max TokensnumberNo4096Maximum number of tokens to generate in the response.
— TemperaturenumberNo0.7Controls randomness. Lower values produce more factual results; higher values more creative. Range: 0-2.
— Response Field NamestringNoresponseThe output field name where the search response text will be stored.
Include InputbooleanNofalseWhether to include the original input item fields in the output alongside the search results.
Max ConcurrencynumberNo10Maximum 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 drawn from X posts, under whatever name Response Field Name is set to.
  • citations — an array of the X posts the answer cited, each { "url": "...", "title": "..." }. title is an empty string when the post did not supply one. This field is only present when at least one post was cited — test for it before reading it downstream.
  • 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.citations[0].url }}. To fan out one item per cited post, follow this node with a Split Out node on citations.

Usage Examples

  • Search X posts about a trending topic using Grok
  • Monitor X/Twitter mentions of a brand
  • Find recent X posts about a specific event
  • Analyze sentiment from X posts about a product launch
  • Get summarized X post results with source citations

Example Configuration

Search X for a topic with the defaults:

{
  "type": "grok_x_search",
  "parameters": {
    "userMessage": "What are people saying about the new product launch?"
  }
}

Monitor brand mentions and keep the source item alongside — say the time window you want in the query itself, since the node has no date parameter:

{
  "type": "grok_x_search",
  "parameters": {
    "systemPrompt": "You are a social listening analyst. Summarise the overall sentiment in three sentences.",
    "userMessage": "Posts from the last 7 days mentioning {{ $json.brand }}",
    "includeInput": true,
    "maxConcurrency": 3,
    "options": {
      "maxTokens": 1024,
      "temperature": 0.2,
      "responseFieldName": "sentimentSummary"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Grok X Search queries live X/Twitter posts using the xAI Grok API with search parameters set to restrict results exclusively to X content. Use it when workflows need real-time social media data from X, such as tracking trending topics, monitoring brand mentions, or analyzing public sentiment. There is no date-range parameter — express recency in the query text. It returns a synthesized response text, X post citations, model name, token usage, and finish reason.

Frequently asked questions

How do I search only recent posts?

There is no date-range parameter, so express recency in the query text itself — asking about the last 24 hours, for example. The returned citations let you confirm how recent the posts actually are.

How is this different from Grok Web Search?

The search parameters restrict results exclusively to X content. Use Web Search for the open internet and this when you specifically want what people are posting on X.

What does the output include?

A synthesized response text, X post citations, the model name, token usage and the finish reason — the citations being what makes the summary auditable.

Can I use it for brand monitoring?

Yes, that is a natural fit: query for mentions on a schedule, then route the synthesized summary and its citations to Slack or a report.

Build with the Grok X 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 BusyBot

Last updated . Spotted something wrong? Tell us.