ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

brave-headless

Headless web search and content extraction via the Brave Search API. Features exponential-backoff retry, circuit breaker fault isolation, bounded-concurrency parallel page fetching, structured leveled logging, and smart paragraph-boundary truncation. No browser required. Use for web research, documentation lookup, URL content extraction, and any workflow requiring scriptable, non-interactive web search.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/kelexine/brave-headless
Or

brave-search

Headless web search and content extraction via the Brave Search API.

Setup

Run once before first use:

cd <skill-root>
npm ci

Required environment variable:

export BRAVE_API_KEY="your-key-here"

Get a free API key at brave.com/search/api.

Usage

Search

node scripts/search.js "query"                        # Basic (5 results)
node scripts/search.js "query" -n 10                  # Up to 20 results
node scripts/search.js "query" --content              # Include page content
node scripts/search.js "query" -n 3 --content         # Combined
node scripts/search.js "query" --json                 # Newline-delimited JSON
node scripts/search.js --help                         # Full options + env vars

Extract page content

node scripts/content.js https://example.com/article
node scripts/content.js https://example.com/article --json
node scripts/content.js https://example.com/article --max-length 8000

Output format (plain text)

--- Result 1 ---
Title:   Page Title
URL:     https://example.com/page
Snippet: Description from Brave Search
Content:
  # Page Title

  Extracted markdown content...

--- Result 2 ---
...

Pass --json to get one JSON object per line instead, suitable for piping.

Exit codes

CodeMeaning
0Success
1Invalid input or configuration error
2Page had no extractable content (content.js)
130Interrupted (SIGINT)

Configuration (environment variables)

All behaviour is configurable without touching code:

VariableDefaultDescription
BRAVE_API_KEYRequired. Brave Search subscription token
LOG_LEVELinfodebug · info · warn · error · silent
LOG_JSONfalseEmit logs as newline-delimited JSON to stderr
FETCH_TIMEOUT_MS15000Per-page fetch timeout
SEARCH_TIMEOUT_MS10000Brave API call timeout
MAX_CONTENT_LENGTH5000Max chars of extracted content
MAX_RETRY_ATTEMPTS3Retry attempts on transient errors
RETRY_BASE_DELAY_MS500Base delay for exponential backoff
RETRY_MAX_DELAY_MS30000Backoff delay cap
CONCURRENCY_LIMIT3Parallel page fetches when --content is set
CB_FAILURE_THRESHOLD5Consecutive failures before circuit opens
CB_RESET_TIMEOUT_MS60000Circuit breaker reset window...

Metadata

Author@kelexine
Stars1776
Views0
Updated2026-03-02
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-kelexine-brave-headless": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.