Grok Search for Openclaw

Perform high-speed web and X (Twitter) searches with structured JSON output and verified citations using the xAI Grok API.

notabhay
v0.2.1
Jan 27, 2026
7
6.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install grok-search

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install grok-search using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Grok Search?

The Grok Search skill enables AI agents to interface directly with the xAI Responses API, bridging the gap between static LLM knowledge and real-time information. By utilizing specialized server-side tools like web_search and x_search, this skill offers a robust alternative to traditional search engines, specifically optimized for the Openclaw Skills ecosystem. It provides deep integration with the X social graph, allowing agents to pull tweets, threads, and user data in a structured format suitable for automated processing.

Beyond simple search, it supports multimodal chat interactions and model management, ensuring developers have full control over the xAI inference lifecycle. Whether you are building research agents or monitoring social trends, this skill provides the necessary plumbing for high-fidelity data retrieval using current models like grok-4-1-fast.

Grok Search Use Cases

  • Monitoring real-time discussions and trending topics on X/Twitter.
  • Conducting deep-web research with structured citations for LLM grounding.
  • Automating social media sentiment analysis by fetching specific handle activities.
  • Building multimodal agents that can process both text and images via Grok vision models.
  • Verifying facts using the xAI server-side search tools as an alternative to Brave or Google.

How Grok Search Works

  1. The user or agent triggers a search command through the provided Node.js scripts included in this Openclaw Skills package.
  2. The skill authenticates with the xAI API using the configured XAI_API_KEY found in environment variables or configuration files.
  3. A request is sent to the Responses API specifying either a web or X-specific search tool based on the user flags.
  4. The skill processes the raw API payload, merging and validating citations from response annotations to ensure accuracy.
  5. It outputs a clean, agent-friendly JSON object containing snippets, URLs, and metadata for the LLM to consume.

Grok Search Setup

To use this skill within the Openclaw Skills collection, ensure you have Node.js installed and an active xAI API key.

Set your environment variable:

export XAI_API_KEY='your_api_key_here'

Run a search query:

node {baseDir}/scripts/grok_search.mjs "current tech trends" --web

List available xAI models:

node {baseDir}/scripts/models.mjs

Grok Search Data Schema & Taxonomy

The skill generates structured JSON output designed for seamless ingestion by LLMs. Below is the primary schema for search results:

Field Type Description
query string The original search terms provided.
mode string Indicates either web or x search mode.
results array A list of result objects containing title, url, and snippet.
citations array Verified source URLs extracted from API annotations.

For X-specific searches, results additionally include author and posted_at fields to provide social context.

Grok Search Advanced Features

  • Server-side filtering for X searches including date ranges, specific handle inclusion, and bot exclusion.
  • Multimodal support for image-based chat prompts using Grok vision capabilities.
  • Debugging modes like --raw to inspect the underlying Responses API payload on stderr.
  • Citation validation that cross-references model output with API metadata for high reliability in Openclaw Skills workflows.
  • Flexible output formatting including links-only or text-only modes to reduce token overhead.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*