WIPIVERSE All articles

Karen Guillemin

Ollama Web Search is a cloud-based REST API provided by Ollama that enables large language models (LLMs) to search the live internet for up-to-date information. It was announced on September 24, 2025, and is designed to augment models with current web data, reducing hallucinations and improving response accuracy.

Overview

Ollama Web Search allows models to query the web in real time, returning structured results that include titles, URLs, and content snippets. It is available as a standalone REST API and is also deeply integrated into Ollama's Python and JavaScript client libraries, enabling tool-calling workflows where models can autonomously decide when to search the web.

API Details

The API endpoint is POST https://ollama.com/api/web_search. It requires authentication via an Ollama API key (set as the OLLAMA_API_KEY environment variable or passed in the Authorization header).

Request parameters:

  • query (string, required): The search query string.
  • max_results (integer, optional): Maximum number of results to return (default: 5, max: 10).

Response: Returns an object containing a results array, where each result has:

  • title (string): The title of the web page.
  • url (string): The URL of the web page.
  • content (string): A relevant content snippet from the web page.

Usage Examples

cURL

curl https://ollama.com/api/web_search \
  --header "Authorization: Bearer $OLLAMA_API_KEY" \
  -d '{ "query": "what is ollama?" }'

Python (requires ollama>=0.6.0)

import ollama
response = ollama.web_search("What is Ollama?")

JavaScript (requires ollama@>=0.6.0)

import { Ollama } from "ollama";
const client = new Ollama();
const results = await client.webSearch({ query: "what is ollama?" });

Building a Search Agent

Ollama Web Search can be used as a tool in an agentic loop. The official documentation provides an example using Alibaba's Qwen 3 (4B parameter) model, where web_search and web_fetch are registered as available tools. The model can then autonomously decide to call these tools, process the results, and continue the conversation.

Rate Limits and Pricing

Ollama provides a generous free tier of web searches for individual users. Higher rate limits are available through Ollama's cloud service.

Context Length Recommendation

Because web_search and web_fetch can return thousands of tokens, it is recommended to increase the model's context length to approximately 32,000 tokens for reasonable performance.


Ollama Web Fetch

Ollama Web Fetch is a cloud-based REST API provided by Ollama that retrieves the full content of a specified web page. It was introduced alongside Ollama Web Search on September 24, 2025, as part of Ollama's suite of web-enabled tools for large language models.

Overview

While Ollama Web Search returns search result snippets, Ollama Web Fetch goes a step further by fetching the complete content of a single URL. This is particularly useful when a user provides a specific URL in a prompt, or when a search agent needs to read the full text of a page found via web search.

API Details

The API endpoint is POST https://ollama.com/api/web_fetch. It requires authentication via an Ollama API key.

Request parameters:

  • url (string, required): The URL to fetch.

Response: Returns an object containing:

  • title (string): The title of the web page.
  • content (string): The main content of the web page, rendered in markdown format.
  • links (array): An array of links found on the page.

Usage Examples

cURL

curl --request POST \
  --url https://ollama.com/api/web_fetch \
  --header "Authorization: Bearer $OLLAMA_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{ "url": "ollama.com" }'

Python

from ollama import web_fetch
result = web_fetch('https://ollama.com')
# Returns: WebFetchResponse(title, content, links)

JavaScript

import { Ollama } from "ollama";
const client = new Ollama();
const fetchResult = await client.webFetch({ url: "https://ollama.com" });

Integration with Search Agents

Web Fetch is typically used alongside Web Search in agentic workflows. A common pattern is:

  1. The model uses web_search to find relevant pages.
  2. The model then uses web_fetch to retrieve the full content of the most promising result(s).
  3. The model synthesizes the information and responds to the user.

Context Length Consideration

Fetched page content can be extensive. Ollama recommends setting the model's context length to approximately 32,000 tokens when using these tools.


Karen Guillemin

Karen Guillemin is an American microbiologist known for her pioneering research on the role of bacteria in influencing animal development and health. She is the Phillip H. Knight Chair and Professor of Biology at the Institute of Molecular Biology at the University of Oregon.

Education and Training

Guillemin earned her A.B. from Harvard and Radcliffe Colleges and her Ph.D. from Stanford University School of Medicine, where she studied organ development in fruit flies. She remained at Stanford as a postdoctoral fellow in microbiology, training under renowned microbiologist Stanley Falkow and studying how the stomach bacterium Helicobacter pylori interacts with gastric epithelial cells.

Career and Research

Guillemin joined the University of Oregon faculty in 2001. She gained widespread recognition for developing the zebrafish (Danio rerio) as a model organism to study the effects of the microbiome on animal development and health. Her lab uses genetically tractable and microbiologically manipulable model systems including zebrafish and fruit flies.

Key Research Areas

  1. Host-microbe interactions in development and disease: Investigating how hosts and their associated microbial communities shape each other, using gnotobiotic (germ-free) animals with defined microbial associations to uncover causal relationships.

  2. Microbial impacts on intestinal development: Discovering that resident bacteria play important roles in the maturation of the zebrafish intestine, including promoting intestinal epithelial cell proliferation and recruiting innate immune cells. Many of these effects are conserved across animal species.

  3. Bacterial strategies for colonizing the host: Studying how host-associated bacteria explore and establish residency, including chemotaxis in H. pylori. Her analysis of the chemoreceptor TlpB revealed a novel pH-sensing mechanism involving a urea cofactor.

  4. Assembly of host-associated microbial communities: Investigating how microbial communities assemble in and on hosts and how these communities change during host development and disease.

Leadership

In 2012, Guillemin co-founded the Microbial Ecology and Theory of Animals (META) Center for Host-Microbe Systems Biology at the University of Oregon. In 2015, she was named a Senior Fellow of the Canadian Institute for Advanced Research (CIFAR), Humans & the Microbiome Program.

Awards and Honors

  • Burroughs Wellcome Fund Career Award in Biomedical Sciences (2001)
  • Fellow, American Academy of Microbiology (2016)
  • Fellow, American Academy of Arts and Sciences (2020)
  • Fellow, American Association for the Advancement of Science (AAAS) (2020)

Personal and Family

Karen Guillemin is the daughter of MIT mathematics professor Victor Guillemin, a great-niece of MIT electrical engineering professor Ernst Guillemin, and a niece of street artist Robert Charles Guillemin (known as "Sidewalk Sam").

Selected Publications

Guillemin has published over 100 scientific papers indexed on PubMed, covering topics in host-microbe interactions, microbiome assembly, intestinal development, and bacterial pathogenesis.

Browse

More topics to explore

    Browse all articles