Web Search Skill
Enable your Moltbot agent to search the web for information.
Web Search
Give your AI agent the ability to search the web and retrieve current information.
What It Does
- Search the web using various search engines
- Retrieve current information beyond training data
- Find documentation, news, and answers
- Support for multiple search providers
Install / Enable
# .env
SKILL_WEB_SEARCH_ENABLED=true
# Choose your search provider
SEARCH_PROVIDER=google # or: bing, duckduckgo, serper
# Provider-specific keys
GOOGLE_SEARCH_API_KEY=your-api-key
GOOGLE_SEARCH_ENGINE_ID=your-engine-id
# Or for Serper (easier setup)
SERPER_API_KEY=your-serper-keyPermissions Required
| Permission | Description |
|---|---|
| Network | Access to search APIs |
| API Key | Required for most providers |
Example Commands
User: What's the latest version of Node.js?
Agent: [Searches web for "Node.js latest version 2024"]
Node.js 22 is the current version, with Node.js 20 being
the active LTS release...
User: Find documentation for React hooks
Agent: [Searches for "React hooks documentation"]
Here's a summary of React hooks from the official docs...
User: What happened in tech news today?
Agent: [Searches for "tech news today"]
Here are today's top tech headlines...Configuration
Provider Options
Google Custom Search (Most accurate)
SEARCH_PROVIDER=google
GOOGLE_SEARCH_API_KEY=AIza...
GOOGLE_SEARCH_ENGINE_ID=017...Serper (Easiest setup)
SEARCH_PROVIDER=serper
SERPER_API_KEY=your-keyDuckDuckGo (Free, no API key)
SEARCH_PROVIDER=duckduckgo
# No API key requiredBing
SEARCH_PROVIDER=bing
BING_SEARCH_API_KEY=your-keySearch Options
| Variable | Description | Default |
|---|---|---|
SEARCH_MAX_RESULTS | Results per search | 5 |
SEARCH_SAFE_MODE | Enable safe search | true |
SEARCH_REGION | Geographic region | us |
SEARCH_LANGUAGE | Result language | en |
Risks
API Costs: Each search costs API credits. Set usage limits.
Misinformation: Web results may be inaccurate. Don't use for critical decisions.
Privacy: Search queries are sent to third-party providers.
Troubleshooting
No results returned
- Check API key is valid
- Verify network connectivity
- Check provider's dashboard for quota/errors
Rate limited
- Reduce search frequency
- Upgrade API plan
- Use caching for repeated queries
Results not relevant
- Try different search provider
- Increase
SEARCH_MAX_RESULTS - Fine-tune prompts to generate better queries
Getting API Keys
Google Custom Search
- Go to Google Cloud Console
- Create a project
- Enable "Custom Search API"
- Create credentials (API key)
- Go to Programmable Search Engine
- Create a search engine, copy the ID
Serper
- Go to serper.dev
- Sign up for free account
- Copy API key from dashboard
Alternatives
- Web Browser - Full page browsing vs search
- RSS Reader - For news feeds