This guide will help you get set up with the Brave Search API in Dify, an open-source platform designed to simplify AI application development, and offer real-time, accurate search results as part of AI agent orchestration. Dify offers an intuitive interface that brings together AI workflows, RAG pipelines, and agent capabilities, empowering developers to rapidly move from initial concept to production-ready applications.
Sign-up and create a key for Brave Search API
Register or login to a Brave Search API account.
For use with Open WebUI, you must ensure you are subscribed to one of the “Data for AI” plans, which are found under the “Subscriptions” tab in the left hand menu of the dashboard.
On the same menu, visit API keys and click Add API Key to generate a new key. A dialogue box will appear asking you to name the key and select which of your subscribed plans to use.
Note: free plans are usually more than enough for personal use (2,000 free queries)

Choose your Dify configuration
Cloud: Access Dify online.
Self-hosted: Clone the Dify repository and follow the Docker Compose installation guide, or set it up directly from the local source code.
Install and configure the Brave Search plugin
Navigate to the Plugin Marketplace, search for the Brave tool, and install it to Dify.

Once installed, you’ll be able to insert the API key you created in step one. This will allow Dify to make API requests as part of your AI workflows.

Use Brave Search in an AI agent workflow
You’re now ready to use the Brave Search tool in a range of ways via the Dify platform. To get familiar with Brave Search in Dify, navigate to Studio, and Create from Blank. Select the Agent app type, which is compatible with tools from the plugin marketplace. This will set you up with a fresh canvas for building your AI agent. You can alternatively browse templates from the Dify community to start from an existing framework someone has built.

Click Tools and enable the newly-installed Brave Search plugin. Then, using the Debug & Preview section of the interface, ask your agent a question and watch in real time as Brave Search is used to fetch context from the Web.
