
Web Search
Give coding agents ranked web search results with snippets, freshness filters, SafeSearch, and Goggles when validating ideas or grounding implementation choices.
Install
npx skills add https://github.com/brave/brave-search-skills --skill web-searchWhat is this skill?
- Brave Search API web endpoint with GET and POST for long queries or Goggles
- Ranked results with snippets, URLs, thumbnails; freshness, country, language, count, SafeSearch
- Requires X-Subscription-Token from Brave Search plan
- Documented curl quick starts for basic and parameterized searches
- Contrasts with LLM Context features in SKILL.md when to pick raw web search
Adoption & trust: 3k installs on skills.sh; 148 GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Journey fit
Research is the first canonical stop because SKILL.md positions web search as the primary retrieval endpoint before deeper LLM context tooling. Research subphase matches competitive scans, doc lookups, and fresh-result queries during early discovery—not shipping or ops monitoring.
Common Questions / FAQ
Is Web Search safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Web Search
# Web Search > **Requires API Key**: Get one at https://api.search.brave.com > > **Plan**: Included in the **Search** plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe ## Quick Start (cURL) ### Basic Search ```bash curl -s "https://api.search.brave.com/res/v1/web/search?q=python+web+frameworks" \ -H "Accept: application/json" \ -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" ``` ### With Parameters ```bash curl -s "https://api.search.brave.com/res/v1/web/search" \ -H "Accept: application/json" \ -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \ -G \ --data-urlencode "q=rust programming tutorials" \ --data-urlencode "country=US" \ --data-urlencode "search_lang=en" \ --data-urlencode "count=10" \ --data-urlencode "safesearch=moderate" \ --data-urlencode "freshness=pm" ``` ## Endpoint ```http GET https://api.search.brave.com/res/v1/web/search POST https://api.search.brave.com/res/v1/web/search ``` **Note**: Both GET and POST methods are supported. POST is useful for long queries or complex Goggles. **Authentication**: `X-Subscription-Token: <API_KEY>` header **Optional Headers**: - `Accept-Encoding: gzip` — Enable gzip compression ## When to Use Web Search | Feature | Web Search (this) | LLM Context (`llm-context`) | Answers (`answers`) | |--|--|--|--| | Output | Structured results (links, snippets, metadata) | Pre-extracted page content for LLMs | End-to-end AI answers with citations | | Result types | Web, news, videos, discussions, FAQ, infobox, locations, rich | Extracted text chunks, tables, code | Synthesized answer + source list | | Unique features | Goggles, structured data (`schemas`), rich callbacks | Token budget control, threshold modes | Multi-iteration search, streaming, OpenAI SDK compatible | | Speed | Fast (~0.5-1s) | Fast (<1s) | Slower (~30-180s) | | Best for | Search UIs, data extraction, custom ranking | RAG pipelines, AI agents, grounding | Chat interfaces, thorough research | ## Parameters | Parameter | Type | Required | Default | Description | |--|--|--|--|--| | `q` | string | **Yes** | - | Search query (1-400 chars, max 50 words) | | `country` | string | No | `US` | Search country (2-letter country code or `ALL`) | | `search_lang` | string | No | `en` | Language preference (2+ char language code) | | `ui_lang` | string | No | `en-US` | UI language (e.g., "en-US") | | `count` | int | No | `20` | Max results per page (1-20) | | `offset` | int | No | `0` | Page offset for pagination (0-9) | | `safesearch` | string | No | `moderate` | Adult content filter (`off`/`moderate`/`strict`) | | `freshness` | string | No | - | Time filter (`pd`/`pw`/`pm`/`py` or date range) | | `text_decorations` | bool | No | `true` | Include highlight markers | | `spellcheck` | bool | No | `true` | Auto-correct query | | `result_filter` | string | No | - | Filter result types (comma-separated) | | `goggles` | string | No | - | Custom ranking filter (URL or inline) | | `extra_snippets` | bool | No | - | Get up to 5 extra snippets per result | | `operators` | bool | No | `true` | Apply search operators | | `units` | string | No | - | Measurement units (`metric`/`imperial`) | | `enable_rich_callback` | bool | No | `false` | Enable rich 3rd party data callback | | `include_fetch_metadata` | bool | No | `false` | Include `fetched_content_timestamp` on results | ### Freshness Values | Value | Description | |--|--| | `pd` | Past day (24 hours) | | `pw` | Past week (7 days) | | `pm` | Past month (31 days) | | `py` | Past year (365 days) | | `YYYY-MM-DDtoYYYY-MM-DD` | Custom date range | ### Result Filter Values Filter types: `discussions`, `faq`, `infobox`, `news`, `query`, `videos`, `web`, `locations` ```bash # Only web and video results curl "...&resu