Prerequisites
Before starting, ensure you’ve completed the installation steps and have:- ✅ Node.js 18+ installed
- ✅ xAI API key configured
- ✅ Claude Desktop setup with Grok Search server
- ✅ Server health check passing
Your first search
Let’s start with a simple web search using basic mode.Understanding the response
A basic search returns structured JSON data:results
Array of search results with title, snippet, URL, and metadata
summary
AI-generated overview of the search findings
citations
Source URLs with validation and metadata
search_time
ISO8601 timestamp of when the search was performed
Common search patterns
Web search
Search general web content:News search
Search for recent news and current events:Twitter/X search
Search social media posts:Twitter handles should be provided without the @ symbol. Use
"elonmusk" not "@elonmusk".Comprehensive analysis mode
For detailed analysis with timelines, quotes, and multiple perspectives, use comprehensive mode:Comprehensive response structure
comprehensive_analysis
comprehensive_analysis
A detailed 500+ word analysis providing deep context, background, and implications with specific details, dates, and numbers.
key_findings
key_findings
Array of categorized findings (main_story, development, context, impact) with content, sources, and confidence levels.
timeline
timeline
Chronological events with dates, descriptions, sources, and significance explanations.
direct_quotes
direct_quotes
Exact quotes with speaker attribution, context, source URLs, and significance.
multiple_perspectives
multiple_perspectives
Different viewpoints (supporters, critics, experts) with content, sources, and reasoning.
implications
implications
Short-term and long-term consequences with affected stakeholders.
verification_status
verification_status
Confirmed facts, unconfirmed claims, and contradictory information tracking.
Date filtering
All search tools support date range filtering using ISO8601 format:Date format requirements
Format
YYYY-MM-DD (ISO8601)Example
2025-03-04 ✓Invalid
03/04/2025 ✗Rule
from_date ≤ to_dateHealth check
Monitor server status and performance:Best practices
Query optimization
Be specific
Use clear, specific queries rather than vague terms.✓ “SpaceX Starship launch March 2025”✗ “rocket news”
Choose the right search type
- web: General information, articles, guides
- news: Current events, breaking news
- twitter: Social media sentiment, influencer opinions
Use date filters wisely
For time-sensitive topics, use date ranges to narrow results to relevant time periods.
Performance optimization
Limit results
Use 5-10 results for most queries. More results = longer processing time.
Basic vs comprehensive
Basic mode: Fast, 2000 tokensComprehensive: Slow, 4000 tokens
Caching
Comprehensive analyses are cached for 30 minutes to reduce API usage.
Date ranges
Narrow date ranges return more focused, relevant results faster.
Example workflows
Research workflow
News monitoring workflow
Common issues and solutions
Empty or poor results
Empty or poor results
Try these solutions:
- Rephrase your query to be more specific
- Try a different search type (web vs news vs twitter)
- Expand your date range or remove date filters
- Check if the topic has sufficient online coverage
- Use basic mode if comprehensive mode returns limited results
Request timeout errors
Request timeout errors
Solutions:
- Reduce
max_resultsparameter - Use basic mode instead of comprehensive
- Increase
GROK_TIMEOUTin configuration - Check your internet connection
- Verify API service status with health_check
API key errors
API key errors
Verify:
- API key starts with
xai- - No extra spaces or quotes in configuration
- Key is active in xAI Developer Portal
- Environment variable name is exactly
XAI_API_KEY
Invalid date format errors
Invalid date format errors
Requirements:
- Format:
YYYY-MM-DDexactly - Valid dates only (no 2025-02-30)
from_datemust be ≤to_date
"2025-03-04"✗ "03/04/2025", "2025-3-4", "2025-02-30"Next steps
API reference
Explore detailed documentation for all tools and parameters
Analysis modes
Learn about basic and comprehensive analysis modes
Configuration
Learn about advanced configuration options
Error handling
Get help with common issues and error messages
For questions or issues, visit the GitHub repository to create an issue.