# Web Search

> Search the web for current information using Brave Search API or DuckDuckGo Use when this capability is needed.

- Skill: `tomevault-io/web-search-15` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/web-search-15`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/web-search-15/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/web-search-15

---

# Web Search

You can search the web for current information, news, and recent events.

## Setup

```bash
# Optional: Brave Search API key improves results. Fallback: DuckDuckGo (no key).
# Check: vault_get brave_api_key
# Save:  vault_save brave_api_key "<value>"
# Register: https://api.search.brave.com/register
# Keys use lowercase_underscore; auto-inject as UPPERCASE env vars ($BRAVE_API_KEY)
```

## Using Brave Search API (preferred — if `BRAVE_API_KEY` is available)

```bash
# General web search
curl -s "https://api.search.brave.com/res/v1/web/search?q=URL_ENCODED_QUERY&count=5" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: $BRAVE_API_KEY" | jq '.web.results[] | {title, url, description}'

# News search (past week)
curl -s "https://api.search.brave.com/res/v1/web/search?q=URL_ENCODED_QUERY&count=5&freshness=pw" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: $BRAVE_API_KEY" | jq '.web.results[] | {title, url, description}'

# Time-filtered search (today, past week, past month, past year)
# freshness values: pd (day), pw (week), pm (month), py (year)
curl -s "https://api.search.brave.com/res/v1/web/search?q=URL_ENCODED_QUERY&count=10&freshness=pd" \
  -H "Accept: application/json" \
  -H "X-Subscription-Token: $BRAVE_API_KEY" | jq '.web.results[] | {title, url, description}'
```

## Using DuckDuckGo (fallback — no API key needed)

```bash
# DuckDuckGo Instant Answer API (structured results)
curl -s "https://api.duckduckgo.com/?q=URL_ENCODED_QUERY&format=json&no_html=1" | jq '{
  heading: .Heading,
  abstract: .AbstractText,
  source: .AbstractSource,
  url: .AbstractURL,
  related: [.RelatedTopics[:5][] | {text: .Text, url: .FirstURL}]
}'

# DuckDuckGo HTML scrape (more results but less structured)
curl -s "https://html.duckduckgo.com/html/?q=URL_ENCODED_QUERY" \
  | grep -oP 'class="result__a"[^>]*href="\K[^"]+' | head -5
```

## Tips

- **URL-encode** the query: replace spaces with `+` or `%20`.
- Use Brave API if `BRAVE_API_KEY` is set — results are significantly better.
- For news and current events, add freshness parameters.
- Be specific in queries for better results.
- Combine with the **web-fetch** skill to read full content of interesting results.
- For local searches, include the location in the query.

## Triggers

search, search the web, google, look up, find information, what is, news about,
latest news, pesquisar, buscar na web, notícias

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/jholhewres) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

