Web Search (SearXng)
Web Search (SearXng) lets you pull up-to-date information from the internet directly into your Nappai workflow. By entering a query, you can retrieve a list of web pages and their main content, and even turn the search into a reusable tool for other components.
How it Works
When you run this component, it talks to the SearXNG search engine that is part of your Nappai installation. It sends your query string and the maximum number of results you want. SearXNG returns a short summary of each page, the page’s URL, and any links found on the page. The component then packages that information into two outputs:
- Data – a structured list of search results that can be used by downstream components.
- Tool – a ready‑to‑use search tool that other parts of your workflow can call programmatically.
No external APIs are required; everything stays within your Nappai environment.
Inputs
Mapping Mode
This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write Javascript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Input Fields
- Search Query: The text you want to look up on the web.
- Mapping Mode: Toggle to enable batch processing of multiple queries.
- Max Results: The maximum number of search results to return.
- Tool Description: A short description that will appear when the tool is used elsewhere.
- Tool Name: The name that will identify the tool in other components.
Outputs
- Data – A list of search results, each containing the page title, URL, snippet, and any extracted links.
- Tool – A reusable search tool that can be called by other components to perform the same search operation.
Usage Example
- Drag the Web Search (SearXng) component onto your canvas.
- In the Search Query field, type “latest AI research papers”.
- Set Max Results to 5.
- Provide a Tool Name like “AI Papers Search” and a Tool Description such as “Search for recent AI research papers using Nappai SearXNG search engine.”
- Connect the Data output to a Data Viewer component to see the results, or connect the Tool output to a Python Script component that calls the tool during runtime.
Related Components
- WebCrawlApi – Fetches full page content and extracts main text.
- Data Import – Pulls data from spreadsheets or databases into the workflow.
- Text Summarizer – Condenses long documents into short summaries.
Tips and Best Practices
- Keep Max Results low (e.g., 3–10) to reduce processing time and avoid overwhelming downstream components.
- Use Mapping Mode when you need to run the same search for many different queries in a single workflow.
- Store the Tool output in a variable and reuse it in multiple places to avoid repeating the search logic.
- Add a short Tool Description so other users can understand what the tool does at a glance.
Security Considerations
- Search results come from external websites; they may contain copyrighted or sensitive content.
- Always review the data before using it in automated decisions.
- If you plan to expose the Tool to untrusted users, consider adding a content filter or a review step.