Skip to content

Scenario Own Web Search

Thorsten Sommer edited this page Oct 31, 2026 · 2 revisions

Goal: The AI may search the web and read web pages, through a search engine your organization runs, with settings your users can't change, and without carrying internal content out.

You need: a SearXNG instance of your own. Public instances don't work: AI Studio reads search results as JSON, which public instances usually don't offer, and they limit automated requests.

Preparing SearXNG

In the settings.yml of your instance:

search:
  formats:
    - html
    - json

server:
  limiter: false
  public_instance: false

Keep the instance inside your network, or protect it otherwise: without the limiter, it answers every request.

The configuration

CONFIG = {}
CONFIG["SETTINGS"] = {}

CONFIG["SETTINGS"]["DataTools.LockedToolSettings"] = {
    -- Your search engine, and nothing else:
    ["web_search.searxng.baseUrl"] = "https://search.intra.example.org/",
    ["web_search.primaryBackend"] = "SEARXNG",
    ["web_search.backendStrategy"] = "SPECIFIC",
    ["web_search.defaultLanguage"] = "de-DE",

    -- The AI reads only addresses that appear in the chat:
    ["read_web_page.freeAddressChoice"] = "OFF",

    -- Internal pages the AI may read, and what a chat may do afterward:
    ["read_web_page.allowedPrivateHosts"] = "intranet.example.org",
    ["read_web_page.internalPageOutboundDataRestriction"] = "ONLY_LINKS_FROM_CHAT",
}

CONFIG["SETTINGS"]["DataTools.DefaultToolSettings"] = {
    ["web_search.maxResults"] = "5",
    ["web_search.defaultSafeSearch"] = "MODERATE",
}

-- Which providers may use the tools:
CONFIG["SETTINGS"]["DataTools.MinimumProviderConfidenceByToolId"] = {
    ["web_search"] = "MEDIUM",
    ["read_web_page"] = "MEDIUM",
}
  • backendStrategy = "SPECIFIC" with primaryBackend = "SEARXNG" asks only your instance. FAILOVER asks further search services when one returns nothing, and PARALLEL asks all of them.
  • web_search.defaultLanguage is required. Use a language tag such as de-DE, or all.
  • The search queries the AI writes go to your instance, which forwards them to the search engines it uses. Configure in SearXNG which ones these are.
  • Commercial search services, such as Staan or Tavily, are possible as well. Their API keys go encrypted into LockedToolSettings, see Tools and Web Access.

What users see

  • In the tool selection of a chat, Web Search and Read Web Page are available for providers that meet your minimum.
  • "Tool Settings" shows your values, locked.
  • After the AI read an internal page, the chat offers no web search anymore.

Check it

  1. Stage the configuration on a test device, see Testing and Exporting Configurations.
  2. Ask a question that needs current information, with Web Search selected. The tool calls below the answer show requests to your instance.
  3. Paste the address of an internal page into the chat and ask about it, then ask for a web search: the chat refuses it.

Where to go next

Clone this wiki locally