How to Build an Automated Fact Checker With You.com Search API and n8n
.png)
When dealing with large language models (LLMs), you know that they tend to hallucinate when it comes to reporting current information. Even after LLM providers have integrated legacy web search tools, models still have the tendency to be very verbose. Which means that, if they aren’t hallucinating on current information, they can deliver more information than you need.
So, how can you be sure that the result your LLM provided is correct when you are searching for information on a new topic? This is where a fact checker comes in handy!
In this article, you will learn the following:
- Why you should build a fact checker
- How to build an automated fact checker using You.com Search API and n8n
Let’s dive in!
Why Build a Fact Checker
LLMs are built to respond to users’ queries. They have to provide an answer. This, however, can pose a significant problem for users: how do you know if the answer is correct? This problem is particularly relevant in cases where the information you are searching for is very fresh because the model has not yet been trained on that information.
To solve this problem, LLM providers now implement web search tools in their models. However, these tools are not always the right solution because LLMs are verbose. While LLMs can report correct information thanks to the web search tool, their verbosity can introduce other information that is incorrect or confusing.
For example, if you ask Gemini to create a report on the MCP protocol, it reports the correct information. However, its verbosity can report information that can be confusing or not useful. For instance, it can report a small paragraph that compares the MCP protocol to RAG:
.png)
While there’s nothing bad about that, the point is that RAG and MCP are two very different systems. This is also what Gemini says, but it can be confusing. If you ask an LLM for a report about the MCP protocol, there’s really no need for it to provide an answer that includes RAG. As they are two different systems, it can confuse users who don’t already have a clear idea of MCP. Which is exactly why we want LLMs to respond only to data that is relevant to a query.
So, to get the most relevant, fresh, and correct information, the best solution is to retrieve real-time content directly from the web, provide it to the LLM, and ask it to respond only based on the retrieved content. This is where the You.com Search API can come into the game. The Search API retrieves relevant results based on the user query, and reports a result that is LLM-ready.
How to Build an Automated Fact Checker With You.com Search API and n8n: Step-by-Step Tutorial
In this section, you will learn how to create an automated workflow in n8n that does the following:
- Triggers the Search API with the following search query: “What is Model Context Protocol (MCP)?”
- Ingests an OpenAI model with the results retrieved by the Search API.
- Asks the model to write a summary based only on the result retrieved by the Search API.
- Appends the result to a Notion page.
This tutorial is designed for teams that need to verify information before writing content around it, and want to write this content in a collaborative environment, like Notion.
Requirements
To replicate this tutorial, you need the following:
- A valid API key for the You.com APIs
- An active n8n account. Alternatively, you can use the self-hosted option.
- An active Notion account
Follow the steps below to create your automated fact checker that uses our Search API with n8n.
Step #1: Create a New n8n Workflow and Add a Trigger
From the n8n workflow main page, create a new workflow:
.png)
Click on Add first step, search for the manual trigger, and select it:
.png)
The manual trigger node serves to start the whole workflow manually. The image below shows your workflow until now:
.png)
Nicely done! You created a first n8n workflow and added the first node to it.
Step #2: Add an HTTP Trigger That Calls The Search API
Click on the plus sign, search for the HTTP request node, and add it to the workflow by selecting it:
.png)
The HTTP request node is one of the most versatile nodes in n8n. In this case, it is responsible for making the call to the Search API. Select the GET method and specify the target URL:
.png)
Leave Authentication to None. You will add your API key later. Scroll down and enable the Send Query Parameters field. Compile the Name and Value fields as follows:
.png)
Scroll down, enable the Send Headers field, and compile it as follows:
.png)
Note that the names of the query and headers parameters must match the ones in the Search API documentation:
.png)
If you click on Execute step, the HTTP request node will provide you with the results for the query you have inserted:
.png)
Perfect! The HTTP node is correctly configured. You are ready for the next step. This is what your workflow looks like so far:
.png)
Step #3: Add The AI Agent Node
This step involves using AI to ingest the results returned by the Search API and make a summary of them. Add an AI agent node to the HTTP request one:
.png)
In n8n, the AI agent is a node that receives data, makes decisions, and acts within its environment to achieve specific goals. To set up the AI node, first add the prompt that the LLM will respond to and set it as follows:
.png)
Below, we’ve also added the prompt in textual form:
Make a summary of what MCP is based on what you have learned in the contents
retrieved from the web.
The real constraint happens in the System Message field. Below is how to set it up:
You are a helpful AI assistant. Your task is to answer the user's question based ONLY 
on the context provided below. Do not use any of your internal knowledge
or any other information.
Context:
{{ $('HTTP Request').item.json.results.web[0].description }}
 {{ $json.results.web[0].snippets }}
The context tells the node exactly which part of the results from the HTTP node to use. You can drag and drop this data from the left side directly inside the System Message field:
.png)
Terrific! The AI node is set up. Below is your workflow so far:
.png)
Step #4: Ad An LLM
The AI agent node needs an LLM to work. Click on Chat Model and add your favourite. For example, add a model from OpenAI:
.png)
In the Credentials to connect with field, add your LLM provider API key. In the Model box, select a model from the listed ones:
.png)
Open the AI node and execute the step to see the results:
.png)
Very good. The OpenAI chat model node is correctly set up.
Step #5: Connect to Notion
The AI agent node processes the prompt thanks to the OpenAI model you connected, but the results are only available inside the node. To make the workflow more usable, add a Notion node as the last one in the workflow.
Create a new Notion page and, for example, call it “Facts Checked”. Then, go to your Notion integrations section and add a new integration:
.png)
Save the Internal Integration Secret: you will use it later when setting up the Notion node in n8n. Click on the Access table and select the “Facts Checked” page:
.png)
In the n8n workflow, add a Create Notion page node:
.png)
Below is how you must set the Notion node:
- Credential to connect with: This is where you will add the Internal Integration Secret generated inside Notion previously.
- Parent Page: Paste the URL of the “Facts Checked” Notion page.
- Title: Give a title to the new page that will be created. For example, call it “MCP summary”.
- Text: Drag and drop the output that comes from the AI Agent node.
Below is a reference image for the visualization of the Notion node setup:
.png)
When you click on Execute step, the workflow will automatically create a new page called MCP summary inside the page “Facts Checked,” reporting the summary:
.png)
Below is the result in the text format:
MCP (Model Context Protocol) is an open-source standard designed to connect
AI applications to external systems such as data sources, tools, and workflows.
It provides a standardized way, similar to USB-C for electronic devices,
for AI models like Claude or ChatGPT to access and interact with various resources
including local files, databases, search engines, and productivity apps like
Google Calendar and Notion. This enables AI applications to become more capable
and personalized, allowing them to perform tasks such as data analysis,
generating web apps from designs, creating 3D designs, and more,
ultimately acting on users' behalf when needed.
If you open the Notion node, you will see a success message:
.png)
Below is the complete workflow:
.png)
Et voilà! You created an automated workflow that checks facts with the You.com Search API.
Reduce Hallucinations, Get Real-Time Info
If you have been working with LLMs, you know that they can’t always be trusted. Hallucinations are an inherent part of these models and, especially with new and current information, LLMs tend to hallucinate or to report more content than needed.
This is where a fact checker is useful—it helps mitigate hallucinations and trust the responses of your models. At the core of this workflow lies the You.com Search API, which returns relevant content based on your query.
If you are searching for a system that compels LLMs to respond based on relevant and fresh results, then our Search API is the right one for you. Select a you.com plan (no CC required) and get an API key today.

Get our latest resources sent straight to your inbox.
Never miss a beat — keep your team informed and inspired with new resources delivered weekly.

Featured resources.

Build Production-Ready AI Solutions with You.com's Express API and Custom Agents
October 6, 2025
Blog
.webp)
Paying 10x More After Google’s num=100 Change? Migrate to You.com in Under 10 Minutes
September 18, 2025
Blog

September 2025 API Roundup: Introducing Express & Contents APIs
September 16, 2025
Blog

You.com vs. Microsoft Copilot: How They Compare for Enterprise Teams
September 10, 2025
Blog
All resources.
Browse our complete collection of tools, guides, and expert insights — helping your team turn AI into ROI.

7 Things Enterprises Need in a Web Search API
October 30, 2025
Blog
%20(2).png)
10 AI APIs Developers Should Know in 2025
October 23, 2025
Blog

You.com Welcomes Graft to Accelerate Enterprise AI Search Infrastructure
October 21, 2025
Press Releases
.png)
What is a Search API for LLMs?
October 21, 2025
Blog

How to Unlock Enterprise Value through AI Employee Training
October 16, 2025
Blog

October 2025 API Roundup: Introducing MCP, Enhanced Search API, and More
October 15, 2025
Blog

You.com's Deep Research Agent 'ARI' Named on TIME's List of The Best Inventions of 2025
October 9, 2025
Blog

How to Integrate a Real-Time Web Search API Into Your GenAI Apps
October 7, 2025
Blog