brave-search
badlogic/pi-skills
Web search and content extraction via Brave Search API—no browser required.
What is brave-search?
Lightweight web search skill using the official Brave Search API. Search documentation, facts, and web content, with optional page content extraction as markdown. Requires a free Brave Search API account.
- Search the web with configurable result count (up to 20)
- Filter results by country, date range, or freshness (past day/week/month/year)
- Extract and convert page content to markdown
- Return structured results with title, link, age, and snippet
- Combine multiple search options in a single query
How to install brave-search
npx skills add https://github.com/badlogic/pi-skills --skill brave-search- Brave Search API account (free tier available at https://api-dashboard.search.brave.com/register)
- Credit card to create free subscription (no charges)
- API key added to shell profile as BRAVE_API_KEY environment variable
- npm dependencies installed via npm install
How to use brave-search
- 1.Register for a free Brave Search API account and create an API key
- 2.Add your API key to your shell profile as export BRAVE_API_KEY="your-key"
- 3.Run npm install in the skill directory
- 4.Use search.js with your query: {baseDir}/search.js "query"
- 5.Add flags like -n 10 for more results, --content to extract page text, --country DE for location filtering, or --freshness pw for recent results
- 6.Use content.js to extract readable markdown from a specific URL: {baseDir}/content.js https://example.com
Use cases
- Looking up API documentation or technical references
- Fact-checking or researching current information
- Extracting readable content from specific URLs
- Finding recent news or time-sensitive information by date range
- Searching within a specific country's results
- Developers building research or documentation tools
- AI agents needing real-time web information
- Teams automating fact-checking or content curation
- Anyone requiring lightweight web search without a browser
brave-search FAQ
No, a free tier is available. A credit card is required to create the account, but you will not be charged.
The maximum is 20 results per search query.
Yes, use --freshness with preset periods (pd, pw, pm, py) or a custom date range in YYYY-MM-DDtoYYYY-MM-DD format.
It fetches the full page content from each search result and converts it to markdown, not just the snippet.
Yes, use --country with a two-letter country code (e.g., --country DE for Germany).
Full instructions (SKILL.md)
Source of truth, from badlogic/pi-skills.
name: brave-search description: Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content. Lightweight, no browser required.
Brave Search
Web search and content extraction using the official Brave Search API. No browser required.
Setup
Requires a Brave Search API account with a free subscription. A credit card is required to create the free subscription (you won't be charged).
- Create an account at https://api-dashboard.search.brave.com/register
- Create a "Free AI" subscription
- Create an API key for the subscription
- Add to your shell profile (
~/.profileor~/.zprofilefor zsh):export BRAVE_API_KEY="your-api-key-here" - Install dependencies (run once):
cd {baseDir} npm install
Search
{baseDir}/search.js "query" # Basic search (5 results)
{baseDir}/search.js "query" -n 10 # More results (max 20)
{baseDir}/search.js "query" --content # Include page content as markdown
{baseDir}/search.js "query" --freshness pw # Results from last week
{baseDir}/search.js "query" --freshness 2024-01-01to2024-06-30 # Date range
{baseDir}/search.js "query" --country DE # Results from Germany
{baseDir}/search.js "query" -n 3 --content # Combined options
Options
-n <num>- Number of results (default: 5, max: 20)--content- Fetch and include page content as markdown--country <code>- Two-letter country code (default: US)--freshness <period>- Filter by time:pd- Past day (24 hours)pw- Past weekpm- Past monthpy- Past yearYYYY-MM-DDtoYYYY-MM-DD- Custom date range
Extract Page Content
{baseDir}/content.js https://example.com/article
Fetches a URL and extracts readable content as markdown.
Output Format
--- Result 1 ---
Title: Page Title
Link: https://example.com/page
Age: 2 days ago
Snippet: Description from search results
Content: (if --content flag used)
Markdown content extracted from the page...
--- Result 2 ---
...
When to Use
- Searching for documentation or API references
- Looking up facts or current information
- Fetching content from specific URLs
- Any task requiring web search without interactive browsing
Related skills
More from badlogic/pi-skills and the wider catalog.

bib-search-citation
Search and cite from local BibTeX/BibLaTeX libraries with topic, author, year, and DOI filters.

latex-paper-en
English LaTeX assistant for journal and conference papers—compile, format, bibliography, grammar, and section review.

latex-thesis-zh
Chinese LaTeX thesis assistant for compilation, formatting, GB/T 7714, structure, terminology consistency, and final compliance checks.

paper-audit
Reviewer-style audit and submission gate for academic papers in LaTeX, Typst, or PDF.

typst-paper
Typst paper assistant for compile, format, grammar, bibliography, and submission readiness in English or Chinese.

drawio
Create and edit draw.io diagrams offline with YAML-first workflow for architecture, flowcharts, UML, and network topologies.