xai-searchSearch X/Twitter and the web in real-time using xAI's Grok API with agentic search tools.
Install via ClawdBot CLI:
clawdbot install aydencook03/xai-searchUse xAI's agentic search to query X/Twitter and the web in real-time. This leverages Grok's web_search and x_search tools.
Docs: https://docs.x.ai/docs/
XAI_API_KEY environment variablepip install xai-sdkcurl -s https://api.x.ai/v1/chat/completions \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3-fast",
"messages": [{"role": "user", "content": "YOUR QUERY HERE"}],
"tools": [{"type": "function", "function": {"name": "web_search"}}]
}' | jq -r '.choices[0].message.content'
curl -s https://api.x.ai/v1/chat/completions \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3-fast",
"messages": [{"role": "user", "content": "YOUR QUERY HERE"}],
"tools": [{"type": "function", "function": {"name": "x_search"}}]
}' | jq -r '.choices[0].message.content'
curl -s https://api.x.ai/v1/chat/completions \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-3-fast",
"messages": [{"role": "user", "content": "YOUR QUERY HERE"}],
"tools": [
{"type": "function", "function": {"name": "web_search"}},
{"type": "function", "function": {"name": "x_search"}}
]
}' | jq -r '.choices[0].message.content'
For convenience, use the xai-search.py script in the scripts/ folder:
# Web search (adjust path to your skill location)
python ~/.clawdbot/skills/xai-search/scripts/xai-search.py web "latest news about AI"
# X/Twitter search
python ~/.clawdbot/skills/xai-search/scripts/xai-search.py x "what are people saying about Clawdbot"
# Both
python ~/.clawdbot/skills/xai-search/scripts/xai-search.py both "current events today"
grok-3-fast — fast, good for quick searchesgrok-4-1-fast — reasoning model, better for complex queriesYou can filter X searches by:
allowed_x_handles / excluded_x_handles — limit to specific accountsfrom_date / to_date — date range (ISO8601 format)enable_image_understanding — analyze images in postsenable_video_understanding — analyze videos in postsallowed_domains / excluded_domains — limit to specific sitesenable_image_understanding — analyze images on pagesGenerated Mar 1, 2026
Financial analysts use X search to monitor breaking news and social sentiment on stocks, enabling rapid response to market-moving events. Combined web search provides background from financial sites for deeper analysis.
Marketing teams track brand mentions on X to gauge public opinion and identify PR crises early. Web search supplements with news coverage and reviews for a comprehensive view.
Researchers use web search to gather scholarly articles and data, while X search helps identify trending topics and expert discussions in real-time for literature reviews.
Journalists verify claims by cross-referencing X posts for eyewitness accounts and web sources for official statements, using date filters to ensure timeliness.
Business strategists analyze competitor activities by searching X for announcements and web for press releases, using domain filters to focus on key industry sites.
Offer a subscription-based API that integrates xAI search into third-party platforms like CRM or analytics tools, charging per query or monthly tiers. Revenue comes from enterprise clients needing real-time data feeds.
Develop a SaaS dashboard that visualizes search results from X and web, with sentiment analysis and trend reports. Monetize through monthly subscriptions for businesses in marketing or finance.
Provide a human-in-the-loop service where analysts use the skill to deliver curated reports on specific topics, targeting industries like legal or consulting. Revenue is project-based or retainer fees.
💬 Integration Tip
Set up the XAI_API_KEY environment variable securely and test with simple queries before scaling; use the helper script for quick prototyping.
Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).
AI-optimized web search via Tavily API. Returns concise, relevant results for AI agents.
This skill should be used when users need to search the web for information, find current content, look up news articles, search for images, or find videos. It uses DuckDuckGo's search API to return results in clean, formatted output (text, markdown, or JSON). Use for research, fact-checking, finding recent information, or gathering web resources.
Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content. Lightweight, no browser required.
Search indexed Discord community discussions via Answer Overflow. Find solutions to coding problems, library issues, and community Q&A that only exist in Discord conversations.
Multi search engine integration with 17 engines (8 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and WolframAlpha knowledge queries. No API keys required.