In short. Gemini URL context reads selected text, image and PDF MIME types from public URLs, with documented request and content size limits.
Definition: Gemini URL context is a Gemini API tool that retrieves content from URLs supplied in a request and gives that content to the model as additional context. Google documents support for selected text, image and PDF MIME types, subject to access, size and request limits.
Key facts
- Google's URL context documentation lists HTML, JSON, plain text, XML, CSS, JavaScript, CSV and RTF as supported text types.
- The same documentation lists PNG, JPEG, BMP and WebP images, plus PDF files, as supported URL content.
- A request can contain up to 20 URLs, and content retrieved from one URL can be at most 34 MB.
- URLs must be publicly accessible. Paywalled pages, Google Workspace files, YouTube videos, and video or audio files are listed as unsupported.
- Google's Files API documentation describes file upload as a separate way to work with media files.
Which content types does URL context read?
Google's supported content type list groups URL context inputs into three classes. The text class includes these MIME types:
text/html
application/json
text/plain
text/xml
text/css
text/javascript
text/csv
text/rtf
The image class includes image/png, image/jpeg, image/bmp and image/webp. The document class includes application/pdf. The format is determined by the content returned at the URL, so a page needs to serve the intended representation rather than merely use a familiar filename extension.
What access and retrieval rules apply?
The URL context guide says that URLs must be publicly accessible on the web. Localhost addresses such as localhost and 127.0.0.1, private networks, and tunneling services such as ngrok and pinggy are unsupported. A login or paywall also prevents the documented retrieval path.
Google's best practices say to provide the full URL, including the protocol. The tool retrieves content from the URLs supplied in the request. It does not follow nested links, so linking to a page does not give it access to that page's linked documents.
The retrieval process first checks an internal index cache. When the URL is absent from that cache, for example because it is a very new page, the tool falls back to a live fetch that accesses the URL in real time. A safety check can return "unsafe" in the url_context_result metadata when a URL fails content moderation.
What are the request and content limits?
Google sets a request limit of 20 URLs and a maximum retrieved content size of 34 MB for one URL in its limitations section. These are separate limits: a request can include several smaller resources, while one resource can reach the per-URL ceiling.
Retrieved content counts as input tokens. The response exposes retrieval metadata in a url_context_result step, and text segments can carry url_citation annotations that point to their source URLs. A site owner therefore needs to make the target representation public, reachable and small enough before testing the model's response.
What about unsupported media or workspace files?
URL context does not support Google Workspace files such as Google Docs or spreadsheets, or video and audio files. YouTube URLs are also excluded from this tool's supported content list. Google's Files API guide instead describes uploading and interacting with media files, with storage of up to 20 GB per project, a 2 GB maximum per file, and 48-hour file storage.
The Files API limits describe uploaded files, not URL context retrieval. They should not be substituted for the URL context limit of 34 MB for content retrieved from one URL.
Related terms
FAQ
Can Gemini URL context read an HTML webpage?
Yes. text/html is one of Google's supported text MIME types, alongside JSON, plain text, XML, CSS, JavaScript, CSV and RTF.
Can it read a PDF or image at a public URL?
Yes. Google lists application/pdf and the PNG, JPEG, BMP and WebP image types. The URL must be publicly accessible and the retrieved content must remain within the 34 MB per-URL maximum.
Can it follow links inside a webpage?
No. The URL context guide says the model retrieves content from the URLs provided in the request, not from nested links. Each document that needs analysis must therefore have its own supplied URL.
Sources
- Google AI for Developers, "URL context", 13 October 2026
- Google AI for Developers, "Files API", 13 October 2026
Check how a page reads to answer engines. Open the GEO score analyzer