Skip to content

Private Meta-Search API - Aggregate Google, Bing, DuckDuckGo without accounts or tracking

License

Notifications You must be signed in to change notification settings

compemperor/clawsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ClawSearch πŸ”πŸ¦€

Private Meta-Search API β€” Aggregate Google, Bing, DuckDuckGo & more without accounts, tracking, or credit cards.

License: MIT Python 3.12+ Docker Release

Why ClawSearch?

  • No accounts required β€” Self-host, own your searches
  • No tracking β€” Your queries stay private
  • No credit cards β€” Unlike Brave API, Google API, etc.
  • Aggregated results β€” Best of multiple search engines
  • Clean REST API β€” Simple JSON responses
  • Docker ready β€” One command to deploy

Quick Start

ClawSearch requires SearXNG + Redis. Use Docker Compose:

Option 1: Clone repo

git clone https://github.com/compemperor/clawsearch.git
cd clawsearch
docker compose up -d

Option 2: Curl files directly

mkdir clawsearch && cd clawsearch
curl -sLO https://raw.githubusercontent.com/compemperor/clawsearch/main/docker-compose.yml
mkdir -p searxng
curl -sL https://raw.githubusercontent.com/compemperor/clawsearch/main/searxng/settings.yml -o searxng/settings.yml
docker compose up -d

Test:

curl "http://localhost:8000/search?q=hello+world"

Add skill to OpenClaw:

mkdir -p ~/.openclaw/workspace/skills/clawsearch
curl -sL https://raw.githubusercontent.com/compemperor/clawsearch/main/skill/SKILL.md \
  -o ~/.openclaw/workspace/skills/clawsearch/SKILL.md

API Endpoints

General Search

GET /search?q=your+query
Parameter Description Default
q Search query (required) -
engines Comma-separated: google,bing,duckduckgo all
freshness Time filter: day, week, month, year none
lang Language code en
page Page number (1-10) 1

News Search

GET /news?q=breaking+news
Parameter Description Default
q News query (required) -
freshness Time filter: day, week, month day
lang Language code en
page Page number 1

Tech Search

GET /tech?q=rust+programming

Searches GitHub, StackOverflow, HackerNews, and tech blogs.

Image Search

GET /images?q=cats

Health Check

GET /health

Response Format

{
  "query": "your search",
  "results": [
    {
      "title": "Result Title",
      "url": "https://example.com",
      "snippet": "Description text...",
      "engine": "google",
      "score": 1.5,
      "published": "2026-02-01T12:00:00"
    }
  ],
  "total": 100,
  "cached": false,
  "timestamp": "2026-02-01T17:00:00Z",
  "engines_used": ["google", "bing", "duckduckgo"],
  "suggestions": ["related search", "another suggestion"]
}

Configuration

Environment Variables

Variable Description Default
SEARXNG_URL SearXNG backend URL http://localhost:8888
CLAWSEARCH_API_KEYS Comma-separated API keys (empty = no auth) ""
CLAWSEARCH_CACHE_TTL Cache duration in seconds 300

API Authentication

Optional API key authentication:

# Set keys in docker-compose or environment
export CLAWSEARCH_API_KEYS="key1,key2,key3"

# Use in requests
curl -H "X-API-Key: key1" "http://localhost:8000/search?q=test"

Deployment

Docker Compose (Recommended)

docker compose up -d

This starts:

  • ClawSearch API on port 8000
  • SearXNG (internal, not exposed)

Manual Setup

# 1. Start SearXNG
docker run -d -p 8888:8080 searxng/searxng

# 2. Install ClawSearch
pip install -r requirements.txt

# 3. Run
SEARXNG_URL=http://localhost:8888 uvicorn clawsearch.main:app --host 0.0.0.0 --port 8000

Architecture

Redis caching is included by default for better performance.

ClawSearch API ─► SearXNG ─► [Google, Bing, DDG]
      β”‚              β”‚
      └──── Redis β—„β”€β”€β”˜

Customization

Enable/Disable Search Engines

Edit searxng/settings.yml:

engines:
  - name: google
    disabled: false
    
  - name: bing
    disabled: false
    
  - name: yahoo
    disabled: true  # Disable slow engines

Add Rate Limiting

Use a reverse proxy (nginx/Caddy) with rate limiting, or add FastAPI middleware.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Your App      │────▢│   ClawSearch    │────▢│   SearXNG    β”‚
β”‚                 β”‚     β”‚   (FastAPI)     β”‚     β”‚  (Aggregator)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                                                       β”‚
                              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                              β–Ό                        β–Ό                        β–Ό
                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚ Google  β”‚              β”‚  Bing   β”‚              β”‚   DDG   β”‚
                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Use Cases

  • Market Intelligence β€” Monitor trends, news, competitors
  • Research Automation β€” Aggregate sources without API limits
  • AI Agents β€” Private search for LLM applications
  • Privacy-focused apps β€” No user tracking

Limitations

  • Rate limits β€” Upstream engines may rate-limit heavy usage
  • CAPTCHAs β€” Google/Bing may challenge from datacenter IPs
  • Freshness β€” Results depend on engine indexing speed

Contributing

PRs welcome! Please:

  1. Fork the repo
  2. Create a feature branch
  3. Add tests if applicable
  4. Submit PR

License

MIT License β€” use it however you want.


Made with πŸ¦€ by compemperor