URL Content
The url_content tool is a built-in tool automatically available on all /v1/chat/completions requests. It uses Google Gemini 2.5 Flash with the native urlContext tool to fetch, render, and analyze live web pages. The model receives the full rendered page content and answers your question about it.
How It Works
You include one or more URLs anywhere in your message
The LLM detects URLs and calls
url_contentinternally with those URLs + your questionGemini 2.5 Flash fetches and processes the full page content using Google's
urlContexttoolGemini returns an answer grounded in the actual page content
The answer is returned as a standard chat completion
Use Cases & Examples
1. Summarize a Page
{
"model": "google/gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": "Summarize this page and also team details: https://www.qolaba.ai/about-us"
}
]
}
2. Extract Specific Information
4. Extract Structured Data from a Page
5. Competitor Analysis (3+ URLs)
Tips & Best Practices
Just paste the URL
No special syntax — include the URL anywhere in the message
Be specific
"Extract all product names" works better than "tell me about this page"
Multiple URLs
Put each URL on its own line for clarity — all are fetched together
JS-heavy pages
Works on SPAs and dynamic pages — Gemini's urlContext renders JavaScript
Large pages
Cost scales with page size but remains low (Gemini 2.5 Flash is cheap per token)
Ask for format
"Return as JSON", "Return as a table", "List as bullet points" all work
Limitations
Private/authenticated pages — cannot access pages behind login walls or paywalls
PDFs / binary files — works best on HTML pages; PDF support depends on Google's urlContext
Rate-limited sites — some sites block scraping; Gemini makes a best-effort attempt
Very large pages — extremely long pages may be truncated by token limits
No config from request —
urlsandpromptare extracted by the model; you cannot pass them directly in the request body
Last updated
Was this helpful?