Google Gemini URL Context

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Gemini models can now fetch and read URLs themselves, so developers can build agents that consult live webpages without writing their own scraping or retrieval code.

Read this as

Google added a new option to its Gemini API called url_context. When turned on, the AI can go fetch the contents of a web page by itself and use that text when answering your question, instead of you having to copy the page in. In a demo, it answered a question about a website using 9,613 tokens of fetched content, which are billed as input tokens. It matters to anyone building chatbots or assistants that need to read current web pages.

Google's Gemini API now offers a url_context tool that lets the model pull in webpage contents during a response. The cost lands on your bill: fetched page text is charged as input tokens, Simon Willison's demo logged 9,613 fetched tokens against just 87 output tokens. Developers of retrieval-free tools gain a simpler option; teams with existing scraping or RAG pipelines see no new urgency. Willison already shipped support in his llm-gemini tool, version 0.25.

The Gemini API exposes a url_context tool that models invoke to retrieve URL contents mid-response, with fetched tokens billed as input (toolUsePromptTokenCount). Willison's demo on gemini-2.5-flash recorded 9,613 input tool tokens, 87 output tokens and 30 thought tokens. He added a -o url_context 1 option in llm-gemini 0.25, viewable via llm logs -c --usage. The article gives no rate limits, caching behaviour or failure-mode details.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Google Gemini Gemini API url_context llm-gemini 0.25 gemini-2.5-flash simonwillison.net

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading