AutomationFlowsAI & RAG › Extract Structured Data From Brave Search with Bright Data Mcp & Google Gemini

Extract Structured Data From Brave Search with Bright Data Mcp & Google Gemini

ByRanjan Dailata @ranjancse on n8n.io

Community nodes can only be installed on self-hosted instances of n8n.

Event trigger★★★★☆ complexityAI-powered24 nodesGoogle Gemini ChatChain LlmOutput Parser StructuredN8N Nodes McpGoogle SheetsRead Write FileHTTP Request
AI & RAG Trigger: Event Nodes: 24 Complexity: ★★★★☆ AI nodes: yes Added:
Extract Structured Data From Brave Search with Bright Data Mcp & Google Gemini — n8n workflow card showing Google Gemini Chat, Chain Llm, Output Parser Structured integration

This workflow corresponds to n8n.io template #4497 — we link there as the canonical source.

This workflow follows the Chainllm → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "eqvDSknjbg3YLzxM",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Brave Search (Image,Video, News, All) and Structured Data Extract with Bright Data MCP & Google Gemini",
  "tags": [
    {
      "id": "Kujft2FOjmOVQAmJ",
      "name": "Engineering",
      "createdAt": "2025-04-09T01:31:00.558Z",
      "updatedAt": "2025-04-09T01:31:00.558Z"
    },
    {
      "id": "ZOwtAMLepQaGW76t",
      "name": "Building Blocks",
      "createdAt": "2025-04-13T15:23:40.462Z",
      "updatedAt": "2025-04-13T15:23:40.462Z"
    },
    {
      "id": "ddPkw7Hg5dZhQu2w",
      "name": "AI",
      "createdAt": "2025-04-13T05:38:08.053Z",
      "updatedAt": "2025-04-13T05:38:08.053Z"
    },
    {
      "id": "qpxJxOMCv2x7Op5c",
      "name": "SERP",
      "createdAt": "2025-04-03T15:37:19.686Z",
      "updatedAt": "2025-04-03T15:37:19.686Z"
    }
  ],
  "nodes": [
    {
      "id": "70d29e8e-3e2d-4177-abdc-d3da8d6b60e4",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -780,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e3b06669-954e-494f-8b59-080d9d7083a8",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        600,
        220
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.0-flash-exp"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2c8c3b3a-edaf-42f2-8f3b-1c3a96bd4c7d",
      "name": "Structured Data Extractor",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        600,
        0
      ],
      "parameters": {
        "text": "=Extract structured data from the search result. \n\n{{ $json.search_response }}",
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 1.6
    },
    {
      "id": "b2cb439e-eccc-40ad-97db-265bcd9f7a73",
      "name": "Set the input for image search",
      "type": "n8n-nodes-base.set",
      "position": [
        -120,
        -300
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0b0e9335-56d4-4705-b61b-de0dc9c8ae6d",
              "name": "search_base_url",
              "type": "string",
              "value": "https://search.brave.com/images"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "df89cc2e-1b75-4176-a66d-f17d5076bb17",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        780,
        220
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"search_results\": {\n      \"type\": \"array\",\n      \"description\": \"A list of search results related to the query.\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"title\": {\n            \"type\": \"string\",\n            \"description\": \"The title of the search result or webpage.\"\n          },\n          \"url\": {\n            \"type\": \"string\",\n            \"format\": \"uri\",\n            \"description\": \"The URL of the result.\"\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"A short description or snippet summarizing the content of the URL.\"\n          }\n        },\n        \"required\": [\"title\", \"url\", \"description\"]\n      }\n    },\n    \"related_queries\": {\n      \"type\": \"array\",\n      \"description\": \"A list of queries related to the original search, often used for refining or expanding the search.\",\n      \"items\": {\n        \"type\": \"string\"\n      }\n    }\n  },\n  \"required\": [\"search_results\"]\n}\n"
      },
      "typeVersion": 1.2
    },
    {
      "id": "919833cb-1add-4670-86a4-466f3df925f3",
      "name": "Bright Data MCP Client for Brave Image Search",
      "type": "n8n-nodes-mcp.mcpClient",
      "position": [
        100,
        -300
      ],
      "parameters": {
        "toolName": "scrape_as_html",
        "operation": "executeTool",
        "toolParameters": "={\n  \"url\": \"{{$json.search_base_url}}?q={{encodeURI($('Set the search criteria\\'s').item.json.search_query))}}\"\n} "
      },
      "credentials": {
        "mcpClientApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d90b79cc-b878-4210-8380-794cd378ec73",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -340,
        -21
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "235f2abd-b5fd-4c0a-aa63-9d8655d02dfc",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.search_type }}",
                    "rightValue": "images"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "4b6eb7ce-5683-48cf-8ab9-81b25693c280",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.search_type }}",
                    "rightValue": "videos"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "312a7726-33a4-4294-9103-5a5017f36909",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.search_type }}",
                    "rightValue": "news"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "e84e037f-89a3-48ef-b509-2ca70844ad27",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.search_type }}",
                    "rightValue": "all"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "f20fde43-bfb3-447a-9f43-51bf952c9d7e",
      "name": "Set the input for video search",
      "type": "n8n-nodes-base.set",
      "position": [
        -120,
        -100
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0b0e9335-56d4-4705-b61b-de0dc9c8ae6d",
              "name": "search_base_url",
              "type": "string",
              "value": "https://search.brave.com/video"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b25da743-0d4b-46a2-bb51-2b8e1c533ac5",
      "name": "Bright Data MCP Client for Brave Video Search",
      "type": "n8n-nodes-mcp.mcpClient",
      "position": [
        100,
        -100
      ],
      "parameters": {
        "toolName": "scrape_as_html",
        "operation": "executeTool",
        "toolParameters": "={\n  \"url\": \"{{$json.search_base_url}}?q={{encodeURI($('Set the search criteria\\'s').item.json.search_query))}}\"\n} "
      },
      "credentials": {
        "mcpClientApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "28e51b1c-a4f3-4d95-af12-d4bd1219cfa2",
      "name": "Set the Search Response",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "74d82a2b-0219-4966-80f2-3144c7c5e4c7",
              "name": "search_response",
              "type": "string",
              "value": "={{ $json.result.content[0].text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "98d38078-4708-4d22-a8be-e50a4701ea75",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -480
      ],
      "parameters": {
        "color": 3,
        "width": 440,
        "height": 120,
        "content": "## Disclaimer\nThis template is only available on n8n self-hosted as it's making use of the community node for MCP Client."
      },
      "typeVersion": 1
    },
    {
      "id": "43138034-35ad-43fd-b67e-69942e1b061b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -340,
        -580
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 220,
        "content": "## LLM Usages\n\nGoogle Gemini LLM is being utilized for the structured data extraction handling."
      },
      "typeVersion": 1
    },
    {
      "id": "eb731e47-779e-40bc-8a83-126d1b03a70b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -980
      ],
      "parameters": {
        "color": 7,
        "width": 440,
        "height": 360,
        "content": "## Logo\n\n\n![logo](https://images.seeklogo.com/logo-png/43/1/brightdata-logo-png_seeklogo-439974.png)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5581a950-075d-4d4d-9f97-fd65e71cc6ff",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -580
      ],
      "parameters": {
        "width": 440,
        "height": 320,
        "content": "## Note\n\nDeals with the Brave Search by leveraging the Bright Data MCP Client.\n\n**Please make sure to set the search type with videos, images, news, all based on your search input needs**\n\n**Please make sure to update the Initiate a Webhook Notification for the Structured Data node with the Webhook of your interest**"
      },
      "typeVersion": 1
    },
    {
      "id": "a5afb97c-0fbf-48b1-b598-fbca46e3df96",
      "name": "Set the input fields for news search",
      "type": "n8n-nodes-base.set",
      "position": [
        -120,
        100
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0b0e9335-56d4-4705-b61b-de0dc9c8ae6d",
              "name": "search_base_url",
              "type": "string",
              "value": "https://search.brave.com/news"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0dcd6a1b-7968-40da-ad27-4d39fadc243a",
      "name": "Set the search criteria's",
      "type": "n8n-nodes-base.set",
      "position": [
        -560,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9852f865-49b9-4672-9454-4bcc51173445",
              "name": "search_type",
              "type": "string",
              "value": "news"
            },
            {
              "id": "643626c4-6d3e-4609-be12-5e7c0c7afe1d",
              "name": "search_query",
              "type": "string",
              "value": "bright+data&source=web&lang=en-in"
            },
            {
              "id": "4a0fc0eb-2638-4441-9eb1-51c29dd7d1b4",
              "name": "json_search_query",
              "type": "string",
              "value": "{     \"query\": \"What are the latest funding rounds for AI startups?\",     \"include_domains\": [ \"crunchbase.com\", \"techcrunch.com\", \"pitchbook.com\" ]  }"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2c686701-f3fa-4bf4-bdea-b11dce7b2862",
      "name": "Bright Data MCP Client for Brave News Search",
      "type": "n8n-nodes-mcp.mcpClient",
      "position": [
        100,
        100
      ],
      "parameters": {
        "toolName": "scrape_as_html",
        "operation": "executeTool",
        "toolParameters": "={\n  \"url\": \"{{$json.search_base_url}}?q={{encodeURI($('Set the search criteria\\'s').item.json.search_query)}}\"\n} "
      },
      "credentials": {
        "mcpClientApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "725c7c7e-6422-4bcb-8bb1-441766741c96",
      "name": "Bright Data MCP Client for Brave All Search",
      "type": "n8n-nodes-mcp.mcpClient",
      "position": [
        100,
        300
      ],
      "parameters": {
        "toolName": "scrape_as_html",
        "operation": "executeTool",
        "toolParameters": "={\n  \"url\": \"{{$json.search_base_url}}?q={{encodeURI($('Set the search criteria\\'s').item.json.search_query)}}\"\n} "
      },
      "credentials": {
        "mcpClientApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a6843bfe-f649-4ab8-9208-1d3119e811c5",
      "name": "Set the input fields for All search",
      "type": "n8n-nodes-base.set",
      "position": [
        -120,
        300
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0b0e9335-56d4-4705-b61b-de0dc9c8ae6d",
              "name": "search_base_url",
              "type": "string",
              "value": "https://search.brave.com/search"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c8fa6490-f0db-400c-8283-e8f9120e6481",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1060,
        -180
      ],
      "parameters": {
        "columns": {
          "value": {
            "Output": "={{ $json.output.search_results.toJsonString() }}"
          },
          "schema": [
            {
              "id": "Output",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Output",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Output"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1KE5v8RZ3BouTzoT3D4CeU8whe-kWpZcq0VMSalNrxFg/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1KE5v8RZ3BouTzoT3D4CeU8whe-kWpZcq0VMSalNrxFg",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1KE5v8RZ3BouTzoT3D4CeU8whe-kWpZcq0VMSalNrxFg/edit?usp=drivesdk",
          "cachedResultName": "Brave Search Results"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "6d51e57a-1303-46a0-95ce-80d3a17c30db",
      "name": "Create a binary data for Structured Data Extract",
      "type": "n8n-nodes-base.function",
      "position": [
        1060,
        20
      ],
      "parameters": {
        "functionCode": "items[0].binary = {\n  data: {\n    data: new Buffer(JSON.stringify(items[0].json, null, 2)).toString('base64')\n  }\n};\nreturn items;"
      },
      "typeVersion": 1
    },
    {
      "id": "7f5d181b-18bc-4bb4-8ae9-bc2e05137127",
      "name": "Write the structured content to disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1280,
        20
      ],
      "parameters": {
        "options": {},
        "fileName": "=d:\\Brave-Search-Result-{{new Date().toISOString().replaceAll(\":\",\".\")}}.json",
        "operation": "write"
      },
      "typeVersion": 1
    },
    {
      "id": "fa6143c9-3312-4890-a490-3bc3db355c53",
      "name": "Initiate a Webhook Notification for the Structured Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1060,
        220
      ],
      "parameters": {
        "url": "https://webhook.site/24878284-919d-4d39-bff0-5f36bfae17b6",
        "options": {},
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "summary",
              "value": "={{ $json.output.search_results.toJsonString() }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "cdea8e7d-f513-45fa-b7cf-3b9507d47fda",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        -220
      ],
      "parameters": {
        "color": 4,
        "width": 940,
        "height": 660,
        "content": "## Structured Data and Output Handling\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3a04231b-455b-48ad-8403-915a6851d84b",
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Set the input for image search",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set the input for video search",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set the input fields for news search",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set the input fields for All search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set the Search Response": {
      "main": [
        [
          {
            "node": "Structured Data Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Data Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Structured Data Extractor",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Set the search criteria's": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Data Extractor": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create a binary data for Structured Data Extract",
            "type": "main",
            "index": 0
          },
          {
            "node": "Initiate a Webhook Notification for the Structured Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set the input for image search": {
      "main": [
        [
          {
            "node": "Bright Data MCP Client for Brave Image Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set the input for video search": {
      "main": [
        [
          {
            "node": "Bright Data MCP Client for Brave Video Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Set the search criteria's",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set the input fields for All search": {
      "main": [
        [
          {
            "node": "Bright Data MCP Client for Brave All Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set the input fields for news search": {
      "main": [
        [
          {
            "node": "Bright Data MCP Client for Brave News Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bright Data MCP Client for Brave All Search": {
      "main": [
        [
          {
            "node": "Set the Search Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bright Data MCP Client for Brave News Search": {
      "main": [
        [
          {
            "node": "Set the Search Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bright Data MCP Client for Brave Image Search": {
      "main": [
        [
          {
            "node": "Set the Search Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bright Data MCP Client for Brave Video Search": {
      "main": [
        [
          {
            "node": "Set the Search Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a binary data for Structured Data Extract": {
      "main": [
        [
          {
            "node": "Write the structured content to disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Community nodes can only be installed on self-hosted instances of n8n.

Source: https://n8n.io/workflows/4497/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Community nodes can only be installed on self-hosted instances of n8n.

HTTP Request, Google Gemini Chat, Chain Llm +4
AI & RAG

Community nodes can only be installed on self-hosted instances of n8n.

N8N Nodes Mcp, Chain Llm, Output Parser Structured +3
AI & RAG

Community nodes can only be installed on self-hosted instances of n8n.

N8N Nodes Mcp, Agent, Google Gemini Chat +5
AI & RAG

Transform a single quote into a fully-rendered cinematic short video — with voice-over, visuals, and music — then publish it directly to TikTok, Instagram Reels, and YouTube Shorts. This isn’t just au

Agent, HTTP Request, Jwt +7
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

HTTP Request, Google Sheets, OpenRouter Chat +5