Overview
Thegrok_web_search tool provides focused web content search capabilities, specifically optimized for articles, blogs, and informational pages. It supports both basic results and comprehensive analysis with detailed insights.
Parameters
The web search query. Must be a non-empty string with a maximum length of 1000 characters.
Analysis depth and format. Must be one of:
basic- Returns simple search results with titles, snippets, and URLscomprehensive- Provides detailed analysis with timelines, quotes, multiple perspectives, and context (500+ word analysis)
basicNote: Comprehensive analyses are cached for 30 minutes.Maximum number of results to return.Constraints:
- Minimum: 1
- Maximum: 20
- Default: 10
Optional start date for search in ISO8601 format (YYYY-MM-DD). Limits search to content from this date onwards.Validation:
- Must match pattern:
^\d{4}-\d{2}-\d{2}$ - Must be a valid calendar date
- Must be before or equal to
to_dateif both are provided
2025-01-01Optional end date for search in ISO8601 format (YYYY-MM-DD). Limits search to content up to this date.Validation:
- Must match pattern:
^\d{4}-\d{2}-\d{2}$ - Must be a valid calendar date
- Must be after or equal to
from_dateif both are provided
2025-12-31Request Examples
Response Format
Basic Mode Response
Comprehensive Mode Response
See grok_search comprehensive response for the full comprehensive analysis structure. Thegrok_web_search tool returns the same comprehensive format with web-focused content.
Error Response
Common Error Messages
Search query must be a non-empty string- Query parameter is missing or emptySearch query too long (max 1000 characters)- Query exceeds maximum lengthfrom_date must be in ISO8601 format (YYYY-MM-DD)- Invalid date formatfrom_date must be before or equal to to_date- Invalid date rangeAPI service is not healthy - missing XAI_API_KEY- API key not configured
Usage Notes
- Content Focus: Optimized for articles, blogs, documentation, and general web pages
- Search Sources: Uses web content sources exclusively (no news or social media)
- Performance: Basic mode provides faster responses than comprehensive mode
- Caching: Comprehensive analyses are cached for 30 minutes to improve performance
- Token Usage: Basic mode uses ~2000 tokens, comprehensive mode uses ~4000 tokens
- Best For: Technical documentation, tutorials, blog posts, and general information queries
Comparison with grok_search
Whilegrok_search supports multiple search types (web, news, general), grok_web_search is specifically optimized for web content:
- grok_web_search: Fixed to web content sources only
- grok_search: Configurable search type (web, news, general, twitter)
grok_web_search when you specifically want web content without news or social media results.