brave-search

Searches the web via the Brave Search API and extracts page content as markdown.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill brave-search-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: brave-search
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/pi/.pi/agent/skills/pi-skills/brave-search
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill brave-search-ravitejakarra24

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @mozilla/readability, jsdom, turndown, turndown-plugin-gfm.

What problem does it solve? AI agents and scripts often need current web information or page content without launching a browser. This Skill provides headless web search and readable content extraction through the official Brave Search API, returning structured results and markdown directly in the terminal. ## Core Features & Use Cases - Web Search: Query the Brave Search API with control over result count (up to 20), country, and freshness filters (past day, week, month, year, or custom date ranges). - Content Extraction: Fetch any URL and convert its readable content to clean markdown using Mozilla Readability, jsdom, and Turndown with GFM support. - Combined Mode: Use the --content flag to search and automatically pull markdown content from each result page. - Use Case: Ask your agent to look up the latest documentation for a library released this week; it runs search.js with a freshness filter and returns titles, links, snippets, and full page content without opening a browser. ## Quick Start Set the BRAVE_API_KEY environment variable, run npm install in the skill directory, then ask the agent to search the web for a topic such as recent Rust async runtime benchmarks.

Frequently Asked Questions about brave-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search the web from the command line without a browser?

Run search.js with a query after setting the BRAVE_API_KEY environment variable. It calls the Brave Search API and prints titles, links, ages, and snippets, with options for result count, country, and freshness filters.

How to extract readable content from a webpage as markdown?

Run content.js followed by a URL. It fetches the page, parses it with Mozilla Readability and jsdom, then converts the article HTML to markdown using Turndown with GFM support, with a fallback extractor for non-article pages.

Does Brave Search API require an API key?

Yes, search.js requires the BRAVE_API_KEY environment variable. Create a free account at the Brave Search API dashboard, set up a Free AI subscription, and generate an API key for the subscription.

Can I filter Brave search results by date or country?

Yes, use --freshness with pd, pw, pm, py, or a custom YYYY-MM-DDtoYYYY-MM-DD range for time filtering, and --country with a two-letter code for regional results. The default country is US.

Why does content extraction fail on some pages?

Extraction fails when pages block the request, return non-OK HTTP status, or lack identifiable main content. The script falls back to stripping scripts and navigation elements, but pages with minimal text under 100 characters report an error.