# BraveSearch Loader

BraveSearch is a privacy-focused search engine that provides a powerful API for web search. This module enables loading and processing search results from BraveSearch into documents.

This module provides a sophisticated search document loader that can:

* Execute web searches using BraveSearch API
* Convert search results into structured documents
* Extract snippets and metadata from results
* Process results with text splitters
* Customize metadata extraction

## Inputs

### Required Parameters

* **Query**: The search query to execute
* **Connect Credential**: BraveSearch API credentials

### Optional Parameters

* **Text Splitter**: A text splitter to process the extracted content
* **Additional Metadata**: JSON object with additional metadata
* **Omit Metadata Keys**: Comma-separated list of metadata keys to omit

## Outputs

* **Document**: Array of document objects containing metadata and pageContent
* **Text**: Concatenated string from pageContent of documents

## Features

* Privacy-focused web search
* Structured result processing
* Automatic metadata extraction
* Result content splitting
* Customizable metadata handling
* Error handling for API responses

## Document Structure

Each search result is converted into a document with:

* **pageContent**: The snippet/content from the search result
* **metadata**:
  * title: The title of the webpage
  * link: The URL of the webpage
  * Additional custom metadata as specified

## Notes

* Requires valid BraveSearch API key
* Results include webpage snippets and metadata
* Can be combined with text splitters for content processing
* Supports custom metadata addition and omission
* Handles API rate limits and errors
* Preserves privacy-focused search features


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowiseai.com/integrations/langchain/document-loaders/bravesearch-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
