Ollama: Web Search (ollama.com)

🤖 AI Summary
Ollama has added a web search API (plus a web_fetch endpoint) to its stack, available as a REST service and through first‑class Python and JavaScript libraries. There’s a generous free tier for individuals and higher rate limits on Ollama Cloud. The new tools let local or cloud-hosted models pull fresh web content (title, URL, snippet/content) to ground responses, reduce hallucinations, and enable long‑running research or multi‑step agents that need up‑to‑date information. Technically, the API is simple: POST to https://ollama.com/api/web_search with an Authorization: Bearer $OLLAMA_API_KEY and a JSON query; client libs (pip/npm 'ollama@>=0.6.0') expose ollama.web_search / client.webSearch and web_fetch for full-page retrieval (title, content, links). Returned results are arrays of WebSearchResult objects and can be large (thousands of tokens), so Ollama recommends boosting model context to ~32k tokens for effective tool use. The feature integrates with chatbot tool loops (examples use qwen3:4b and gpt-oss), supports MCP/Cline/Codex/Goose integrations, and is positioned to power agents that call web_search/web_fetch, parse results, and continue multi-turn reasoning with external data.
Loading comments...
loading comments...