Ollama web search is a hosted API feature that returns search results or fetched page content for applications that need current information. It is separate from local model inference and requires an Ollama account API key.
The search endpoint runs at https://ollama.com/api/web_search and accepts a query plus an optional result limit. Treat returned snippets as retrieval context that still needs citation, filtering, or summarization in the application layer.
The campaign did not use a hosted API key, so the page keeps command examples sanitized and marks credential-backed validation as blocked. Do not substitute a local localhost request for this hosted feature.
Related: How to authenticate Ollama API requests
Related: How to run an Ollama cloud model
Related: How to use tool calling with the Ollama API
$ export OLLAMA_API_KEY='ollama_********************************'
Use a task-scoped key for validation and revoke it afterward when possible.
$ curl https://ollama.com/api/web_search \ -H "Authorization: Bearer $OLLAMA_API_KEY" \ -d '{"query":"what is ollama?","max_results":3}' {"results":[{"title":"Ollama","url":"https://ollama.com/","content":"Cloud models are now available..."}]}
$ curl https://ollama.com/api/web_search -H "Authorization: Bearer $OLLAMA_API_KEY" -d '{"query":"site:docs.ollama.com embeddings","max_results":2}' {"results":[##### snipped #####]}
$ curl https://ollama.com/api/web_fetch \ -H "Authorization: Bearer $OLLAMA_API_KEY" \ -d '{"url":"https://docs.ollama.com/"}' {"title":"Ollama documentation","content":"##### snipped #####","links":[##### snipped #####]}
$ export OLLAMA_API_KEY=
Do not store hosted API keys in repository files.