Open-Source Wikis

/

Ollama

/

Features

/

Web search and fetch

ollama/ollama

Web search and fetch

Two experimental endpoints — POST /api/experimental/web_search and POST /api/experimental/web_fetch — that the local daemon forwards to ollama.com.

Purpose

Make web search and URL fetching available as primitives to clients (and to launch integrations like OpenClaw) without each one rolling its own HTTP fetcher and search backend. Behind the scenes both endpoints are pure cloud proxies — there is no local search index.

Endpoints

POST /api/experimental/web_search
POST /api/experimental/web_fetch

They live under /api/experimental/ deliberately: the path itself signals that the shape may change without notice.

Implementation

Handler entries are Server.WebSearchExperimentalHandler and Server.WebFetchExperimentalHandler in server/routes.go; the actual forwarding lives in server/cloud_proxy.go.

Errors map to dedicated strings:

  • cloudErrWebSearchUnavailable"web search is unavailable"
  • cloudErrWebFetchUnavailable"web fetch is unavailable"

These are returned with appropriate HTTP statuses when cloud is disabled or the upstream call fails.

Shape

The request bodies and response shapes are intentionally close to what ollama.com accepts upstream — they're not stable yet, so this wiki avoids enumerating fields that might change. See the handler functions in server/cloud_proxy.go for the current shape; the Go API client does not yet expose them as typed methods.

Authentication

Like every cloud call, requests are signed with the local SSH key from auth/auth.go. Without sign-in, both endpoints return the unavailable errors.

Consumers

  • The OpenClaw launch integration (cmd/launch/openclaw.go) uses bundled web search (launch: use bundled OpenClaw ollama web search (#15757)).
  • External tooling can call them directly, but should expect breaking changes.

Integration points

Key source files

File Purpose
server/routes.go Route registration.
server/cloud_proxy.go Forwarding logic.
server/routes_web_experimental_test.go Behavior tests.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Web search and fetch – Ollama wiki | Factory