---
title: "Brave web search with an AI-written query and ranked links"
kind: "Kit"
category: "Research"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/a0d8768f-3ad0-465c-b93b-a1ae6f2b7766"
updated: "2026-11-12"
---

# Brave web search with an AI-written query and ranked links

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that takes a research question by webhook, has a Google Gemini model write a search query, searches the web with Brave and has a second Gemini call rank the results. It replies with ten links.

Brave web search with an AI-written query and ranked links is an n8n workflow in the Research category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow answers a research question with a short list of web links. A caller sends the question to a webhook. A Gemini model turns it into a search query, and Brave Search returns web results for that query. A second Gemini call ranks the results against the question and picks ten. The webhook replies with the ten links, each with a title and a description, plus the facts those descriptions give. Twenty nodes do the work, four of them sticky notes.

### Who it suits

Builders who want a search step inside a bigger n8n workflow or agent, one that returns ranked links instead of raw results. Skip it if you need the full text of the pages, since it reads only the titles and short descriptions that Brave returns.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Research | Analysts | Get a ranked reading list for a question | An analyst asks about new battery rules in Europe and gets ten links ordered by fit. |
| Marketing | Content teams | Find sources for an article | A writer asks for recent surveys on remote work and picks links from the list. |
| Software | Workflow builders | Add a search step to an agent or a larger workflow | A builder calls the webhook from another workflow and passes the links on. |
| Sales | Account researchers | See what the web says about a company or a topic | A rep asks about a prospect’s latest product launch. |

You need a little n8n: import a file, add a Google Gemini credential, paste a Brave key and call a webhook.

### Where to use it

Any n8n that can reach Google’s Gemini API and Brave’s search API will run it. The answer goes back to whoever called the webhook, so it also works as a step that another workflow calls.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps
- Inside another workflow: copy \`Webhook Call\` there and point it at this workflow’s production address
- Another trigger: replace \`Webhook\` with a form, a chat or a schedule, and point the expressions that read the question at the new node
- Another model: the file ships spare Anthropic and OpenAI model nodes that can replace Gemini

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Setup is one model credential and one search key.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Google Gemini | An API key |
| Brave Search API | An account and an API key, on its prepaid plan |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add a Google Gemini (PaLM) API credential with your key and select it in `Parser Model` and `Agent Model`. Both are set to `models/gemini-3.6-flash`, the swap for the file’s `gemini-1.5-flash-002`, which Google no longer lists.
3. In `Query`, replace `<YOUR_BRAVE_API_KEY>` in the `X-Subscription-Token` header with your Brave key. Brave’s free plan is gone, so the key needs its prepaid plan.
4. Open `Webhook` and press Listen for test event. In `Webhook Call`, replace `<YOUR_N8N_HOST>` with the address of your n8n and execute that node. You can also open the test address in a browser with `?Research%20Question=` and your question after it.
5. Read the reply in the caller, or in the output of `Respond to Webhook`. For regular use, activate the workflow and call `/webhook/semantic-search` instead of `/webhook-test/semantic-search`.

### How to use it

Send a GET request with the question in a query field called `Research Question`. The workflow writes one search query from it, runs that search on Brave and ranks what comes back. The reply is JSON text. It holds `Highest_RANKEDURL_1` to `Highest_RANKEDURL_10`, each with a `title`, a `link` and a `description`, and an `Information_extracted` field.

What to change for a different result

| To change | Where |
| --- | --- |
| The question | The \`Research Question\` field of the request |
| How the search query is written | The prompt and the example in \`Semantic Search -Query Maker\` |
| How results are ranked | The prompts in \`Semantic Search Result Re-Ranker\` |
| The shape of the reply | \`Structured Output Parser2\` and the body of \`Respond to Webhook\` |
| The models | \`Agent Model\` runs both chains and \`Parser Model\` runs the repairs |
| The search key | The header in \`Query\` |

### Example

A caller asks for recent reports on Europe’s energy prices.

The reply holds ten links ordered by how well their titles and descriptions fit the question, with a note on what they say. Brave returns only a title, a link and a short description for each result, so the ranking judges those and not the pages. Open the links before you rely on them.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. A webhook is an address that starts the workflow when something calls it, and the workflow sends its answer back to that caller. Search engines match words, so a long question often finds nothing. A model first shortens the question into a query, then reads the results and puts the best ones first.

**For experts.** `Webhook` answers through `Respond to Webhook`, because its response mode is set to that node. Both chains use `Agent Model`. `Semantic Search -Query Maker` holds a worked example in its messages and writes `reasoning_summary` and `final_search_query` through `Structured Output Parser1`. An `Auto-fixing Output Parser` with `Parser Model` repairs a bad reply. `Query-1 Combined` is a Code node that turns every `web.results` entry into one text block, and the Re-Ranker uses `Structured Output Parser2` the same way.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Webhook\` | Takes the question from the \`Research Question\` field | A GET request by default, with no authentication |
| \`Date \& Time\` | Gives both prompts today’s date | It is the \`currentDate\` field |
| \`Semantic Search -Query Maker\` | Writes one search query | Its prompt asks for short queries, since long ones return nothing |
| \`Query\` | Calls Brave’s web search | One request per run, with the key in a header |
| \`Query-1 Combined\` | Joins each result’s title, address and description | It writes a line saying no results were found when there are none |
| \`Semantic Search Result Re-Ranker\` | Ranks the results and extracts facts | Its prompts disagree on three links or ten |
| \`Respond to Webhook\` | Returns the ten links as JSON text | The values go in without escaping |
| \`Webhook Call\` | Calls the webhook with a sample question | It is connected to nothing |

### Good to know

The search API is no longer free, the models the file named are gone, and the webhook has no password.

- Brave: its free plan is gone. Its pricing page, read on 12 November 2026, lists a prepaid plan at $5.00 per 1,000 requests that includes $5 in free credits every month. One run makes one search request
- Gemini: Google’s deprecations page, read that day, lists \`gemini-2.0-flash\` for shutdown on 1 June 2026 with \`gemini-3.6-flash\` as the replacement, and \`gemini-1.5-flash-002\` is no longer listed. \`Agent Model\` also sets all four of Gemini’s safety filters to block nothing
- Spare models: Anthropic’s deprecations page, read that day, calls \`claude-haiku-4-5-20251001\` Active. It also says Claude 4.7 and later models reject \`temperature\` and \`top\_p\` set to non-default values. If you pick one of those, clear both options in \`Anthropic Chat Model\`. \`OpenAI Chat Model\` sets no model, so it takes the node’s default, \`gpt-5-mini\`. OpenAI lists that for shutdown on 11 December 2026 with \`gpt-5.6-terra\` as the replacement, so pick a model in it before you use it
- Prompts: the system message of \`Semantic Search Result Re-Ranker\` says to rank the top 3, while its prompt and the output shape ask for 10. The reply carries 10. The prompt also asks for a follow-up query when the results are weak, and the output has no field for one, so it is lost
- Reply: \`Respond to Webhook\` writes titles and descriptions into JSON text without escaping them, so a double quote in one of them breaks the JSON
- Expressions: they read earlier nodes with \`$item("0").$node\["Name"\]\`, an older form that n8n still runs but does not document
- Open webhook: anyone who has its address can start a run and use your Brave and Gemini quota
- Billing: each run makes two Gemini calls and one Brave request, plus a repair call when a parser rejects a reply
- Your data: the question and the search results go to Google, and the search query goes to Brave
- Credentials: the JSON holds none

## README

```markdown
# Brave web search with an AI-written query and ranked links

An n8n workflow that answers a research question with a short list of web links. A webhook takes the question, a Google
Gemini model turns it into a search query, Brave Search returns results, and a second Gemini call ranks them and picks ten.
The webhook replies with the ten links and a note on what they say.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 20 nodes, four of them sticky notes. It holds no credential. The notes cover
  the Brave key, the webhook call, changing the trigger and the spare model nodes.
- `README.md`: these notes.

## What we changed from the original copy

- The three model nodes (Gemini, Anthropic and OpenAI) were linked to credentials in their author's n8n. The links are gone,
  so select your own.
- The Gemini model was `models/gemini-1.5-flash-002`, which Google no longer lists. Both Gemini nodes now use
  `models/gemini-3.6-flash`.
- The spare Anthropic node used `claude-3-5-haiku-20241022`, which Anthropic retired on 19 February 2026. It now uses
  `claude-haiku-4-5-20251001`, the model Anthropic names as its replacement.
- The webhook's path was a generated id. It is now `semantic-search`, and the webhook's own id is gone.
- `Webhook Call` pointed at a test address on its author's n8n host. It now points at
  `https://<YOUR_N8N_HOST>/webhook-test/semantic-search`.
- The Brave key slot held the text `<Insert Your API Key Here>`. It now holds `<YOUR_BRAVE_API_KEY>`.
- Two sticky notes were rewritten. The first described Brave's free plan, which is gone. The second named two nodes that do not
  exist, and it now names the real ones.
- The export's workflow id, version id and instance id are gone.
- Nothing else. The Code node needed no change.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A Google Gemini API key.
- A Brave Search API account and key, on its prepaid plan.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add a Google Gemini (PaLM) API credential with your key. Select it in `Parser Model` and `Agent Model`.
3. In `Query`, replace `<YOUR_BRAVE_API_KEY>` in the `X-Subscription-Token` header with your Brave key.
4. Open `Webhook` and press Listen for test event. In `Webhook Call`, replace `<YOUR_N8N_HOST>` with the address of your n8n and
   execute that node. You can also open the test address in a browser with `?Research%20Question=` and your question after it.
5. Read the reply in the caller, or in the output of `Respond to Webhook`.
6. For regular use, activate the workflow and call `/webhook/semantic-search` instead of `/webhook-test/semantic-search`.

## How a run goes

1. `Webhook` takes a GET request and reads the question from the query field `Research Question`. It does not answer yet.
2. `Date & Time` adds today's date.
3. `Semantic Search -Query Maker` asks `Agent Model` for one short search query. Its prompt holds a worked example, and the
   answer is held to two fields, `reasoning_summary` and `final_search_query`, by `Structured Output Parser1`.
   `Auto-fixing Output Parser` sends a bad reply to `Parser Model` for a repair.
4. `Query` sends the query to Brave's web search at `https://api.search.brave.com/res/v1/web/search` with your key in a header.
5. `Query-1 Combined`, a Code node, writes the title, address and description of every result into one text, or a line saying
   no results were found.
6. `Semantic Search Result Re-Ranker` gives that text, the question, the query and the date to `Agent Model`, which ranks the
   results and extracts what the descriptions say. The answer is held to ten ranked links and an `Information_extracted` field by
   `Structured Output Parser2`, with a second `Auto-fixing Output Parser` for repairs.
7. `Respond to Webhook` replies to the caller with the ten links and the extracted notes, written as JSON text.

`Webhook Call` is a separate node that calls the webhook with a sample question. It is connected to nothing. The spare
`Anthropic Chat Model` and `OpenAI Chat Model` nodes are connected to nothing either.

## Change the look

- The question: the `Research Question` field of the request.
- How the search query is written: the prompt and the example in `Semantic Search -Query Maker`.
- How results are ranked: the prompts in `Semantic Search Result Re-Ranker`.
- The shape of the reply: `Structured Output Parser2` and the body of `Respond to Webhook`.
- The models: `Agent Model` runs both chains and `Parser Model` runs the repairs. To use Claude or an OpenAI model instead, link
  the spare node to the chains and the parsers in place of the Gemini node.

## Good to know

- Brave: its free plan is gone. Its pricing page, read on 12 November 2026, lists a prepaid plan at $5.00 per 1,000 requests that
  includes $5 in free credits every month. One run makes one search request.
- Gemini: Google's deprecations page, read that day, lists `gemini-2.0-flash` for shutdown on 1 June 2026 with `gemini-3.6-flash`
  as the replacement, and `gemini-1.5-flash-002` is no longer listed. `Agent Model` also sets all four of Gemini's safety
  filters to block nothing.
- Spare models: Anthropic's deprecations page, read that day, calls `claude-haiku-4-5-20251001` Active. It also says Claude 4.7
  and later models reject `temperature` and `top_p` set to non-default values. If you pick one of those, clear both options in
  `Anthropic Chat Model`. `OpenAI Chat Model` sets no model, so it takes the node's default, `gpt-5-mini`. OpenAI lists that for
  shutdown on 11 December 2026 with `gpt-5.6-terra` as the replacement, so pick a model in it before you use it.
- The ranking prompts disagree: the system message of `Semantic Search Result Re-Ranker` says to rank the top 3, while its prompt
  and the output shape ask for 10. The reply carries 10. The prompt also asks for a follow-up query when the results are weak, and
  the output has no field for one, so it is lost.
- `Respond to Webhook` writes titles and descriptions into JSON text without escaping them, so a double quote in one of them
  breaks the JSON.
- The expressions read earlier nodes with `$item("0").$node["Name"]`. n8n still runs that older form but does not document it.
- The webhook has no authentication, so anyone who has its address can start a run and use your Brave and Gemini quota.
- Each run makes two Gemini calls and one Brave request, plus a repair call when a parser rejects a reply.
- Your data: the question and the search results go to Google, and the search query goes to Brave.
```

## What is in it

3 files, 45 KB, downloaded as a zip.

```text
NOTICE.md  688 B
README.md  6 KB
workflow.json  38 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 7 steps, starting when its webhook is called
- Not reached: 3 nodes no run reaches: Webhook Call, Anthropic Chat Model and OpenAI Chat Model
- AI: 2 steps call an AI model: Semantic Search -Query Maker and Semantic Search Result Re-Ranker
- Sign-ins: Signs in to: Google Gemini and api.search.brave.com
- API keys: No API key is left in the file; 1 blank in it for your own key
- Step types: Mindket’s checker reads all 6 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/a0d8768f-3ad0-465c-b93b-a1ae6f2b7766)
- [Its page on Mindket](https://mindket.com/p/a0d8768f-3ad0-465c-b93b-a1ae6f2b7766)
