URL context tool for Gemini API now generally available

AUG. 18, 2025
Alisa Fortin Product Manager

Starting today, the URL context tool is now ready for scaled production use and comes packed with new features. The tool enables developers to provide additional context to the models in the form of URLs, instead of manually uploading the content, unlocking more powerful and contextually-aware generative AI applications.

By default, Gemini models have a static knowledge base and no direct internet access. Grounding with Google Search connects them to the web for broad, real-time discovery. For a deeper analysis, the URL context tool goes beyond search snippets, allowing the model to ingest and reason over the full content of a specific webpage. This powerful combination—using Search to discover and URL Context to analyze—is the foundation for sophisticated, multi-step tasks.


More versatility with expanded content support

With this launch, the URL context tool significantly expands the types of content you can ground your prompts in, making it more versatile for a wider range of applications. Support now includes:

  • PDF support: You can now provide direct links to PDFs, enabling Gemini to not only extract text but also understand tables and the overall structure within them, making reports, papers, and manuals fully accessible for grounding.

  • Image support: The tool can now process and analyze images, including PNG, JPEG, BMP, and WebP formats. This leverages Gemini's multimodal capabilities to comprehend visual information, opening doors for analysis of charts, diagrams, and more.

  • Web and data files: Continued robust support for standard web pages (HTML), structured data (JSON, XML, CSV), and text files (Plain Text, RTF, CSS, JavaScript).


Ready for production scale

To ensure you can use these expanded capabilities in your applications, the URL Context tool is now ready for scaled production use with updated limits and pricing. Rate limits are now based on the specific Gemini model you choose, allowing for much greater scale. You are charged for the added input tokens to context, based on the standard rate for the model. This makes your costs clear and predictable.


Unlocking new use cases

The URL context tool opens up a wide range of agentic workflows for developers. Here are just a few of the use cases you can now build:

  • Personalize customer interactions: Ground AI chat agents with customers’ web pages enabling them to provide accurate and relevant answers to inquiries.

  • Compare documents: Analyze multiple reports, articles, or PDFs to identify differences and track trends.

  • Synthesize & create content: Combine information from several source URLs to generate accurate summaries, blog posts, or reports.

  • Analyze code & docs: Point to a GitHub repository or technical documentation to explain code, generate setup instructions, or answer technical questions.


URL context in action

We're already seeing developers build amazing things with the URL context tool. Here are a couple of real world examples:

Gemini CLI: The Gemini CLI, an open source AI agent that provides access to Gemini directly in your terminal, uses the URL context tool for its web-fetch command to enable developers to quickly and easily interact with web content for use cases like summarizing a webpage, extracting key information, or even translating it into another language.

Web fetch tool in Gemini CLI
Web fetch tool in Gemini CLI

Gladly.ai: Gladly, a customer service platform, uses the URL context tool to create highly personalized customer experiences. By providing links to their customers' websites, agents built on Gladly’s AI platform can access and understand the latest product information, promotions, and support articles, enabling them to provide more accurate and relevant answers to customer inquiries.


Get started today

Ready to start building with the URL context tool? Here’s an example to get you started:

from google import genai
from google.genai.types import Tool, GenerateContentConfig
client = genai.Client()

model_id = "gemini-2.5-flash"
tools = [
     {"url_context": {}},
 ]


response = client.models.generate_content(
    model=model_id,
    contents="What are the top 3 recent announcements from the Gemini API according to https://ai.google.dev/gemini-api/docs/changelog",
    config=GenerateContentConfig(
        tools=tools,
    )
)
for each in response.candidates[0].content.parts:
   print(each.text)
Python

Head over to the URL context documentation to learn more and see code samples. See it in action through our mini demo app or find the toggle for URL context under “Tools” in Google AI Studio to try it out yourself.

We can't wait to see what you build!