brave-search
Original:🇺🇸 English
Translated
2 scripts
Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content. Lightweight, no browser required.
10installs
Sourcebadlogic/pi-skills
Added on
NPX Install
npx skill4agent add badlogic/pi-skills brave-searchTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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 (or
~/.profilefor zsh):~/.zprofilebashexport BRAVE_API_KEY="your-api-key-here" - Install dependencies (run once):
bash
cd {baseDir} npm install
Search
bash
{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 optionsOptions
- - Number of results (default: 5, max: 20)
-n <num> - - Fetch and include page content as markdown
--content - - Two-letter country code (default: US)
--country <code> - - Filter by time:
--freshness <period>- - Past day (24 hours)
pd - - Past week
pw - - Past month
pm - - Past year
py - - Custom date range
YYYY-MM-DDtoYYYY-MM-DD
Extract Page Content
bash
{baseDir}/content.js https://example.com/articleFetches 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