Tutorial

OpenClaw Web Search Skill: Complete Setup and Usage Guide

Learn how to set up and use the OpenClaw Web Search skill with Google Custom Search API for real-time internet access and research.

By OpenClaw Team ¡
Web Search skill illustration with search lens, document layers, and insight highlights.

The Web Search skill is the most-installed OpenClaw extension with 2,100 GitHub stars because it addresses the biggest limitation of AI models: knowledge cutoff. Without this skill, OpenClaw can only answer questions based on what it learned during training. With Web Search enabled, OpenClaw gains real-time internet access to verify facts, research current events, and pull the latest information from across the web.

This guide covers everything from Google Custom Search API setup through advanced usage patterns and cost optimization.

What the Web Search Skill Does

Web Search transforms OpenClaw from a static knowledge base into a live research assistant. It performs web searches via Google Custom Search API, extracts relevant content from result pages, summarizes findings, and returns concise answers with source citations.

The skill automatically determines when a web search is needed based on query patterns. Questions like “What’s the latest…” or “Current price of…” trigger automatic searches. You can also explicitly request searches with commands like “Search for [query]” or “Summarize this article: [URL]”.

Key capabilities:

  • Real-time web searches with configurable result limits
  • Article summarization from any URL
  • Fact verification with source citation
  • Multi-source synthesis for research questions
  • Domain filtering and language preferences

Prerequisites

Before installing Web Search, ensure you have:

  • OpenClaw 2026.1.0 or later installed and running
  • A Google Cloud account (free tier available)
  • Basic command line knowledge
  • Access to your OpenClaw configuration directory

Verify OpenClaw is running:

openclaw status

# Expected output:
# OpenClaw v2.x.x
# Status: running
# Channels: [your connected channels]

Step-by-Step Installation

Step 1: Create Google Custom Search API Key

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Navigate to “APIs & Services” > “Library”
  4. Search for “Custom Search API” and enable it
  5. Go to “Credentials” and click “Create Credentials” > “API Key”
  6. Copy the API key (starts with AIza...)
  7. (Recommended) Restrict the API key to Custom Search API only for security

Step 2: Set Up Custom Search Engine (CSE)

  1. Visit Programmable Search Engine
  2. Click “Add” to create a new search engine
  3. For “Sites to search”, enter www.google.com (searches the entire web)
  4. Name your search engine (e.g., “OpenClaw Web Search”)
  5. Click “Create”
  6. On the overview page, click “Customize” then “Search engine ID”
  7. Copy the Search Engine ID (CX ID, looks like a1b2c3d4e5...)

Step 3: Configure OpenClaw

Install and configure the skill:

# Enable the skill
openclaw config set skills.web-search true

# Set your Google API key
openclaw config set google.apiKey $GOOGLE_API_KEY

# Set your Custom Search Engine ID
openclaw config set google.cx $GOOGLE_CX

For permanent configuration, add to ~/.openclaw/config.yaml:

skills:
  web-search:
    provider: google
    api_key: ${GOOGLE_API_KEY}
    cx: ${GOOGLE_CX}
    max_results: 5

Step 4: Test the Skill

Verify the installation:

# In your OpenClaw chat interface:
"Search for the latest Python release"

# Expected: OpenClaw returns Python 3.13 (or current version) with source links

If you get an error, check:

  • API key is valid and Custom Search API is enabled
  • CX ID is correct
  • OpenClaw has internet connectivity
  • API quota has not been exceeded (see Cost and Quotas section)

Configuration Deep Dive

The Web Search skill supports extensive configuration:

skills:
  web-search:
    # Provider (currently only google supported)
    provider: google

    # API credentials
    api_key: ${GOOGLE_API_KEY}
    cx: ${GOOGLE_CX}

    # Result settings
    max_results: 5  # Number of search results to fetch (1-10)

    # Filtering
    language: en  # Language code (en, es, fr, de, etc.)
    safe_search: moderate  # off, moderate, or strict
    date_restrict: ""  # e.g., "d7" for last week, "m1" for last month

    # Domain restrictions (optional)
    site_search: ""  # Limit to specific domain
    site_search_filter: "i"  # "i" to include, "e" to exclude

    # Performance
    cache_ttl: 3600  # Cache results for 1 hour (in seconds)
    timeout: 10000  # Request timeout in milliseconds

Usage Examples

Basic Search Queries

"What's the latest Node.js release?"
→ OpenClaw searches, finds Node.js 22.0.0, returns version with release notes link

"Search for the top React frameworks in 2026"
→ Returns list of frameworks with brief descriptions and links

"What's the weather in Tokyo right now?"
→ Fetches current weather data from weather services

Article Summarization

"Summarize this article: https://example.com/long-post"
→ OpenClaw fetches the page, extracts main content, returns 3-5 sentence summary

"Give me the key points from this blog post: [URL]"
→ Returns bulleted list of main points with context

Research Workflows

"Compare React vs Vue in 2026"
→ Searches for recent comparisons, synthesizes findings, cites sources

"What are the security implications of using localStorage for JWT tokens?"
→ Searches security best practices, returns summary with expert source citations

"Find the official documentation for the Stripe API"
→ Returns direct link to Stripe API docs with relevant section highlights

Domain-Specific Searches

Configure domain restrictions for specialized searches:

skills:
  web-search:
    # Only search within specific domains
    site_search: "github.com OR stackoverflow.com"
    site_search_filter: "i"

Then:

"Search for solutions to CORS errors in Express"
→ Only returns results from GitHub and Stack Overflow

Advanced Features

Custom Search Refinements

Refine searches using Google Custom Search operators:

"Search for 'react hooks' site:react.dev"
→ Searches only within react.dev

"Search for filetype:pdf machine learning papers"
→ Returns only PDF documents

"Search for 'openai gpt' -chatgpt"
→ Excludes results containing "chatgpt"

Language Preferences

Search in specific languages:

skills:
  web-search:
    language: es  # Spanish

Or specify per-query:

"Search in Spanish: mejores frameworks javascript"

Caching Strategies

Reduce API costs with smart caching:

skills:
  web-search:
    cache_ttl: 86400  # Cache for 24 hours

Cached results are served instantly for repeated queries. Clear cache when you need fresh data:

openclaw cache clear web-search

Troubleshooting

API Quota Exceeded

Error: “Quota exceeded for quota metric ‘Queries’ and limit ‘Queries per day’”

Solution:

  • Free tier allows 100 queries/day
  • Upgrade to paid tier ($5 per 1000 queries)
  • Implement caching to reduce duplicate queries
  • Use max_results: 3 instead of 5 to reduce quota usage

Invalid API Key Errors

Error: “API key not valid. Please pass a valid API key.”

Solution:

  • Verify API key in Google Cloud Console
  • Check Custom Search API is enabled
  • Ensure no extra spaces in config file
  • Regenerate API key if compromised

Empty Results

Error: “No results found” for common queries

Solution:

  • Verify CX ID is correct
  • Check “Search the entire web” is enabled in Programmable Search settings
  • Try a different query to rule out search term issues
  • Check safe_search settings are not too restrictive

Rate Limiting

Error: “Rate limit exceeded”

Solution:

  • Implement exponential backoff
  • Reduce concurrent searches
  • Add timeout and retry_limit to config
  • Consider caching more aggressively

Cost and Quotas

Google Custom Search Engine pricing:

TierQueries per DayCost
Free100$0
Paid100-10,000$5 per 1,000 queries
High Volume10,000+Contact sales

Cost optimization tips:

  1. Enable caching — Set cache_ttl: 86400 to cache results for 24 hours
  2. Reduce max_results — Use max_results: 3 instead of 10 for routine queries
  3. Batch queries — Combine multiple questions into one search when possible
  4. Monitor usage — Track queries per day in Google Cloud Console

For a team of 5 using 30 searches/day, expect:

  • Month 1: Free tier (900 queries)
  • Month 2+: ~$7/month (900 queries at paid rate)

FAQ

Is the Web Search skill free?

The skill itself is free and open-source (MIT license). However, it requires Google Custom Search API access:

  • Free tier: 100 queries per day at no cost
  • Paid tier: $5 per 1,000 queries beyond the free limit

For most individual users, the free tier is sufficient. Small teams typically spend $5-15/month.

Can I use Bing or DuckDuckGo instead of Google?

Currently, Web Search only supports Google Custom Search API. However, you can:

  • Use the generic WebFetch skill for single-page fetches from any source
  • Contribute a Bing or DuckDuckGo provider to the OpenClaw skills repository
  • Use specialized search skills for specific sources (e.g., GitHub search, Wikipedia)

Community skills for alternative search engines may be available on ClawHub.

How do I increase my daily query limit?

To increase beyond 100 queries/day:

  1. Go to Google Cloud Console > “APIs & Services” > “Custom Search API”
  2. Click “Quotas”
  3. Request a quota increase (requires billing account)
  4. Once approved, queries beyond 100/day are billed at $5 per 1,000

Alternatively, implement aggressive caching and query optimization to stay within free tier limits.

Next Steps

Once Web Search is configured, explore these related workflows:

Web Search is the foundation skill that makes OpenClaw genuinely useful for current information. Once configured, it runs transparently—OpenClaw automatically searches when needed, and you get answers with sources instead of “I don’t have information about that.”

Ready to Get Started?

Install OpenClaw and build your own AI assistant today.

Related Articles