Ollama Web Search API: Local LLMs can now connect to the internet, eliminating outdated information and hallucinations.
Ollama recently launched its Web Search API, enabling locally run large language models to access real-time information like online models, which enhances accuracy and reduces "hallucinations."
Through Ollama's web_search endpoint, models can directly query the internet for the latest data.
Example: ollama.web_search("Today's top AI news").
Parameters: query for the search term, and max_results (default 5, max 10) to control the number of returned results.
The free usage tier is ample for daily personal use.
Additionally, the web_fetch API can retrieve content from a specific URL, allowing the model to perform more detailed analysis and citation.
URL:
ollama.com/api/web_fetch
Via MCP Server, web_search and web_fetch can be seamlessly integrated into various clients and agents, enabling a complex interaction flow: "think -> call tool -> receive result -> continue conversation."
Official documentation:
docs.ollama.com/web-search
Users can generate an API key on the Ollama website:
ollama.com/settings/keys
#Ollama #WebSearch #AITools #LocalDeployment #Productivity